public function onMessage(ConnectionInterface $from, $message)
    {
        $incoming_client = $this->clients->findByConnection($from);

        if ($incoming_client) {
            // Handle session.
            // $incoming_client->session_manager->handle();

            // Handle message.
            $message = new Message($message);

            // Fire the event.
            Event::fire(new MessageReceived($this->server, $this->clients, $incoming_client, $message));
        }
    }
public function onMessage(ConnectionInterface $from, $message)
    {
        $incoming_client = $this->clients->findByConnection($from);

        if ($incoming_client) {
            // Handle session.
            // $incoming_client->session_manager->handle();

            // Handle message.
            $message = new Message($message);

            // Fire the event.
            Event::fire(new MessageReceived($this->server, $this->clients, $incoming_client, $message));
        }
    }
public function onMessage ( ConnectionInterface $ from , $ message ) { $ incoming_client = $ this -> clients -> findByConnection ( $ from ) ; if ( $ incoming_client ) { // Handle session. // $incoming_client->session_manager->handle(); // Handle message. $ message = new Message ( $ message ) ; // Fire the event. Event :: fire ( new MessageReceived ( $ this -> server , $ this -> clients , $ incoming_client , $ message ) ) ; } }
Incoming message.
Incoming message .