package rpc_parallel

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file backend.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
open! Core
open! Async

let name = "Unauthenticated Async RPC"

module Settings = struct
  type t = unit [@@deriving bin_io, sexp]
end

let serve
      ?max_message_size
      ?handshake_timeout
      ?heartbeat_config
      ~implementations
      ~initial_connection_state
      ~where_to_listen
      ()
  =
  Rpc.Connection.serve
    ?max_message_size
    ?handshake_timeout
    ?heartbeat_config
    ~implementations
    ~initial_connection_state
    ~where_to_listen
    ()
;;

let client
      ?implementations
      ?max_message_size
      ?handshake_timeout
      ?heartbeat_config
      ?description
      ()
      where_to_connect
  =
  Rpc.Connection.client
    ?implementations
    ?max_message_size
    ?handshake_timeout
    ?heartbeat_config
    ?description
    where_to_connect
  |> Deferred.Or_error.of_exn_result
;;

let with_client
      ?implementations
      ?max_message_size
      ?handshake_timeout
      ?heartbeat_config
      ()
      where_to_connect
      f
  =
  Rpc.Connection.with_client
    ?implementations
    ?max_message_size
    ?handshake_timeout
    ?heartbeat_config
    where_to_connect
    f
  |> Deferred.Or_error.of_exn_result
;;
OCaml

Innovation. Community. Security.