From: Pekka Riikonen Date: Wed, 25 Jul 2001 15:47:54 +0000 (+0000) Subject: updates. X-Git-Tag: robodoc-323~28 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=3dbe76da235d1af6d399517b855cfb00ef7a1bc4 updates. --- diff --git a/CHANGES b/CHANGES index ee878a57..c25fa149 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +Wed Jul 25 18:43:54 EEST 2001 Pekka Riikonen + + * Do not add TCP_NODELAY flag if the operating system + does not have it defined. Affected files are + lib/silcutil/[unix/win32]/silc[unix/win32]net.c. + Wed Jul 25 16:04:35 EEST 2001 Pekka Riikonen * Do not enable SILC_THREADS if the linking with libpthread diff --git a/lib/silcutil/unix/silcunixnet.c b/lib/silcutil/unix/silcunixnet.c index de1b1e33..217b4bd0 100644 --- a/lib/silcutil/unix/silcunixnet.c +++ b/lib/silcutil/unix/silcunixnet.c @@ -136,7 +136,9 @@ int silc_net_create_connection(int port, char *host) } /* Set appropriate options */ +#if defined(TCP_NODELAY) silc_net_set_socket_opt(sock, IPPROTO_TCP, TCP_NODELAY, 1); +#endif silc_net_set_socket_opt(sock, SOL_SOCKET, SO_KEEPALIVE, 1); SILC_LOG_DEBUG(("Connection created")); @@ -193,7 +195,9 @@ int silc_net_create_connection_async(int port, char *host) } /* Set appropriate options */ +#if defined(TCP_NODELAY) silc_net_set_socket_opt(sock, IPPROTO_TCP, TCP_NODELAY, 1); +#endif silc_net_set_socket_opt(sock, SOL_SOCKET, SO_KEEPALIVE, 1); SILC_LOG_DEBUG(("Connection operation in progress")); diff --git a/lib/silcutil/win32/silcwin32net.c b/lib/silcutil/win32/silcwin32net.c index 98b80a19..2e1338a1 100644 --- a/lib/silcutil/win32/silcwin32net.c +++ b/lib/silcutil/win32/silcwin32net.c @@ -139,7 +139,9 @@ int silc_net_create_connection(int port, char *host) } /* Set appropriate options */ +#if defined(TCP_NODELAY) silc_net_set_socket_opt(sock, IPPROTO_TCP, TCP_NODELAY, 1); +#endif silc_net_set_socket_opt(sock, SOL_SOCKET, SO_KEEPALIVE, 1); SILC_LOG_DEBUG(("Connection created")); @@ -196,7 +198,9 @@ int silc_net_create_connection_async(int port, char *host) silc_net_set_socket_nonblock(sock); /* Set appropriate options */ +#if defined(TCP_NODELAY) silc_net_set_socket_opt(sock, IPPROTO_TCP, TCP_NODELAY, 1); +#endif silc_net_set_socket_opt(sock, SOL_SOCKET, SO_KEEPALIVE, 1); SILC_LOG_DEBUG(("Connection created"));