Instance methods
getPeerName 
Answers the socket address of the peer socket. 
The getPeerName operation retrieves a socket address from the peer socket connected to the receiver. 
Note:
The getPeerName operation operates only on connected sockets. 
The 
getPeerName operation is unsuccesful if any of the following errors occur: ENOTINITIALISED, ENETDOWN, EBADF, ENOTSOCK, ENOTCONN, EINPROGRESS. For detailed information on these errors, see 
Error values. 
getSockName 
Answers the current socket address for the receiver (socket). 
The getSockName operation retrieves the locally bound socket name (address etc.) of the receiver. Typically used to get the local address when a connect is done without doing a bind first. 
The 
getSockName operation is unsuccesful if any of the following errors occur: ENOTINITIALISED, ENETDOWN, EBADF, ENOTSOCK, ENOBUFS, EINPROGRESS, EINVAL. For detailed information on these errors, see 
Error values. 
getSockOpt: optionName 
Answers socket option information for the receiver. 
optionName 
Specifies the name of the option for which information is to be retrieved. Currently only socket level options are supported. The available options are platform and operating system specific. The names that are typically supported options are: 
SODEBUG 
Specifies the recording of debugging information. This option enables or disables debugging in the underlying protocol modules. 
SOACCEPTCONN 
Has a listen call. 
SOBROADCAST 
Specifies whether transmission of broadcast messages is supported. The option enables or disables broadcast support. 
SOREUSEADDR 
Specifies that the rules used in validating addresses supplied by a bind operation should allow reuse of local addresses. This option enables or disables reuse of local addresses. 
SOKEEPALIVE 
Keeps connections active. Enables or disables the periodic transmission of messages on a connected socket. 
SODONTROUTE 
Indicates outgoing messages should bypass the standard routing facilities. Does not apply routing on outgoing messages. Directs messages to the appropriate network interface according to the network portion of the destination address. This option enables or disables routing of outgoing messages. 
SOLINGER 
Lingers on a close operation if data is present. This option controls the action taken when an unsent messages queue exists for a socket, and a process performs a close subroutine on the socket. 
SODONTLINGER 
If the SOLINGER option is set, the system blocks the process during the close operation until it can transmit the data or until the time expires. If the SOLINGER option is not specified, and a close operation is issued, the system handles the call in a way that allows the process to continue as quickly as possible. 
SOSNDBUF 
Retrieves buffer-size information. 
SORCVBUF 
Retrieves buffer-size information. 
SOERROR 
Retrieves information about error status and clears. 
SOTYPE 
Retrieves information about a socket type. 
The operation answers a Boolean for the following options: SOACCEPTCONN, SOBROADCAST, SODEBUG, SODONTLINGER, SODONTROUTE, SOKEEPALIVE, SOREUSEADDR 
The operation answers an integer for the following options. SOERROR, SORCVBUF, SOSNDBUF, SOTYPE 
The operation answers a two entry array for the SOLINGER option. The first entry is a Boolean and the second is an integer. The first entry is true if SOLINGER is enabled and false if SOLINGER is disabled. If SOLINGER is enabled the second entry is the timeout interval in microseconds. If SOLINGER is disabled the second entry is undefined. 
The 
getSockOpt: operation is unsucessful if any of the following errors occur: ENOTINITIALISED, ENETDOWN, EBADF, ENOTSOCK, ENOPROTOPT, EINPROGRESS. For detailed information on these errors, see 
Error values. 
setSockOpt: optionName optionValue: optionValue 
Sets socket options. 
The setSockOpt operation is used to set options associated with the receiver (socket). Currently only socket level options are supported. 
optionName 
The parameter optionName specifies the option. The following options are typically supported by an operating system implementation: 
SODEBUG 
Turns on recording of debugging information. This option enables or disables debugging in the underlying protocol modules. 
SOREUSEADDR 
Specifies that the rules used in validating addresses supplied by a bind operation should allow reuse of local addresses. 
SOKEEPALIVE 
Keeps connections active. Enables the periodic transmission of messages on a connected socket. 
SODONTROUTE 
Does not apply routing on outgoing messages. Indicates that outgoing messages should bypass the standard routing facilities. Instead, they are directed to the appropriate network interface according to the network portion of the destination address. 
SOBROADCAST 
Permits sending of broadcast messages. 
SOLINGER 
Enables lingering on a close operation if data is present. This option controls the action taken when an unsent messages queue exists for a socket, and a process performs a close operation. 
The SOLINGER option is a two entry array where the first entry is a boolean and the second is an integer. 
SODONTLINGER 
Disables lingering on a close operation if data is present. This option controls the action taken when an unsent messages queue exists for a socket, and a process performs a close operation. 
SOSNDBUF 
Sets send buffer size. 
SORCVBUF 
Sets receive buffer size. 
optionValue 
Depending on the optionName parameter, the parameter optionValue is either a Boolean, and array, or an integer. For the following options, optionValue is a Boolean: 
SODEBUG, SOREUSEADDR, SOKEEPALIVE, SODONTROUTE, and SOBROADCAST. 
For the following options, optionValue is a an Integer: 
SOSNDBUF and SORCVBUF 
For option SODONTLINGER the optionValue is unspecified. 
The 
setSockOpt: optionName optionValue: optionValue operation is unsucessful if any of the following errors occur: ENOTINITIALISED, ENETDOWN, EFAULT, ENETRESET, ENOTCONN, EINPROGRESS, EBADF, ENOTSOCK, ENOPROTOOPT. For detailed information on these errors, see 
Error values. 
shutDown: mode 
Shuts down all socket send and receive operations. 
mode 
Specifies the type of the shutDown: operation. Use the following values: 
0 
To disable further receive operations. 
1 
To disable further send operations. 
2 
To disable further send operations and receive operations. 
Note:
Caution - on some platforms, performing a send on a socket that has been shut down can cause an operating system failure. 
The 
shutDown: mode operation is unsucessful if any of the following errors occur: ENOTINITIALISED, ENETDOWN, EINVAL, EINPROGRESS, ENOTCONN, EBADF, ENOTSOCK. For detailed information on these errors, see 
Error values.