33,311
社区成员
发帖
与我相关
我的任务
分享
ssize_t TcpServer::Send(int fd, const std::string& data)
{
std::string rep = data;
/* encoding if any */
if(GetEncapsulatedFormat() == Json::Rpc::NETSTRING)
{
rep = netstring::encode(rep);
}
return ::send(fd, rep.c_str(), rep.length(), 0);
}
我是正常发数据,客户端断开后,服务器单步调试到这里send时报了这个错误