mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-19 23:53:53 +00:00
TCP connections work on Windows now.
This commit is contained in:
@ -164,6 +164,16 @@ bool TcpSocket::notifyAvailableForWrite(const SharedPtr<Socket> &self,SocketMana
|
||||
|
||||
if (_outptr) {
|
||||
int n = (int)::send(_sock,(const char *)_outbuf,_outptr,0);
|
||||
#ifdef __WINDOWS__
|
||||
if (n == SOCKET_ERROR) {
|
||||
switch(WSAGetLastError()) {
|
||||
case WSAEINTR:
|
||||
case WSAEWOULDBLOCK:
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
if (n <= 0) {
|
||||
switch(errno) {
|
||||
#ifdef EAGAIN
|
||||
@ -179,6 +189,7 @@ bool TcpSocket::notifyAvailableForWrite(const SharedPtr<Socket> &self,SocketMana
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
} else memmove(_outbuf,_outbuf + (unsigned int)n,_outptr -= (unsigned int)n);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user