Skip to main content

Module serve

Module serve 

Expand description

The server half of a network peer: envelope bytes in, envelope bytes out.

serve_sync is what a transport mounts. It knows nothing of HTTP, sockets or Durable Objects: the transport receives a body, says which Route it came in on, and sends back what this returns. Everything between — the version check, the decode, the store, the encode — is here, once, so every transport answers with the same bytes.

Enums§

ServeError
Why serve_sync or serve_sync_adjudicated could not answer.

Functions§

serve_sync
Answers one request through peer, and returns the reply’s bytes.
serve_sync_adjudicated
serve_sync through a store peer that judges what it is pushed: one request answered through peer, whose merge rule A lands each pushed group with its compensation (SY-7, SY-10).