Documentation
¶
Overview ¶
This example shows how to use Server Sent Events (SSE) with Huma to send messages to a client over a long-lived connection.
# Connect and start getting messages curl localhost:8888/sse
You can connect an arbitrary number of clients in many tabs/terminals and they will all receive the same data from a single producer on the server. Disconnect (Ctrl-C) & reconnect to continue the sequence.
/--> channel -> Client 1 Producer -> SSE message -> channel -> Client 2 \--> channel -> Client 3
Click to show internal directories.
Click to hide internal directories.