React Server-Sent Events
This is a library to send SSE events to a browser using ReactPHP.
Usage
- When receiving a request, create a new
NoccyLabs\React\Sse\EventSourceobject. - Return the
ResponseInterfaceobject from$es->response()to the client. - Send your events using
$es->sendMessage()and$es->sendEvent(). - Use
$es->close()to terminate the connection. - Listen for the
closeevent to know when it it time to discard the instance.
Description
Languages
PHP
100%