Simon Cruanes
cfa5d660a0
example: add super stupid http auth endpoints to echo.ml
...
the endpoint /protected requires user:foobar login to see the content.
2022-04-11 22:24:09 -04:00
Simon Cruanes
dc0a1f08ac
perf: add a buffer pool to reuse buffers, make ~buf mandatory
...
no more allocation of new buffers for each small thing, new request,
etc. Instead we keep a pool of buffers and use a weak form of RAII to
make sure we recycle them once done.
- add `with_alloc_buf` for the user to do so
- add `alloc_buf_for_stream` to tie buffer's lifetime to a byte
stream, typically for a streaming response.
2022-04-11 22:24:09 -04:00
Simon Cruanes
0b3af5cd6e
feat(echo): add a /quit POST endpoint to terminate
2022-04-11 22:24:08 -04:00
Simon Cruanes
326e1e2abd
echo: add --pool-size param
2022-03-31 21:28:26 -04:00
Simon Cruanes
700f42a4d1
example(echo): add --pool option to use a thread pool
2022-03-31 21:28:26 -04:00
Simon Cruanes
6706589c62
increase test coverage to include vfs and <pre>
2022-03-17 22:35:13 -04:00
Simon Cruanes
533a42a661
details
2022-03-16 20:40:38 -04:00
Simon Cruanes
759995b9d5
add a VFS in examples/echo.ml
2022-03-03 22:14:44 -05:00
craff
51be9c0c8f
real fix in echo!
2021-12-15 20:19:42 -10:00
craff
ffc18a5617
fix in echo
2021-12-15 20:13:32 -10:00
craff
672e33c827
detailed time in echo example
2021-12-15 18:18:52 -10:00
craff
4770e3e729
Timing start of request
2021-12-15 18:14:17 -10:00
Simon Cruanes
7685505f28
example: update echo to provide a /stats/ endpoint using a middleware
2021-12-15 16:27:28 -05:00
Simon Cruanes
ba31534551
feat: pass buf_size in many places, set default buf_size to 16kb
2021-12-12 17:06:46 -05:00
Simon Cruanes
c8982c8836
move echo from src/examples/ to examples/
2021-12-11 10:02:24 -05:00