package async_rpc_websocket

  1. Overview
  2. Docs

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.

Sourcetype callback = Async.Socket.Address.Inet.t -> Cohttp.Request.t -> Async_rpc_kernel.Async_rpc_kernel_private.Transport.t -> unit Async.Deferred.t
Sourceval handler : ?http_handler:('connection -> http_handler) -> ?should_process_request:should_process_request -> callback -> 'connection -> raw_http_handler
Sourceval 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