socket_get_status
array socket_get_status(resource socket_descriptor)
Gets information about an open socket descriptor.
Returns:
Array containing information on the socket; NULL on error
Description:
socket_get_status() is used to retrieve status information on a socket descriptor returned by fsockopen() or pfsockopen(). The information is returned in a four-element associative array with the elements described in the following table.
Key | Value |
---|---|
blocked | Boolean TRUE if the socket is in blocking mode; FALSE if the socket is in non-blocking mode |
eof | Boolean TRUE if an EOF was encountered; FALSE otherwise |
timed_out | Boolean TRUE if the connection is timed out; FALSE otherwise |
unread_bytes | Integer value indicating the number of bytes left in the ... |
Get PHP Functions Essential Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.