Net_Socket::getStatus()

Net_Socket::getStatus() – retrieve information about a connection

Synopsis

require_once 'Net/Socket.php';

array Net_Socket::getStatus ( )

Description

Returns information about an existing socket resource.

Return value

array - the data as array or a PEAR_Error

The content of the array is:

  • boolean 'timed_out' - the socket timed out waiting for data

  • boolean 'blocked' - blocking mode

  • boolean 'eof' - indicates EOF event

  • integer 'unread_bytes' - number of bytes left in the socket buffer

Throws

Possible PEAR_Error values
Error code Error message Reason Solution
NULL "not connected" There is no open connection. You must establish a connection before ( Net_Socket::connect()).

Note

This function can not be called statically.

retrieve a string (Previous) check for blocking mode (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.