PHP 인터페이스 Thruway\Peer\RouterInterface

상속: extends Thruway\Peer\PeerInterface
파일 보기 프로젝트 열기: voryx/thruway 0 사용 예제들

공개 메소드들

메소드 설명
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