PHP 클래스 Predis\Connection\StreamConnection

The connection parameters supported by this class are:. - scheme: it can be either 'redis', 'tcp', 'rediss', 'tls' or 'unix'. - host: hostname or IP address of the server. - port: TCP port of the server. - path: path of a UNIX domain socket when scheme is 'unix'. - timeout: timeout to perform the connection (default is 5 seconds). - read_write_timeout: timeout of read / write operations. - async_connect: performs the connection asynchronously. - tcp_nodelay: enables or disables Nagle's algorithm for coalescing. - persistent: the connection is left intact after a GC collection. - ssl: context options array (see http://php.net/manual/en/context.ssl.php)
저자: Daniele Alessandri ([email protected])
상속: extends AbstractConnection
파일 보기 프로젝트 열기: nrk/predis 1 사용 예제들

공개 메소드들

메소드 설명
__destruct ( ) Disconnects from the server and destroys the underlying resource when the garbage collector kicks in only if the connection has not been marked as persistent.
connect ( )
disconnect ( )
read ( )
writeRequest ( Predis\Command\CommandInterface $command )

보호된 메소드들

메소드 설명
assertParameters ( Predis\Connection\ParametersInterface $parameters )
assertSslSupport ( Predis\Connection\ParametersInterface $parameters ) Checks needed conditions for SSL-encrypted connections.
createResource ( )
createStreamSocket ( Predis\Connection\ParametersInterface $parameters, string $address, integer $flags ) : resource Creates a connected stream socket resource.
tcpStreamInitializer ( Predis\Connection\ParametersInterface $parameters ) : resource Initializes a TCP stream resource.
tlsStreamInitializer ( Predis\Connection\ParametersInterface $parameters ) : resource Initializes a SSL-encrypted TCP stream resource.
unixStreamInitializer ( Predis\Connection\ParametersInterface $parameters ) : resource Initializes a UNIX stream resource.
write ( string $buffer ) Performs a write operation over the stream of the buffer containing a command serialized with the Redis wire protocol.

메소드 상세

__destruct() 공개 메소드

Disconnects from the server and destroys the underlying resource when the garbage collector kicks in only if the connection has not been marked as persistent.
public __destruct ( )

assertParameters() 보호된 메소드

protected assertParameters ( Predis\Connection\ParametersInterface $parameters )
$parameters Predis\Connection\ParametersInterface

assertSslSupport() 보호된 메소드

Checks needed conditions for SSL-encrypted connections.
protected assertSslSupport ( Predis\Connection\ParametersInterface $parameters )
$parameters Predis\Connection\ParametersInterface Initialization parameters for the connection.

connect() 공개 메소드

public connect ( )

createResource() 보호된 메소드

protected createResource ( )

createStreamSocket() 보호된 메소드

Creates a connected stream socket resource.
protected createStreamSocket ( Predis\Connection\ParametersInterface $parameters, string $address, integer $flags ) : resource
$parameters Predis\Connection\ParametersInterface Connection parameters.
$address string Address for stream_socket_client().
$flags integer Flags for stream_socket_client().
리턴 resource

disconnect() 공개 메소드

public disconnect ( )

read() 공개 메소드

public read ( )

tcpStreamInitializer() 보호된 메소드

Initializes a TCP stream resource.
protected tcpStreamInitializer ( Predis\Connection\ParametersInterface $parameters ) : resource
$parameters Predis\Connection\ParametersInterface Initialization parameters for the connection.
리턴 resource

tlsStreamInitializer() 보호된 메소드

Initializes a SSL-encrypted TCP stream resource.
protected tlsStreamInitializer ( Predis\Connection\ParametersInterface $parameters ) : resource
$parameters Predis\Connection\ParametersInterface Initialization parameters for the connection.
리턴 resource

unixStreamInitializer() 보호된 메소드

Initializes a UNIX stream resource.
protected unixStreamInitializer ( Predis\Connection\ParametersInterface $parameters ) : resource
$parameters Predis\Connection\ParametersInterface Initialization parameters for the connection.
리턴 resource

write() 보호된 메소드

Performs a write operation over the stream of the buffer containing a command serialized with the Redis wire protocol.
protected write ( string $buffer )
$buffer string Representation of a command in the Redis wire protocol.

writeRequest() 공개 메소드

public writeRequest ( Predis\Command\CommandInterface $command )
$command Predis\Command\CommandInterface