|
| | Gateway (Config config, Listener &listener) |
| |
| bool | canAccept () const noexcept |
| | Whether a connection may be taken right now: the host's last Gate, or this stub's own Activated(true).
|
| |
| bool | isServing () const noexcept |
| | Whether the edge is open: onActivated returned true and no Gate or Role has closed it since.
|
| |
| std::int32_t | sourceId () const noexcept |
| |
| std::int32_t | openConnection (const char *connectionData, const std::size_t length) |
| | Takes one connection into the cluster's view of this gateway, under the next id from the last Role (H-4).
|
| |
| std::int32_t | openConnection () |
| | Takes one connection whose only identity is its id; see openConnection(const char*, std::size_t).
|
| |
| void | closeConnection (const std::int32_t connectionId) |
| | That connection has gone.
|
| |
| void | gateClosed () |
| | The edge closed without being asked to: the host opens it again through onActivated, if this instance is still the one designated.
|
| |
| protocol::Publish | publish (const std::int32_t connectionId, const std::uint16_t payloadId, const std::uint8_t *payload, const std::uint16_t payloadLength) |
| | Offers one payload on a connection to this gateway's own group (H-4).
|
| |
| protocol::Publish | publish (const std::int32_t connectionId, const std::uint16_t groupMask, const std::uint16_t payloadId, const std::uint8_t *payload, const std::uint16_t payloadLength) |
| | The same to the groups groupMask names as well as its own.
|
| |
template<typename Listener>
class org::limitless::seqeron::hosted::Gateway< Listener >
The client stub of a hosted Gateway (doc/seqeron-protocol-spec.md §17): the surface of app::Gateway, with the façade itself, the pair and the election running in a host process that this talks to over schema 218.
Its listener is the direct Gateway's, and onActivated returns what the host waits for (§17.5).
What differs: connection ids are allocated here, from the host's last Role (H-4); a Published command can be lost at a gate edge (H-3, H-4), and one on a connection whose ConnectionOpened is not yet placed is Published, not Declined; the queries mirror the host's last Gate (H-16). The host waits in onActivated for the answer and drops a stub whose heartbeat is silent for its clientTimeoutMs, so a listener that dials for longer calls keepAlive() while it does (H-14).
Single-threaded: every method belongs to the caller's one duty-cycle thread.