It is not recommend that you disable the Nagle algorithm by
specifying the INET_OPTION_NODELAY flag unless it is absolutely
required. Doing so can have a significant, negative impact on the
performance of the application and network.
If if the INET_OPTION_KEEPALIVE option is enabled, keep-alive
packets will start being generated five seconds after the socket has
become idle with no data being sent or received. Enabling this option
can be used by applications to detect when a physical network
connection has been lost. However, it is recommended that most
applications query the remote host directly to determine if the
connection is still active. This is typically accomplished by sending
specific commands to the server to query its status, or checking the
elapsed time since the last response from the server.