package async_rpc_websocket
Module Rpc.TransportSource
These functions are similar to the handler and server function in the parent module. The difference is that the caller of these functions is expected to construct (and also close) their own Rpc.Connection.t from the given transport (which will itself be closed after the callback returns).
This module is analogous to Async.Rpc.Transport.Tcp.
Source
type callback =
Async.Socket.Address.Inet.t ->
Cohttp.Request.t ->
Async_rpc_kernel.Async_rpc_kernel_private.Transport.t ->
unit Async.Deferred.tSource
val handler :
?http_handler:('connection -> http_handler) ->
?should_process_request:should_process_request ->
callback ->
'connection ->
raw_http_handlerSource
val serve :
where_to_listen:(Async.Socket.Address.Inet.t, 'l) Async.Tcp.Where_to_listen.t ->
?http_handler:(unit -> http_handler) ->
?should_process_request:should_process_request ->
?on_handler_error:
[ `Raise | `Ignore | `Call of Async.Socket.Address.Inet.t -> exn -> unit ] ->
?mode:Conduit_async.server ->
?backlog:int ->
?max_connections:int ->
callback ->
'l ws_server