craff
10b64c2a16
put back active_connections
2021-12-11 23:50:06 -10:00
craff
b539b4f9ba
timout using socket options
2021-12-11 23:48:27 -10:00
Simon Cruanes
89344f46f0
feat(server-sent): add a close() function
2021-12-11 10:01:55 -05:00
Simon Cruanes
dc72dad5db
revert: remove timeout handling for now
...
This reverts commit 6536bfeeb3 .
2021-12-11 09:32:55 -05:00
Simon Cruanes
f316e66c15
switch from "available" to "active" connections
2021-12-11 09:10:29 -05:00
craff
97eeaf96dc
make accessible to the end user the number of available connections
2021-12-08 17:54:08 -10:00
Christophe Raffalli
024a774f39
Update src/Tiny_httpd.mli
...
Co-authored-by: Simon Cruanes <simon.cruanes.2007@m4x.org>
2021-12-08 16:25:07 -10:00
craff
4c7d27dadd
Added a max_keep_alive and moved to a non blocking reading of request not to loose connection slot.
...
Default is max_keep_alive = -1.0 which keeps the original behaviour.
2021-12-08 11:46:01 -10:00
Simon Cruanes
a58372b9a7
add a @since
2021-09-25 15:35:57 -04:00
Yawar Amin
ce61ac2afd
feat: allow socket activation
...
This enables passing in an existing socket e.g. from systemd,[1] instead
of creating a new socket when running the server.
[1] https://github.com/juergenhoetzel/ocaml-systemd
2021-09-25 01:41:32 -04:00
Simon Cruanes
9961bd1b29
prepare for 0.9
2021-07-18 00:07:43 -04:00
Simon Cruanes
95d9bd10ef
fix: do not set content-length for server-sent events
2021-07-17 22:09:45 -04:00
Simon Cruanes
62d583553e
allow extra headers in server-sent events
2021-07-17 22:09:45 -04:00
Simon Cruanes
17d8f37c93
feat: remove async for now, finish server sent events
2021-07-17 22:09:45 -04:00
Simon Cruanes
2e0f08366f
wip: feat: server-sent events, and asynchronous handlers
2021-07-16 01:12:39 -04:00
Simon Cruanes
91e9323671
doc
2021-07-15 23:47:31 -04:00
Simon Cruanes
70f1205880
doc: fix examples
2020-12-08 00:26:08 -05:00
Simon Cruanes
e267838d23
fix doc
2020-11-17 14:32:45 -05:00
Simon Cruanes
a35b063d41
prepare for 0.7
2020-11-17 10:45:13 -05:00
Simon Cruanes
2a955bcbb4
feat: add rest_of_path_urlencoded and rename rest to rest_of_path
2020-11-17 10:43:05 -05:00
Simon Cruanes
2ed9131bdc
feat: add Route.rest to match the rest of the path
2020-11-17 09:16:28 -05:00
Simon Cruanes
aa66e172e8
feat: printing routes
2020-08-04 19:16:15 -04:00
Simon Cruanes
a679ddf1d1
style
2020-08-03 21:40:42 -04:00
Simon Cruanes
13dca59afd
fix doc
2020-05-28 21:23:10 -04:00
Simon Cruanes
3ac5510e2d
prepare for 0.6
2020-05-28 21:20:09 -04:00
Simon Cruanes
b640c0da30
feat: add Route.t construct, deprecate scanf, add more structured path
...
- Request now contains a path split into components
- Request now contains the query part already transformed into an assoc list
- Route.t uses a simple GADT for mapping `/`-split paths into routes,
passing some components of type string or int to the handler
- deprecate scanf-based routing, as being too error prone
2020-05-27 19:56:23 -04:00
Simon Cruanes
1d309abca6
prepare for 0.5
2020-03-25 23:26:03 -04:00
Simon Cruanes
2435e33df4
feat: expose Headers.empty
2020-03-25 23:23:06 -04:00
Simon Cruanes
59829264a5
wip: zlib bridge library
2020-03-25 23:23:06 -04:00
Simon Cruanes
995aee8489
prepare for 0.4
2020-02-08 09:38:50 -06:00
Simon Cruanes
130608d924
feat: easy accessor to the query parameters in path
2019-12-09 14:28:57 -06:00
Simon Cruanes
948b5e6389
test: add a unit test for parsing http req
2019-12-03 17:32:12 -06:00
Simon Cruanes
21e0c18069
prepare for 0.3
2019-12-02 21:19:19 -06:00
Simon Cruanes
45bc589e00
feat: allow handlers to take streams
...
close #9
2019-12-02 21:15:13 -06:00
Simon Cruanes
98642811bc
feat: autodetect ipv6 address
2019-11-26 18:09:46 -06:00
Simon Cruanes
b7e458c0c4
feat: support ipv6 address
2019-11-26 18:02:18 -06:00
Simon Cruanes
3e28be80ec
doc: harmonize section headers in docs
2019-11-25 21:06:27 -06:00
Simon Cruanes
20275c164f
improve docs and opam, tidy up for 0.1; rename stream
2019-11-18 23:18:46 -06:00
Simon Cruanes
8bfcf3673a
feat: add host field to request
2019-11-18 23:04:23 -06:00
Simon Cruanes
3ac031b367
feat: add semaphore to limit number of simultaneous connections
2019-11-18 22:44:08 -06:00
Simon Cruanes
046ac43bac
doc: proper titles
2019-11-18 22:13:35 -06:00
Simon Cruanes
2024d2d1c2
update doc
2019-11-18 22:09:31 -06:00
Simon Cruanes
95248a132c
add more doc
2019-11-18 22:03:01 -06:00
Simon Cruanes
9c84f95e12
feat: simplify type of streams
2019-11-18 19:06:12 -06:00
Simon Cruanes
3245647dc9
improve API for tiny_httpd
2019-11-18 19:06:12 -06:00
Simon Cruanes
989971bb04
feat: use rust-like streams, much better
2019-11-18 19:06:12 -06:00
Simon Cruanes
8ba3c823c2
refactor API for streams, heavy bugfixing
2019-11-17 21:44:37 -06:00
Simon Cruanes
939b183a50
wip: new IO API with streams
2019-11-17 19:10:49 -06:00
Simon Cruanes
76408b7e39
wip: IO streams
2019-11-17 17:40:26 -06:00
Simon Cruanes
7f68812312
feat: allow delete and use it in http_of_dir
2019-11-17 17:15:52 -06:00