Thruway\ClientSession::setSessionId PHP Method

setSessionId() public method

public setSessionId ( integer $sessionId )
$sessionId integer
    public function setSessionId($sessionId)
    {
        $this->sessionId = $sessionId;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Process Welcome message
  *
  * @param \Thruway\ClientSession $session
  * @param \Thruway\Message\WelcomeMessage $msg
  */
 public function processWelcome(ClientSession $session, WelcomeMessage $msg)
 {
     Logger::info($this, "We have been welcomed...");
     //TODO: I'm sure that there are some other things that we need to do here
     $session->setSessionId($msg->getSessionId());
     $this->emit('open', [$session, $this->transport, $msg->getDetails()]);
     $session->setState(Session::STATE_UP);
 }