PHP 클래스 Thruway\ClientSession

상속: extends AbstractSession
파일 보기 프로젝트 열기: voryx/thruway 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Thruway\Transport\TransportInterface $transport, Thruway\Peer\ClientInterface $peer ) Constructor
call ( string $procedureName, array | mixed $arguments = null, array | mixed $argumentsKw = null, array | mixed $options = null ) : Promise Call
close ( ) Close client session TODO: Need to send goodbye message
onClose ( ) Handle on close client session
publish ( string $topicName, array | mixed $arguments = null, array | mixed $argumentsKw = null, array | mixed $options = null ) : Promise Publish
register ( string $procedureName, callable $callback, array | mixed $options = null ) : Promise Register
sendMessage ( Thruway\Message\Message $msg ) : mixed | void
setSessionId ( integer $sessionId )
subscribe ( string $topicName, callable $callback, $options = null ) : Promise Subscribe
unregister ( string $procedureName ) : Promise | FALSE Unregister

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( Thruway\Transport\TransportInterface $transport, Thruway\Peer\ClientInterface $peer )
$transport Thruway\Transport\TransportInterface
$peer Thruway\Peer\ClientInterface

call() 공개 메소드

Call
public call ( string $procedureName, array | mixed $arguments = null, array | mixed $argumentsKw = null, array | mixed $options = null ) : Promise
$procedureName string
$arguments array | mixed
$argumentsKw array | mixed
$options array | mixed
리턴 React\Promise\Promise

close() 공개 메소드

Close client session TODO: Need to send goodbye message
public close ( )

onClose() 공개 메소드

Handle on close client session
public onClose ( )

publish() 공개 메소드

Publish
public publish ( string $topicName, array | mixed $arguments = null, array | mixed $argumentsKw = null, array | mixed $options = null ) : Promise
$topicName string
$arguments array | mixed
$argumentsKw array | mixed
$options array | mixed
리턴 React\Promise\Promise

register() 공개 메소드

Register
public register ( string $procedureName, callable $callback, array | mixed $options = null ) : Promise
$procedureName string
$callback callable
$options array | mixed
리턴 React\Promise\Promise

sendMessage() 공개 메소드

public sendMessage ( Thruway\Message\Message $msg ) : mixed | void
$msg Thruway\Message\Message
리턴 mixed | void

setSessionId() 공개 메소드

public setSessionId ( integer $sessionId )
$sessionId integer

subscribe() 공개 메소드

Subscribe
public subscribe ( string $topicName, callable $callback, $options = null ) : Promise
$topicName string
$callback callable
$options array
리턴 React\Promise\Promise

unregister() 공개 메소드

Unregister
public unregister ( string $procedureName ) : Promise | FALSE
$procedureName string
리턴 React\Promise\Promise | FALSE