GET-SOCKET-OPTION( ) method

Returns a comma separated string containing values appropriate for the specified socket option. Otherwise, it returns the Unknown value (?).

Return type: CHARACTER

Applies to: Socket object handle

Syntax

GET-SOCKET-OPTION ( name )
name
A character expression indicating the name of the socket option to be retrieved. The following table describes the options ABL supports.
Options for GET-SOCKET-OPTION( )
Option Value returned
TCP-NODELAY An enable indicator, which is either TRUE or FALSE.
SO-LINGER Two comma separated values:
  • The onoff indicator, which is either TRUE or FALSE.
  • The linger time. If the onoff indicator is FALSE, the linger time does not need to be provided.
SO-KEEPALIVE TRUE if the option is on; FALSE otherwise.The default depends on how the socket object was created:
  • For socket objects created using CREATE SOCKET, the default is off.
  • For socket objects created by ABL and passed as a parameter to the event-procedure context, the default is on.
SO-REUSEADDR TRUE if the option is on; FALSE otherwise.The default depends on the platform.
SO-RCVBUF An integer that indicates the size of the receive buffer.The default depends on the platform.
SO-SNDBUF An integer that indicates the size of the send buffer.The default depends on the platform.
SO-RCVTIMEO The timeout length—that is, the number of seconds you want the socket to wait for expected data before timing out.The default is -1, which tells the socket to wait forever.
Note: The timeout length is not guaranteed to be precise to the second.

This method returns option-specific data if the retrieval of the option succeeded and the Unknown value (?) otherwise. An error can occur if: