From 6e89600888000294437160ebac84620ef084c1be Mon Sep 17 00:00:00 2001 From: mefyl Date: Mon, 12 Jun 2023 23:48:20 +0200 Subject: [PATCH] Cohttp_eio: Relax requirement on Server.connection_handler. Server.connection_handler does not rely on its argument being a socket, a two way flow is sufficient. Relaxing the type constraint enables eg. unit testing with in-memory buffer. --- cohttp-eio/src/cohttp_eio.mli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cohttp-eio/src/cohttp_eio.mli b/cohttp-eio/src/cohttp_eio.mli index 307cb1099..4ade2d9c1 100644 --- a/cohttp-eio/src/cohttp_eio.mli +++ b/cohttp-eio/src/cohttp_eio.mli @@ -107,7 +107,7 @@ module Server : sig val connection_handler : handler -> #Eio.Time.clock -> - #Eio.Net.stream_socket -> + #Eio.Flow.two_way -> Eio.Net.Sockaddr.stream -> unit (** [connection_handler request_handler] is a connection handler, suitable for