Use TCP_NODELAY on client socket

This commit is contained in:
Adam Honse committed 2020-05-09 15:48:14 -05:00
1 parent 8bd515296d
commit 5b42b3d11d
1 file changed
+5
+5
View File
@@ -155,6 +155,11 @@ bool net_port::tcp_client_connect()
tv.tv_sec = 4;
tv.tv_usec = 0;
/*-------------------------------------------------*\
| Set socket options - no delay |
\*-------------------------------------------------*/
setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &yes, sizeof(yes));
if (select(sock + 1, NULL, &fdset, NULL, &tv) == 1)
{
char so_error;