KEEPALIVEOPTIONS Statement

Use the KEEPALIVEOPTIONS statement to specify the operating parameters of the TCP/IP keep-alive mechanism. The parameters apply to all TCP connections for which keep-alive has been activated, through either the setsockopt() call of the C socket interface or the TcpOption call of the Pascal interface.

Read syntax diagramSkip visual syntax diagram KEEPALIVEOPTIONS INTERVAL 120INTERVAL  minutesSENDGARBAGE FALSESENDGARBAGETRUE ENDKEEPALIVEOPTIONS

Operands

INTERVAL minutes
The number of minutes TCP/IP waits after last receiving a packet for a TCP connection before it sends a keep-alive packet for it. The default is 120 minutes (2 hours).
SENDGARBAGE
Specifies whether the keep-alive packets sent by TCP/IP contain one byte of random data.
FALSE
The keep-alive packet will not contain random data. This is the default.
TRUE
The keep-alive packet will contain one byte of random data and an invalid sequence number, assuring that the data is not accepted by the remote TCP/IP.

Usage Notes

  • Some hosts cannot properly respond to keep-alive packets containing no data. If your network includes such hosts, set the SENDGARBAGE parameter to TRUE.
  • The ENDKEEPALIVEOPTIONS statement specifies the end of the KEEPALIVEOPTIONS information. If it is omitted, subsequent entries will generate error messages.