NoccyLabs

NoccyLabs develops open source libraries and software. With many projects ongoing, this organization contains public content repositories, as well as software and components considered stable.

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.0

About 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

  1. When receiving a request, create a new NoccyLabs\React\Sse\EventSource object.
  2. Return the ResponseInterface object from $es->response() to the client.
  3. Send your events using $es->sendMessage() and $es->sendEvent().
  4. Use $es->close() to terminate the connection.
  5. Listen for the close event to know when it it time to discard the instance.

Dependencies

Dependencies

ID Version
react/http ^1.11
react/stream ^1.4
Details
Composer
2026-03-01 00:12:54 +00:00
1
Christopher Vagnetoft
GPL-2.0-or-later
12 KiB
Assets (1)
Versions (1) View all
0.1.0 2026-03-01