This commit is contained in:
2021-09-10 10:50:56 +08:00
parent f217a14f23
commit 1db221c771
5 changed files with 10 additions and 10 deletions
+3 -3
View File
@@ -17,13 +17,13 @@ class WebSocketEmitter implements Emitter
/**
* @param mixed $response
* @param ResponseInterface|\Server\Message\Response $emitter
* @param ResponseInterface|\Protocol\Message\Response $emitter
* @throws Exception
*/
public function sender(mixed $response, ResponseInterface|\Server\Message\Response $emitter): void
public function sender(mixed $response, ResponseInterface|\Protocol\Message\Response $emitter): void
{
$server = Kiri::getDi()->get(ServerManager::class)->getServer();
$server->push($response->fd, $emitter->getBody());
$server->push($response->fd, $emitter->getBody()->getContents());
}
}