29 lines
1.2 KiB
Racket
29 lines
1.2 KiB
Racket
#lang imperative-syndicate
|
|
;; Internal server and federation protocol
|
|
|
|
(provide (all-defined-out))
|
|
|
|
;; Client-server internal protocol
|
|
;; Received packets from server are relayed via one of these.
|
|
(message-struct server-packet (address packet))
|
|
;; Like `server-connected`, but for reflecting `tcp-accepted` to the
|
|
;; client end of a client-server connection without reordering wrt
|
|
;; `server-packet` messages. Implementation-facing, where
|
|
;; `server-connected` is part of the API.
|
|
(assertion-struct server-transport-connected (address))
|
|
|
|
;; Internal connection protocol
|
|
(assertion-struct server-poa (connection-id)) ;; "Point of Attachment"
|
|
(assertion-struct message-poa->server (connection-id body))
|
|
(assertion-struct message-server->poa (connection-id body))
|
|
|
|
;; Internal isolation -- these are isomorphic to `to-server` and `from-server`!
|
|
;; (and, for that matter, to `outbound` and `inbound`!)
|
|
(assertion-struct server-proposal (scope body)) ;; suggestions (~ actions)
|
|
(assertion-struct server-envelope (scope body)) ;; decisions (~ events)
|
|
|
|
(assertion-struct server-active (scope))
|
|
|
|
;; Federated links generally
|
|
(assertion-struct federated-link (id scope))
|