PHP Класс Resque\Socket\Client

Автор: Michael Haynes ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$hostname string The client's hostname, as seen by the server. This variable is only set after calling lookup_hostname, as hostname lookups can take up a decent amount of time.
$ip The client's IP address, as seen by the server
$port If given, this will hold the port associated to address
$socket The client's socket resource, for sending and receiving data with

Открытые методы

Метод Описание
__construct ( resource &$socket ) Creates the client
__toString ( ) : string String representation of the client
disconnect ( ) Closes the socket
getHostname ( ) : string Gets the IP hostname
getSocket ( ) : socket Returns this clients socket

Описание методов

__construct() публичный метод

Creates the client
public __construct ( resource &$socket )
$socket resource The resource of the socket the client is connecting by, generally the master socket.

__toString() публичный метод

String representation of the client
public __toString ( ) : string
Результат string

disconnect() публичный метод

Closes the socket
public disconnect ( )

getHostname() публичный метод

Gets the IP hostname
public getHostname ( ) : string
Результат string

getSocket() публичный метод

Returns this clients socket
public getSocket ( ) : socket
Результат socket

Описание свойств

$hostname защищенное свойство

The client's hostname, as seen by the server. This variable is only set after calling lookup_hostname, as hostname lookups can take up a decent amount of time.
protected string $hostname
Результат string

$ip защищенное свойство

The client's IP address, as seen by the server
protected $ip

$port защищенное свойство

If given, this will hold the port associated to address
protected $port

$socket защищенное свойство

The client's socket resource, for sending and receiving data with
protected $socket