public function handleData($socket, $data)
    {
        try
        {
            $this->component->handleMessage($socket->conn, new NetworkMessage($data));
        }
        catch (Error $ex)
        {
            $this->handleError($socket, $ex);
        }
        catch (Exception $ex)
        {
            $this->handleError($socket, $ex);
        }
    }
public function handleData($socket, $data)
    {
        try
        {
            $this->component->handleMessage($socket->conn, new NetworkMessage($data));
        }
        catch (Error $ex)
        {
            $this->handleError($socket, $ex);
        }
        catch (Exception $ex)
        {
            $this->handleError($socket, $ex);
        }
    }
public function handleData ( $ socket , $ data ) { try { $ this -> component -> handleMessage ( $ socket -> conn , new NetworkMessage ( $ data ) ) ; } catch ( Error $ ex ) { $ this -> handleError ( $ socket , $ ex ) ; } catch ( Exception $ ex ) { $ this -> handleError ( $ socket , $ ex ) ; } }
Handler triggered when a new data is received from existing connection.

@param SocketInterface $socket
@param mixed $data
Handler triggered when a new data is received from existing connection .