Cross-platform threading, sockets updates, and control stream implementation, and various other fixes

This commit is contained in:
Cameron Gutman
2014-01-18 18:53:50 -05:00
parent f02e916f6c
commit 103c052729
11 changed files with 443 additions and 8 deletions

View File

@@ -19,4 +19,17 @@ SOCKET connectTcpSocket(IP_ADDRESS dstaddr, unsigned short port) {
}
return s;
}
int enableNoDelay(SOCKET s) {
int err;
int val;
val = 1;
err = setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&val, sizeof(val));
if (err == SOCKET_ERROR) {
return LastSocketError();
}
return 0;
}