Branch data Line data Source code
1 : : /* 2 : : * Copyright (C) 2026 by Thun Lu. All rights reserved. 3 : : * Author: Thun Lu <thun.lu@zohomail.cn> 4 : : * Repo: https://github.com/thun-res/vlink 5 : : * _ __ __ _ __ 6 : : * | | / / / / (_) ____ / /__ 7 : : * | | / / / / / / / __ \ / //_/ 8 : : * | |/ / / /___ / / / / / / / ,< 9 : : * |___/ /_____/ /_/ /_/ /_/ /_/|_| 10 : : * 11 : : * Licensed under the Apache License, Version 2.0 (the "License"); 12 : : * you may not use this file except in compliance with the License. 13 : : * You may obtain a copy of the License at 14 : : * 15 : : * http://www.apache.org/licenses/LICENSE-2.0 16 : : * 17 : : * Unless required by applicable law or agreed to in writing, software 18 : : * distributed under the License is distributed on an "AS IS" BASIS, 19 : : * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 : : * See the License for the specific language governing permissions and 21 : : * limitations under the License. 22 : : */ 23 : : 24 : : #include "./impl/server_impl.h" 25 : : 26 : : #include "./base/logger.h" 27 : : 28 : : namespace vlink { 29 : : 30 : : // ServerImpl 31 : 152 : ServerImpl::~ServerImpl() = default; 32 : : 33 : 1 : bool ServerImpl::has_clients() const { return false; } 34 : : 35 : 33 : bool ServerImpl::reply(uint64_t req_id, const Bytes& resp_data, bool is_sync) { 36 : : (void)req_id; 37 : : (void)resp_data; 38 : : 39 [ + + ]: 33 : if VUNLIKELY (!is_sync) { 40 [ + - + - ]: 14 : VLOG_W("Function [reply] is not supported."); 41 : : } 42 : : 43 : 33 : return false; 44 : : } 45 : : 46 : 152 : ServerImpl::ServerImpl() : NodeImpl(kServer) {} 47 : : 48 : : } // namespace vlink