PHP Интерфейс Thruway\Peer\RouterInterface

Наследование: extends Thruway\Peer\PeerInterface
Показать файл Открыть проект Примеры использования интерфейса

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

Метод Описание
addInternalClient ( Thruway\Peer\ClientInterface $client ) Add a client that uses the internal transport provider
createNewSession ( Thruway\Transport\TransportInterface $transport ) : Session
getAuthenticationManager ( ) : Thruway\Authentication\AuthenticationManagerInterface Get authentication manager
getEventDispatcher ( ) : EventDispatcher
getRealmManager ( ) : RealmManager Get realm manager
getSessionBySessionId ( integer $sessionId ) : Session | boolean Get session by session ID
onClose ( Thruway\Transport\TransportInterface $transport ) Handle close session
onMessage ( Thruway\Transport\TransportInterface $transport, Thruway\Message\Message $msg ) : mixed Handle process message
setAuthenticationManager ( Thruway\Authentication\AuthenticationManagerInterface $authenticationManager ) Set authentication manager
start ( ) Start the transport
stop ( boolean $gracefully = true ) This is to stop the router.

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

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

Add a client that uses the internal transport provider
public addInternalClient ( Thruway\Peer\ClientInterface $client )
$client Thruway\Peer\ClientInterface

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

public createNewSession ( Thruway\Transport\TransportInterface $transport ) : Session
$transport Thruway\Transport\TransportInterface
Результат Thruway\Session

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

Get authentication manager
public getAuthenticationManager ( ) : Thruway\Authentication\AuthenticationManagerInterface
Результат Thruway\Authentication\AuthenticationManagerInterface

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

public getEventDispatcher ( ) : EventDispatcher
Результат Thruway\Event\EventDispatcher

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

Get realm manager
public getRealmManager ( ) : RealmManager
Результат Thruway\RealmManager

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

Get session by session ID
public getSessionBySessionId ( integer $sessionId ) : Session | boolean
$sessionId integer
Результат Thruway\Session | boolean

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

Handle close session
public onClose ( Thruway\Transport\TransportInterface $transport )
$transport Thruway\Transport\TransportInterface

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

Handle process message
public onMessage ( Thruway\Transport\TransportInterface $transport, Thruway\Message\Message $msg ) : mixed
$transport Thruway\Transport\TransportInterface
$msg Thruway\Message\Message
Результат mixed

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

Set authentication manager
public setAuthenticationManager ( Thruway\Authentication\AuthenticationManagerInterface $authenticationManager )
$authenticationManager Thruway\Authentication\AuthenticationManagerInterface

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

Start the transport
public start ( )

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

Note that this should bring down all connections and timers associated with the router which will cause the loop to exit once there is nothing being watched. If there are other things added to the loop through clients or otherwise, the loop will continue running.
public stop ( boolean $gracefully = true )
$gracefully boolean