GET-SOCKET-OPTION( ) method
- Last Updated: January 18, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
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
|
- name
- A character expression indicating the name of the socket option
to be retrieved. The following table describes the options ABL supports.
Table 1. 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:
- The value of name is not an ABL-supported socket option
- Getting the socket option fails