diff --git a/eio/httpun_ws_eio.ml b/eio/httpun_ws_eio.ml index 42c404cf..e2023dca 100644 --- a/eio/httpun_ws_eio.ml +++ b/eio/httpun_ws_eio.ml @@ -4,13 +4,8 @@ let sha1 s = |> Digestif.SHA1.to_raw_string module Server = struct - (* TODO: should this error handler be a websocket error handler or an HTTP - * error handler?*) let create_connection_handler - ?(config = Httpun.Config.default) - ?error_handler - ~sw - websocket_handler = + ?(config = Httpun.Config.default) ?error_handler ~sw websocket_handler = fun client_addr socket -> let connection = Httpun_ws.Server_connection.create diff --git a/eio/httpun_ws_eio.mli b/eio/httpun_ws_eio.mli index 0c12aacd..6e714622 100644 --- a/eio/httpun_ws_eio.mli +++ b/eio/httpun_ws_eio.mli @@ -1,10 +1,9 @@ open Httpun_ws module Server : sig - val create_connection_handler - : ?config : Httpun.Config.t - -> ?error_handler : (Eio.Net.Sockaddr.stream -> Httpun.Server_connection.error_handler) + : ?config: Httpun.Config.t + -> ?error_handler: (Eio.Net.Sockaddr.stream -> Httpun.Server_connection.error_handler) -> sw:Eio.Switch.t -> (Eio.Net.Sockaddr.stream -> Wsd.t -> Websocket_connection.input_handlers) -> (Eio.Net.Sockaddr.stream -> _ Eio.Net.stream_socket -> unit) @@ -15,14 +14,14 @@ module Client : sig (* Perform HTTP/1.1 handshake and upgrade to WS. *) val connect - : ?config : Httpun.Config.t - -> sw : Eio.Switch.t - -> nonce : string - -> host : string - -> port : int - -> resource : string - -> error_handler : (Client_connection.error -> unit) - -> websocket_handler : (Wsd.t -> Websocket_connection.input_handlers) + : ?config:Httpun.Config.t + -> sw:Eio.Switch.t + -> nonce:string + -> host:string + -> port:int + -> resource:string + -> error_handler:(Client_connection.error -> unit) + -> websocket_handler:(Wsd.t -> Websocket_connection.input_handlers) -> Eio_unix.Net.stream_socket_ty Eio.Net.stream_socket -> t