GET-SOCKET-OPTION( ) Method
If TRUE, returns a comma separated string containing values appropriate for the socket option specified; otherwise, 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. Table D–5 describes the options Progress supports.
Table D–5: Options For GET-SOCKET-OPTION()
Option
|
Value Returned
|
TCP-NODELAY
|
TRUE if the enable indicator is on; FALSE otherwise.
|
SO-LINGER
|
Two values: the onoff indicator followed by the linger time.
|
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 Progress and passed as a parameter to the event-procedure context, the default is on.
|
SO-RESUEADDR
|
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 time-out 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 time-out 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:
- name is not a Progress-supported socket option.
- Getting the socket option fails.