| 120 | } |
| 121 | |
| 122 | void CRPCServer::_PackageAndSend(const cppnet::Handle& handle, FuncCallInfo* info, int code) { |
| 123 | if (!info) { |
| 124 | base::LOG_ERROR("function info is null!"); |
| 125 | return; |
| 126 | } |
| 127 | bool send = true; |
| 128 | int get_len = 65535; |
| 129 | int need_len = 0; |
| 130 | char send_buf[65535] = { 0 }; |
| 131 | need_len = get_len; |
| 132 | if (!_parse_package->PackageFuncRet(send_buf, need_len, code, info->_func_name, _func_map, info->_func_param_ret)) { |
| 133 | base::LOG_ERROR("package function response failed!"); |
| 134 | send = false; |
| 135 | } |
| 136 | if (send) { |
| 137 | handle->Write(send_buf, need_len); |
| 138 | } |
| 139 | } |
nothing calls this directly
no test coverage detected