Property | Type | Description | |
---|---|---|---|
$error | string | Error encountered on the socket. | |
$error_str | string | Error encountered on the socket. |
Property | Type | Description | |
---|---|---|---|
$_read_attempted | integer | Read Attempts | |
$_read_buffer | string | null | Read Buffer | |
$_socket | resource | Socket that is connected. |
Method | Description | |
---|---|---|
__construct ( resource $socket ) : void | Constructs a new connection. | |
_read_buffer ( integer $length = XPSPL_SOCKET_READ_LENGTH, integer $flags = MSG_DONTWAIT ) : string | Reads the given length of data from the socket into the read buffer. | |
disconnect ( ) : event\Disconnect | Send the signal to disconnect this socket. | |
flush_read_buffer ( ) : void | Flushes the read buffer. | |
get_address ( ) : string | null | Returns the address of the socket. | |
get_resource ( ) : resource | Returns the socket resource. | |
is_connected ( ) : boolean | Returns if the socket is currently connected. | |
read ( $length = XPSPL_SOCKET_READ_LENGTH, $start ) : void | Read data from the socket. | |
write ( string $string, integer $flags = null ) : integer | boolean | Writes data to the socket. |
Method | Description | |
---|---|---|
_connect ( ) : void | Establishes the socket connection. |
public __construct ( resource $socket ) : void | ||
$socket | resource | Socket connection. |
return | void |
public disconnect ( ) : event\Disconnect | ||
return | event\Disconnect |
public flush_read_buffer ( ) : void | ||
return | void |
public get_address ( ) : string | null | ||
return | string | null |
public get_resource ( ) : resource | ||
return | resource |
public is_connected ( ) : boolean | ||
return | boolean |
protected resource $_socket | ||
return | resource |
public string $error_str | ||
return | string |