You are here

function Net_Socket::getStatus in Flickr API 5

Returns information about an existing socket resource. Currently returns four entries in the result array:

<p> timed_out (bool) - The socket timed out waiting for data<br> blocked (bool) - The socket was blocked<br> eof (bool) - Indicates EOF event<br> unread_bytes (int) - Number of bytes left in the socket buffer<br> </p>

@access public

Return value

mixed Array containing information about existing socket resource or an error object otherwise

File

phpFlickr/PEAR/Net/Socket.php, line 231

Class

Net_Socket
Generalized Socket class.

Code

function getStatus() {
  if (!is_resource($this->fp)) {
    return $this
      ->raiseError('not connected');
  }
  return socket_get_status($this->fp);
}