Explicit SSE close (sse.close)

Demonstrates ending a Server-Sent Events stream explicitly with $sse->close(reason => ...) rather than by returning from the handler.

pagi-server --app examples/sse-close/app.pl --port 5000
# then open http://localhost:5000/

The page opens an EventSource to /jobs. The server streams four progress events, then a done sentinel, then calls close(reason => 'job_complete').

What it shows:

See PAGI::Tools::Cookbook ("Closing an SSE stream, and recording why") and PAGI::Spec::Www ("Close SSE - send event").