examples/tcp_proxy_example.php
protected function requestWrite(WebSocketTransportInterface $user, $message)
    {
        $stream = $this->getStream($user, $message->connection);

        if($stream){
            $this->logger->notice(sprintf("User %s writes %d bytes to connection %s", $user->getId(), strlen($message->data), $message->connection));
            $stream->write($message->data);
        }
    }
protected function requestWrite(WebSocketTransportInterface $user, $message)
    {
        $stream = $this->getStream($user, $message->connection);

        if($stream){
            $this->logger->notice(sprintf("User %s writes %d bytes to connection %s", $user->getId(), strlen($message->data), $message->connection));
            $stream->write($message->data);
        }
    }
protected function requestWrite ( WebSocketTransportInterface $ user , $ message ) { $ stream = $ this -> getStream ( $ user , $ message -> connection ) ; if ( $ stream ) { $ this -> logger -> notice ( sprintf ( "User %s writes %d bytes to connection %s" , $ user -> getId ( ) , strlen ( $ message -> data ) , $ message -> connection ) ) ; $ stream -> write ( $ message -> data ) ; } }
Forward data send by the user over the specified TCP stream

@param WebSocketTransportInterface $user
@param $message
Forward data send by the user over the specified TCP stream