| iMatix home page | << | < | > | >> |
![]() Version 1.91 |
#include "sflsock.h" int socket_nodelay ( sock_t handle)
Disables Nagle's algorithm for the specified socket; use this when you want to ensure that data is sent outwards as fast as possible, and when you are certain that Nagle's algorithm is causing a slowdown in performance. Recommended for HTTP, but not recommended for telnet. Returns 0 if okay, SOCKET_ERROR if there was a problem.
{ #if (defined (TCP_NODELAY)) int true_value = 1; /* Boolean value for setsockopt() */ return (setsockopt ((SOCKET) handle, SOL_SOCKET, TCP_NODELAY, (char *) &true_value, sizeof (true_value))); #else return (0); /* Not applicable to this system */ #endif }
| << | < | > | >> |
![]() |