User`s guide
KwikNet TCP/IP Sockets
K
A
DAK
189
Non-Standard Socket Options
The non-standard option SO_NONBLOCK can be used to set a socket into non-blocking
mode so that the socket user will not be forced to wait if a requested operation cannot be
completed at the time of the request. It can also be used to restore a socket to blocking
mode so that the socket user will be forced to wait until the requested operation
completes. This option's integer parameter is non-zero for non-blocking mode or zero for
blocking mode.
TCP Protocol Options
Option TCP_NODELAY can be used to adjust the way the TCP protocol sends data.
Normally, data is allowed to collect in the socket until a reasonable packet of data can be
delivered to the peer. The data threshold is determined by the receive window size
announced by the peer. This throttling mechanism assures reasonable delivery times
without large numbers of small packets. The TCP_NODELAY option can be used to
override this mechanism and force data to be sent whenever it is available.
Option TCP_NOPUSH can be used to prevent the setting of the TCP push flag PSH when
data is transmitted. In this case, the data will not be pushed up to the receiving
application just because the sender is unable to provide data fast enough to keep the data
stream filled.
Option TCP_MAXSEG can be used to determine the socket's maximum segment size (MSS)
for transmission.