Commit graph

21 commits

Author SHA1 Message Date
Simon Cruanes
f10992ec32
feat WS: abstraction for critical section
Some checks failed
github pages / deploy (push) Has been cancelled
build / build (4.08.x, ubuntu-latest) (push) Has been cancelled
build / build (4.14.x, ubuntu-latest) (push) Has been cancelled
build / build (5.03.x, ubuntu-latest) (push) Has been cancelled
can be replaced with a proper cooperative lock
2025-06-20 18:03:40 -04:00
Simon Cruanes
284d1f7400
add optional middlewares to tiny_httpd_ws 2024-04-15 12:11:46 -04:00
Simon Cruanes
19554068b5
feat ws: expose Close_connection 2024-04-05 16:14:23 -04:00
Simon Cruanes
e4303b2fd4
remove debug messages 2024-04-05 13:49:10 -04:00
Simon Cruanes
3393c13c00
fix websocket: properly remember the offset in current frame
not doing so means we always unmask from offset 0, which means we might
use the wrong index in the mask if we do, say, `read()=3` followed by
another read: the second one would start from mask[0] instead of
mask[3], producing raw unfiltered garbage.
2024-04-05 13:21:54 -04:00
Simon Cruanes
5301ed40ea
fix websocket: read 16-bit length as unsigned 2024-04-04 22:11:08 -04:00
Simon Cruanes
7c765a181d
remove dead code 2024-04-04 16:27:06 -04:00
Simon Cruanes
dbd00259da
feat ws: a bit of cleanup, expose masking primitive 2024-04-04 15:54:55 -04:00
Simon Cruanes
d8ff243e8d
feat ws: pass the whole request to the handler 2024-04-02 14:35:57 -04:00
Simon Cruanes
4b845bf019
debug in websocket 2024-04-02 14:10:16 -04:00
Simon Cruanes
fe9596f4fe
fix ws: missing flush 2024-03-12 10:39:38 -04:00
Simon Cruanes
adf4c6815f
finish refactor 2024-02-26 15:48:10 -05:00
Simon Cruanes
22f158ccd8
fix websocket 2024-02-26 14:06:01 -05:00
Simon Cruanes
d9a2f6e85f
feat: expose Tiny_httpd_ws.upgrade 2024-02-05 10:44:00 -05:00
Simon Cruanes
1a45961443
chore: turn tiny_httpd_ws into tiny_httpd.ws, a sub-lib
now that there's no additional dep it's not a problem!
2024-02-05 10:36:55 -05:00
Simon Cruanes
78baf70126
add basic C stubs for unmasking client frames 2024-02-05 01:29:31 -05:00
Simon Cruanes
7eaaf432e4
compat fix 2024-02-05 01:10:23 -05:00
Simon Cruanes
4dce594c32
remove deps of tiny_httpd_ws
vendoring dbuenzli's code is neat!
2024-02-05 01:07:34 -05:00
Simon Cruanes
a405fb046d
expose client address to websocket 2024-02-05 01:07:34 -05:00
Simon Cruanes
e1f2edb0ab
feat: first draft of the websocket library 2024-02-05 01:06:37 -05:00
Simon Cruanes
fd772bc023
wip: add websocket library 2024-02-05 01:06:37 -05:00