diff --git a/src/WebSocket/Application/WsAppContext.php b/src/WebSocket/Application/WsAppContext.php index b8164c75..d407d3db 100644 --- a/src/WebSocket/Application/WsAppContext.php +++ b/src/WebSocket/Application/WsAppContext.php @@ -55,7 +55,7 @@ public function pushSelf(mixed ...$args): bool return $this->pushTo($this->getFd(), ...$args); } - public function pushSelfRaw(string $data): bool + public function pushRawSelf(string $data): bool { return $this->pushRawTo($this->getFd(), $data); } diff --git a/src/WebSocket/Middleware/WebSocketRoutingMiddleware.php b/src/WebSocket/Middleware/WebSocketRoutingMiddleware.php index 3717bb87..4502a101 100644 --- a/src/WebSocket/Middleware/WebSocketRoutingMiddleware.php +++ b/src/WebSocket/Middleware/WebSocketRoutingMiddleware.php @@ -43,7 +43,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface throw new \InvalidArgumentException(static::class . ' must use on websocket environment.'); } - $request = $this->handleByClient($request); + $request = $this->handleByParser($request); $route = $request->getRequestTarget(); $matched = $router->match($request, $route); @@ -83,7 +83,7 @@ function (WsAppContext $context) use ($request, $controller, $matched) { ); } - protected function handleByClient(WebSocketRequestInterface $request): WebSocketRequestInterface + protected function handleByParser(WebSocketRequestInterface $request): WebSocketRequestInterface { return $this->app->getParser()->handleRequest($request); }