2021-06-04 13:56:03 +00:00
|
|
|
;;; SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
;;; SPDX-FileCopyrightText: Copyright © 2010-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
2021-06-01 15:19:24 +00:00
|
|
|
|
2020-04-27 18:27:48 +00:00
|
|
|
#lang syndicate
|
2019-05-09 10:17:37 +00:00
|
|
|
;; 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))
|
2019-09-11 15:07:54 +00:00
|
|
|
;; Like `server-connected`, but for reflecting the state of the
|
|
|
|
;; session to the transport driver. Observation of
|
|
|
|
;; `server-session-connected` is not creative (of `server-connected`),
|
|
|
|
;; unlike observation of `server-connected`.
|
|
|
|
(assertion-struct server-session-connected (address))
|
2019-05-09 10:17:37 +00:00
|
|
|
|
|
|
|
;; Internal connection protocol
|
|
|
|
(assertion-struct server-poa (connection-id)) ;; "Point of Attachment"
|
2019-06-20 10:55:29 +00:00
|
|
|
(assertion-struct server-poa-ready (connection-id))
|
2019-05-09 10:17:37 +00:00
|
|
|
(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))
|
2019-06-11 17:47:56 +00:00
|
|
|
(assertion-struct federated-link-ready (id))
|