diff options
| author | Thijs Schreijer <thijs@thijsschreijer.nl> | 2026-08-31 22:27:42 +0200 |
|---|---|---|
| committer | Thijs Schreijer <thijs@thijsschreijer.nl> | 2026-09-01 07:59:54 +0200 |
| commit | cd6b41a13af403d32e08ff416e60982b5cb718dc (patch) | |
| tree | 3865d91753fd636a866d4711f50ab27613e58634 /samples/README | |
| parent | c5f169ec303a70707bc48fbece9b52cc90a48de0 (diff) | |
| download | luasocket-feat/sse.tar.gz luasocket-feat/sse.tar.bz2 luasocket-feat/sse.zip | |
Add SSE sink (socket.sse module)feat/sse
Implements SSE by using the replacement body sink. Replaces
the sink with an SSE parser if the response is a text stream.
Example application included
Diffstat (limited to 'samples/README')
| -rw-r--r-- | samples/README | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/samples/README b/samples/README index 4ee06b6..5fff925 100644 --- a/samples/README +++ b/samples/README | |||
| @@ -104,6 +104,15 @@ Unix machines. It uses the lp.lua implementation, in the | |||
| 104 | samples directory. Just run 'lua lpr.lua <filename> | 104 | samples directory. Just run 'lua lpr.lua <filename> |
| 105 | queue=<printername>' and the file will print! | 105 | queue=<printername>' and the file will print! |
| 106 | 106 | ||
| 107 | sse.lua -- Server-Sent Events (SSE) client | ||
| 108 | |||
| 109 | This little program uses socket.sse to connect to a text/event-stream | ||
| 110 | URL and print each event received, stopping after a fixed number of | ||
| 111 | them (5 by default). With no arguments it connects to a public live | ||
| 112 | test feed, so you can try it with no setup at all. Just run | ||
| 113 | |||
| 114 | lua sse.lua [<url>] [<event-count>] | ||
| 115 | |||
| 107 | cddb.lua -- CDDB client | 116 | cddb.lua -- CDDB client |
| 108 | 117 | ||
| 109 | This is the first try on a simple CDDB client. Not really | 118 | This is the first try on a simple CDDB client. Not really |
