Свойство | Тип | Описание | |
---|---|---|---|
$error | string | Error encountered on the socket. | |
$error_str | string | Error encountered on the socket. |
Свойство | Тип | Описание | |
---|---|---|---|
$_read_attempted | integer | Read Attempts | |
$_read_buffer | string | null | Read Buffer | |
$_socket | resource | Socket that is connected. |
Метод | Описание | |
---|---|---|
__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. |
Метод | Описание | |
---|---|---|
_connect ( ) : void | Establishes the socket connection. |
public __construct ( resource $socket ) : void | ||
$socket | resource | Socket connection. |
Результат | void |
public disconnect ( ) : event\Disconnect | ||
Результат | event\Disconnect |
public flush_read_buffer ( ) : void | ||
Результат | void |
public get_address ( ) : string | null | ||
Результат | string | null |
public get_resource ( ) : resource | ||
Результат | resource |
public is_connected ( ) : boolean | ||
Результат | boolean |
protected resource $_socket | ||
Результат | resource |
public string $error_str | ||
Результат | string |