Thruway\Peer\Client::onOpen PHP Method

onOpen() public method

Handle open transport
public onOpen ( Thruway\Transport\TransportInterface $transport )
$transport Thruway\Transport\TransportInterface
    public function onOpen(TransportInterface $transport)
    {
        $this->retryTimer = 0;
        $this->retryAttempts = 0;
        $this->transport = $transport;
        $session = new ClientSession($transport, $this);
        $this->session = $session;
        $session->setLoop($this->getLoop());
        $session->setState(Session::STATE_DOWN);
        $this->startSession($session);
    }