src/Socket/Enhanced/Server.php
function onMessage($client_id, $data) {
        if (!is_null($callback = $_SESSION['lock'])) {
            is_callable($callback) && $callback($client_id, $data);
            return;
        }
        $path = $method = null;
        if (is_callable($callback = $this->_on_business_message))
            $this->_router->requestData = $callback($client_id, $data, $path, $method);
        $this->_router->client_id = $client_id;
        $this->_router->locate($path ?? [], $method ?? Router::DEFAULT_METHOD);
    }
function onMessage($client_id, $data) {
        if (!is_null($callback = $_SESSION['lock'])) {
            is_callable($callback) && $callback($client_id, $data);
            return;
        }
        $path = $method = null;
        if (is_callable($callback = $this->_on_business_message))
            $this->_router->requestData = $callback($client_id, $data, $path, $method);
        $this->_router->client_id = $client_id;
        $this->_router->locate($path ?? [], $method ?? Router::DEFAULT_METHOD);
    }
收到请求回调

@param string $client_id
@param string $data