Files
kiri-core/Server/Constrict/WebSocketEmitter.php
T
2021-08-12 15:08:46 +08:00

28 lines
494 B
PHP

<?php
namespace Server\Constrict;
use Kiri\Exception\NotFindClassException;
use Server\ResponseInterface;
/**
*
*/
class WebSocketEmitter implements Emitter
{
/**
* @param mixed $response
* @param ResponseInterface $emitter
* @throws NotFindClassException
* @throws \ReflectionException
* @throws \Exception
*/
public function sender(mixed $response, ResponseInterface $emitter): void
{
$response->push($emitter->getClientId(), $emitter->getContent()->getData());
}
}