PHP Class Kraken\Ipc\Zmq\ZmqSocket

Inheritance: extends Kraken\Event\BaseEventEmitter
Show file Open project: kraken-php/framework Class Usage Examples

Public Properties

Property Type Description
$closed boolean
$fd resource

Public Methods

Method Description
__call ( string $method, mixed[] $args ) : mixed
__construct ( ZMQSocket $socket, Kraken\Loop\LoopInterface $loop )
attachReadListener ( ) Attach read listener.
close ( ) Close connection and discard not sent data.
end ( ) Deactivate socket, wait to complete sending all unfinished data, then close connection.
getWrappedSocket ( ) : ZMQSocket Return socket.
handleEvent ( ) Handle ZMQ Event.
handleReadEvent ( ) Handle ZMQ Read Event.
send ( string $message ) Send message.
subscribe ( mixed $channel ) Subscribe socket to channel.
unsubscribe ( mixed $channel ) Unsubscribe socket from channel.

Method Details

__call() public method

public __call ( string $method, mixed[] $args ) : mixed
$method string
$args mixed[]
return mixed

__construct() public method

public __construct ( ZMQSocket $socket, Kraken\Loop\LoopInterface $loop )
$socket ZMQSocket
$loop Kraken\Loop\LoopInterface

attachReadListener() public method

Attach read listener.
public attachReadListener ( )

close() public method

Close connection and discard not sent data.
public close ( )

end() public method

Deactivate socket, wait to complete sending all unfinished data, then close connection.
public end ( )

getWrappedSocket() public method

Return socket.
public getWrappedSocket ( ) : ZMQSocket
return ZMQSocket

handleEvent() public method

Handle ZMQ Event.
public handleEvent ( )

handleReadEvent() public method

Handle ZMQ Read Event.
public handleReadEvent ( )

send() public method

Send message.
public send ( string $message )
$message string

subscribe() public method

Subscribe socket to channel.
public subscribe ( mixed $channel )
$channel mixed

unsubscribe() public method

Unsubscribe socket from channel.
public unsubscribe ( mixed $channel )
$channel mixed

Property Details

$closed public property

public bool $closed
return boolean

$fd public property

public resource $fd
return resource