NAME

PAGI::Nano::Context::SSE - The SSE context vended by PAGI::Nano

DESCRIPTION

A subclass of PAGI::Context::SSE (so $c->sse and the full SSE API are available) that also mixes in PAGI::Nano::Context, giving SSE handlers $c->uri_for for link generation.

METHODS

raw_send

my $send = $c->raw_send;
await $send->({ type => 'sse.send', ... });

The raw PAGI $send coderef for this connection, inherited from "raw_send" in PAGI::Context. On the SSE context this matters: $c->send is overridden with the sse.send convenience, so a handler that needs to emit a custom event type (or otherwise speak the channel protocol directly) reaches for raw_send to bypass the override. See examples/custom-send-events for a content-negotiated SSE/NDJSON renderer built on it.

SEE ALSO

PAGI::Nano, PAGI::Nano::Context, PAGI::Context::SSE.

AUTHOR

John Napiorkowski <jjnapiork@cpan.org>

COPYRIGHT & LICENSE

Copyright 2026, John Napiorkowski. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.