mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-04-17 05:39:53 +00:00
Cross-platform threading, sockets updates, and control stream implementation, and various other fixes
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user