PHP 클래스 lithium\net\socket\Context

상속: extends lithium\net\Socket
파일 보기 프로젝트 열기: unionofrad/lithium 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_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