$connected
$connected : boolean
Is there an active connection?
Utility interface for establishing a stream socket client.
__construct(string $host, integer $port = null, integer $timeout = 30, mixed $secure = false, array $context = array(), array $params = array())
Constructor.
string | $host | Hostname of remote server (can contain protocol prefx). |
integer | $port | Port number of remote server. |
integer | $timeout | Connection timeout (in seconds). |
mixed | $secure | Security layer requested. One of:
|
array | $context | Any context parameters passed to stream_create_context(). |
array | $params | Additional options. |
getStatus() : array
Returns information about the connection.
Currently returns four entries in the result array:
Information about existing socket resource.