Thruway\Transport\RawSocketClientTransportProvider::handleConnection PHP Метод

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

Handle process on open new connection
public handleConnection ( Stream $conn )
$conn React\Stream\Stream
    public function handleConnection(Stream $conn)
    {
        //$this->getManager()->debug("Raw socket opened");
        $this->transport = new RawSocketTransport($conn, $this->loop, $this->client);
        $this->transport->setSerializer(new JsonSerializer());
        $this->transport->on('message', function ($transport, $msg) {
            $this->client->onMessage($transport, $msg);
        });
        $this->client->onOpen($this->transport);
    }