PHP 클래스 Disque\Connection\Socket

상속: extends Disque\Connection\BaseConnection, implements Disque\Connection\ConnectionInterface
파일 보기 프로젝트 열기: mariano/disque-php

보호된 프로퍼티들

프로퍼티 타입 설명
$socket resource Socket handle

공개 메소드들

메소드 설명
connect ( $connectionTimeout, $responseTimeout = null )
disconnect ( )
execute ( Disque\Command\CommandInterface $command )
isConnected ( )
receive ( boolean $keepWaiting = false ) : mixed Read data from connection
send ( string $data ) Execute a command on the connection

보호된 메소드들

메소드 설명
getSocket ( string $host, integer $port, float $timeout ) : resource Build actual socket

비공개 메소드들

메소드 설명
getData ( ) : string Get a line of data
getType ( boolean $keepWaiting = false ) : string Get the first byte from Disque, which contains the data type
shouldBeConnected ( ) : void We should be connected

메소드 상세

connect() 공개 메소드

public connect ( $connectionTimeout, $responseTimeout = null )

disconnect() 공개 메소드

public disconnect ( )

execute() 공개 메소드

public execute ( Disque\Command\CommandInterface $command )
$command Disque\Command\CommandInterface

getSocket() 보호된 메소드

Build actual socket
protected getSocket ( string $host, integer $port, float $timeout ) : resource
$host string Host
$port integer Port
$timeout float Timeout
리턴 resource Socket

isConnected() 공개 메소드

public isConnected ( )

receive() 공개 메소드

Read data from connection
public receive ( boolean $keepWaiting = false ) : mixed
$keepWaiting boolean If `true`, timeouts on stream read will be ignored
리턴 mixed Data received

send() 공개 메소드

Execute a command on the connection
public send ( string $data )
$data string Data to send

프로퍼티 상세

$socket 보호되어 있는 프로퍼티

Socket handle
protected resource $socket
리턴 resource