mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-04 00:36:14 +00:00
error on send failure
This commit is contained in:
parent
be7e2f1616
commit
cde41f01b2
@ -28,7 +28,12 @@ bool Send(SOCKET TCPSock,std::string Data){
|
|||||||
#endif // WIN32
|
#endif // WIN32
|
||||||
BytesSent = send(TCPSock, Data.c_str(), len, 0);
|
BytesSent = send(TCPSock, Data.c_str(), len, 0);
|
||||||
Data.clear();
|
Data.clear();
|
||||||
if (BytesSent <= 0)return false;
|
if (BytesSent <= 0) {
|
||||||
|
#ifndef WIN32
|
||||||
|
error(__func__ + std::string(strerror(errno)));
|
||||||
|
#endif // WIN32
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
std::string Rcv(SOCKET TCPSock){
|
std::string Rcv(SOCKET TCPSock){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user