PHP Класс Thruway\Peer\Client

Наследование: extends Thruway\Peer\AbstractPeer, implements Evenement\EventEmitterInterface, use trait Evenement\EventEmitterTrait
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$session Thruway\ClientSession

Открытые методы

Метод Описание
__construct ( string $realm, React\EventLoop\LoopInterface $loop = null ) Constructor
__toString ( ) : string
addClientAuthenticator ( Thruway\Authentication\ClientAuthenticationInterface $ca ) Add client authenticator
addRole ( AbstractRole $role ) : Client Add role
addTransportProvider ( Thruway\Transport\ClientTransportProviderInterface $transportProvider ) Add transport provider
getAuthId ( ) : string Get authenticate ID
getAuthMethods ( ) : array Get list authenticate methods
getCallee ( ) : Callee Get callee
getCaller ( ) : Caller Get caller
getLoop ( ) : React\EventLoop\LoopInterface Get loop
getPublisher ( ) : Publisher Get publisher
getRealm ( ) : string
getRoleInfoObject ( ) : object
getRoles ( ) : array Get list roles
getSession ( ) : ClientSession Get client session
getSubscriber ( ) : Subscriber Get subscriber
onClose ( mixed $reason ) Handle close session
onMessage ( Thruway\Transport\TransportInterface $transport, Thruway\Message\Message $msg ) Handle process message
onOpen ( Thruway\Transport\TransportInterface $transport ) Handle open transport
onSessionEnd ( ClientSession $session ) Handle end session
onSessionStart ( ClientSession $session, Thruway\Transport\TransportInterface $transport ) This is meant to be overridden so that the client can do its thing
processAbort ( ClientSession $session, Thruway\Message\AbortMessage $msg )
processChallenge ( ClientSession $session, Thruway\Message\ChallengeMessage $msg ) Handle process challenge message
processGoodbye ( ClientSession $session, Thruway\Message\GoodbyeMessage $msg ) Handle process goodbye message
processOther ( ClientSession $session, Thruway\Message\Message $msg ) Handle process other Message
processWelcome ( ClientSession $session, Thruway\Message\WelcomeMessage $msg ) Process Welcome message
retryConnection ( ) Retry connecting to the transport
setAttemptRetry ( boolean $attemptRetry ) Set attempt retry
setAuthId ( string $authId ) Set authenticate ID
setAuthMethods ( array $authMethods ) Set list authenticate methods
setLoop ( React\EventLoop\LoopInterface $loop )
setReconnectOptions ( array $reconnectOptions ) Set reconnect options
start ( boolean $startLoop = true ) Start the transport
startSession ( ClientSession $session ) Start client session

Описание методов

__construct() публичный Метод

Constructor
public __construct ( string $realm, React\EventLoop\LoopInterface $loop = null )
$realm string
$loop React\EventLoop\LoopInterface

__toString() публичный Метод

public __toString ( ) : string
Результат string

addClientAuthenticator() публичный Метод

Add client authenticator
public addClientAuthenticator ( Thruway\Authentication\ClientAuthenticationInterface $ca )
$ca Thruway\Authentication\ClientAuthenticationInterface

addRole() публичный Метод

Add role
public addRole ( AbstractRole $role ) : Client
$role Thruway\Role\AbstractRole
Результат Client

addTransportProvider() публичный Метод

Add transport provider
public addTransportProvider ( Thruway\Transport\ClientTransportProviderInterface $transportProvider )
$transportProvider Thruway\Transport\ClientTransportProviderInterface

getAuthId() публичный Метод

Get authenticate ID
public getAuthId ( ) : string
Результат string

getAuthMethods() публичный Метод

Get list authenticate methods
public getAuthMethods ( ) : array
Результат array

getCallee() публичный Метод

Get callee
public getCallee ( ) : Callee
Результат Thruway\Role\Callee

getCaller() публичный Метод

Get caller
public getCaller ( ) : Caller
Результат Thruway\Role\Caller

getLoop() публичный Метод

Get loop
public getLoop ( ) : React\EventLoop\LoopInterface
Результат React\EventLoop\LoopInterface

getPublisher() публичный Метод

Get publisher
public getPublisher ( ) : Publisher
Результат Thruway\Role\Publisher

getRealm() публичный Метод

public getRealm ( ) : string
Результат string

getRoleInfoObject() публичный Метод

public getRoleInfoObject ( ) : object
Результат object

getRoles() публичный Метод

Get list roles
public getRoles ( ) : array
Результат array

getSession() публичный Метод

Get client session
public getSession ( ) : ClientSession
Результат Thruway\ClientSession

getSubscriber() публичный Метод

Get subscriber
public getSubscriber ( ) : Subscriber
Результат Thruway\Role\Subscriber

onClose() публичный Метод

Handle close session
public onClose ( mixed $reason )
$reason mixed

onMessage() публичный Метод

Handle process message
public onMessage ( Thruway\Transport\TransportInterface $transport, Thruway\Message\Message $msg )
$transport Thruway\Transport\TransportInterface
$msg Thruway\Message\Message

onOpen() публичный Метод

Handle open transport
public onOpen ( Thruway\Transport\TransportInterface $transport )
$transport Thruway\Transport\TransportInterface

onSessionEnd() публичный Метод

Handle end session
public onSessionEnd ( ClientSession $session )
$session Thruway\ClientSession

onSessionStart() публичный Метод

This is meant to be overridden so that the client can do its thing
public onSessionStart ( ClientSession $session, Thruway\Transport\TransportInterface $transport )
$session Thruway\ClientSession
$transport Thruway\Transport\TransportInterface

processAbort() публичный Метод

public processAbort ( ClientSession $session, Thruway\Message\AbortMessage $msg )
$session Thruway\ClientSession
$msg Thruway\Message\AbortMessage

processChallenge() публичный Метод

Handle process challenge message
public processChallenge ( ClientSession $session, Thruway\Message\ChallengeMessage $msg )
$session Thruway\ClientSession
$msg Thruway\Message\ChallengeMessage

processGoodbye() публичный Метод

Handle process goodbye message
public processGoodbye ( ClientSession $session, Thruway\Message\GoodbyeMessage $msg )
$session Thruway\ClientSession
$msg Thruway\Message\GoodbyeMessage

processOther() публичный Метод

Handle process other Message
public processOther ( ClientSession $session, Thruway\Message\Message $msg )
$session Thruway\ClientSession
$msg Thruway\Message\Message

processWelcome() публичный Метод

Process Welcome message
public processWelcome ( ClientSession $session, Thruway\Message\WelcomeMessage $msg )
$session Thruway\ClientSession
$msg Thruway\Message\WelcomeMessage

retryConnection() публичный Метод

Retry connecting to the transport
public retryConnection ( )

setAttemptRetry() публичный Метод

Set attempt retry
public setAttemptRetry ( boolean $attemptRetry )
$attemptRetry boolean

setAuthId() публичный Метод

Set authenticate ID
public setAuthId ( string $authId )
$authId string

setAuthMethods() публичный Метод

Set list authenticate methods
public setAuthMethods ( array $authMethods )
$authMethods array

setLoop() публичный Метод

public setLoop ( React\EventLoop\LoopInterface $loop )
$loop React\EventLoop\LoopInterface

setReconnectOptions() публичный Метод

Set reconnect options
public setReconnectOptions ( array $reconnectOptions )
$reconnectOptions array

start() публичный Метод

Start the transport
public start ( boolean $startLoop = true )
$startLoop boolean

startSession() публичный Метод

Start client session
public startSession ( ClientSession $session )
$session Thruway\ClientSession

Описание свойств

$session защищенное свойство

protected ClientSession,Thruway $session
Результат Thruway\ClientSession