Свойство | Тип | Описание | |
---|---|---|---|
$connected | boolean | Note, the connection may not be ready to use, but the socket is connected at least. See $handshaked, and other properties in subclasses. | |
$context | Stream context | ||
$firstRead | boolean | Whether the current read is the first one to the socket | |
$name | string | The socket name according to stream_socket_get_name | |
$socket | resource |
Метод | Описание | |
---|---|---|
disconnect ( ) : void | Disconnect the socket | |
getIp ( ) : string | Gets the IP address of the socket | |
getLastError ( ) : integer | string | Get the last error that occurred on the socket | |
getNamePart ( string $name, $part ) : string | Gets part of the name of the socket | |
getPort ( ) : string | Gets the port of the socket | |
getResource ( ) | ||
getResourceId ( ) | ||
isConnected ( ) : boolean | Whether the socket is currently connected | |
receive ( integer $length = self::DEFAULT_RECEIVE_LENGTH ) : string | Receive data from the socket | |
send ( string $data ) : boolean | integer |
Метод | Описание | |
---|---|---|
configure ( array $options ) : void | Configure options | |
getName ( ) : string | Gets the name of the socket |
public getLastError ( ) : integer | string | ||
Результат | integer | string |
public static getNamePart ( string $name, $part ) : string | ||
$name | string | (from $this->getName() usually) |
Результат | string |
public isConnected ( ) : boolean | ||
Результат | boolean |
protected bool $connected | ||
Результат | boolean |
protected bool $firstRead | ||
Результат | boolean |
protected string $name | ||
Результат | string |