src/Socket/Server.php
function onMessage(TcpConnection $connection, $data) {
        $this->_router->connection = $this->_connection = $connection;
        if (!is_null($callback = $connection->lock)) {
            is_callable($callback) && $callback($connection, $data);
            return;
        }
        $path = $method = null;
        if (is_callable($callback = $this->_on_message))
            $this->_router->requestData = $callback($connection, $data, $path, $method);
        $this->_router->locate($path ?? [], $method ?? Router::DEFAULT_METHOD);
    }
function onMessage(TcpConnection $connection, $data) {
        $this->_router->connection = $this->_connection = $connection;
        if (!is_null($callback = $connection->lock)) {
            is_callable($callback) && $callback($connection, $data);
            return;
        }
        $path = $method = null;
        if (is_callable($callback = $this->_on_message))
            $this->_router->requestData = $callback($connection, $data, $path, $method);
        $this->_router->locate($path ?? [], $method ?? Router::DEFAULT_METHOD);
    }
{@inheritdoc}