PHP Класс lithium\net\socket\Context

Наследование: extends lithium\net\Socket
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$_content string Content of the stream
$_timeout integer Connection timeout value.

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

Метод Описание
__construct ( array $config = [] ) : void Constructor.
close ( ) : boolean Closes the socket connection.
encoding ( string $charset = null ) : boolean Sets the encoding of the socket connection. Does not apply to this implementation.
eof ( ) : boolean End of file test for this socket connection. Does not apply to this implementation.
open ( array $options = [] ) : mixed Opens the socket and sets its timeout value.
read ( ) : boolean | string Reads from the socket. Does not apply to this implementation.
timeout ( integer $time = null ) : booelan Sets the timeout on the socket *connection*.
write ( string $data = null ) : boolean Writes to the socket.

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

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

Constructor.
public __construct ( array $config = [] ) : void
$config array Available configuration options are: - `'mode'` _string_ - `'message'` _object_
Результат void

close() публичный Метод

Closes the socket connection.
public close ( ) : boolean
Результат boolean Success.

encoding() публичный Метод

Sets the encoding of the socket connection. Does not apply to this implementation.
public encoding ( string $charset = null ) : boolean
$charset string The character set to use.
Результат boolean `true` if encoding has been set, `false` otherwise.

eof() публичный Метод

End of file test for this socket connection. Does not apply to this implementation.
public eof ( ) : boolean
Результат boolean Success.

open() публичный Метод

Opens the socket and sets its timeout value.
public open ( array $options = [] ) : mixed
$options array Update the config settings.
Результат mixed Returns `false` if the socket configuration does not contain the `'scheme'` or `'host'` settings, or if configuration fails, otherwise returns a resource stream.

read() публичный Метод

Reads from the socket. Does not apply to this implementation.
public read ( ) : boolean | string
Результат boolean | string

timeout() публичный Метод

Sets the timeout on the socket *connection*.
public timeout ( integer $time = null ) : booelan
$time integer Seconds after the connection times out.
Результат booelan `true` if timeout has been set, `false` otherwise.

write() публичный Метод

Writes to the socket.
public write ( string $data = null ) : boolean
$data string Data to write.
Результат boolean Success

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

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

Content of the stream
protected string $_content
Результат string

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

Connection timeout value.
protected int $_timeout
Результат integer