pub struct GatewayChannel {
pub channel: Channel,
pub nodename: Option<String>,
pub topology: Option<Vec<u8>>,
}Expand description
High level logic for gateways (mirrors Gateway.GatewayChannel).
This is the TARGET side of a tree channel: it receives the configuration from the admin node, ACKs it, and then accepts control messages. Any processing failure — including undecodable payloads such as a gateway message stamped with an unsupported pickle protocol — is turned into an Error reply sent back to the initiator, after which the channel is closed (fatal channel error).
Fields§
§channel: ChannelThe underlying communication channel (target end: initiator=false).
nodename: Option<String>This gateway’s node name (from CFG or system hostname fallback).
topology: Option<Vec<u8>>Decoded topology payload received in CFG.
Implementations§
Source§impl GatewayChannel
impl GatewayChannel
Sourcepub fn feed(&mut self, data: &str)
pub fn feed(&mut self, data: &str)
Feed raw incoming data to the channel, mirroring the read side of
upstream Channel.ev_read for a target: parse errors are reported
back to the initiator as an Error message and close the channel.
Sourcepub fn recv(&mut self, msg: Message)
pub fn recv(&mut self, msg: Message)
Handle one incoming message (mirrors GatewayChannel.recv).
Dispatch errors are reported back to the initiator as an Error message, then the channel is closed — including configuration payload decode failures (90d3195’s gateway side: the admin later reports this reason as gateway stderr).