noccylabs/react-sse (0.1.0)
Published 2026-03-01 00:12:54 +00:00 by noccy
Installation
{
"repositories": [{
"type": "composer",
"url": " "
}
]
}composer require noccylabs/react-sse:0.1.0About this package
Server-Sent Events with ReactPHP
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.
Dependencies
Dependencies
| ID | Version |
|---|---|
| react/http | ^1.11 |
| react/stream | ^1.4 |