Information

socket_get_option($r, $i1, $i2) gets the value of socket option $i2 on the protocol level $i1 for socket $r. For more information, refer to socket_set_option ().

socket_cmsg_space($i1, $i2) calculates the message buffer size for type $i2 on protocol level $i1.

socket_getpeername($r, &$s [,&$i]) retrieves the address and port of the remote side of the socket $r and stores them in $s and $i respectively. TRUE is returned on success and FALSE on failure.

socket_getsockname($r, &$s [,&$i]) retrieves the address and port of the local side of the socket $r and stores them in $s and $i respectively. TRUE is returned on success and FALSE on failure.

socket_last_error
([$r]) returns the last error on the socket $r as an integer. socket_strerror($i) returns a string describing an error integer.

socket_clear_error([$r]) clears the error on the socket $r or the last error code.