Initiate an Rpc connection on the given transport. implementations
should be the bag of implementations that the calling side implements; it defaults to Implementations.null
(i.e., "I implement no RPCs").
protocol_version_headers
should contain the pre-shared protocol version headers, if applicable. The client and server must agree on whether these were shared and, if so, what they contained, or there may be a protocol error.
connection_state
will be called once, before create
's result is determined, on the same connection that create
returns. Its output will be provided to the implementations
when queries arrive.
WARNING: If specifying a custom heartbeat_config
, make sure that both ends of the Rpc connection use compatible settings for timeout and send frequency. Otherwise, your Rpc connections might close unexpectedly.
max_metadata_size
will limit how many bytes of metadata this peer can send along with each query. It defaults to 1k. User-provided metadata exceeding that size will be truncated. WARNING: setting this value too high allows this connection to send large amounts of data to the callee, unnoticed, which can severely degrade performance.
description
can be used to give some extra information about the connection, which will then show up in error messages and the connection's sexp. If you have lots of connections in your program, this can be useful for distinguishing them.
time_source
can be given to define the time_source for which the heartbeating events will be scheduled. Defaults to wall-clock.
identification
can be used to send an additional information to the peer. This is intended to be used for identifying the identity of the /process/ as opposed to the identity of the user. We use a bigstring to leave the option for clients to interpret as structured data of their choosing.