Skip to main content

Module remote

Module remote 

Expand description

The client half of a network peer, over a transport the caller supplies.

Exchange is the transport: one request’s bytes out on a Route, one reply’s bytes back. RemoteSyncPeer is the SyncPeer over it, encoding and decoding the envelopes serve_sync answers, and refusing a push over the far side’s declared limits before it is sent, in the order StoreSyncPeer refuses one. Nothing here names HTTP: an HTTP client, a Durable Object stub, a socket, or a function call into serve_sync in the same process are all an Exchange.

Structs§

RemoteSyncPeer
A SyncPeer whose far side is reached through an Exchange.

Enums§

RemoteError
How a RemoteSyncPeer fails: its transport E, bytes it could not write or read, or a push over the limits it declared, which it refuses without sending. The limit arms mirror StorePeerError’s, so a runner reads one shape.

Traits§

Exchange
Sends one request on a route and returns the reply: one round trip.
SendExchange
Sends one request on a route and returns the reply: one round trip.