pub struct SessionCore {Show 14 fields
pub state: SessionState,
pub negotiation: Negotiation,
pub profile: WireProfile,
pub s2_connect: bool,
pub outbox: VecDeque<Outgoing>,
pub acks: AckLedger,
pub registry: Registry,
pub ack_timeout: Duration,
pub out_of_order: OutOfOrderPolicy,
pub skew_tolerance: Duration,
pub max_message_bytes: usize,
pub strictness: Strictness,
pub reconnect_attempt: u32,
pub stats: Stats,
/* private fields */
}Expand description
The state both engines share.
Fields§
§state: SessionStateWhere the session has got to.
negotiation: NegotiationHow the version is agreed.
profile: WireProfileThe profile in use, once it is known.
s2_connect: boolWhether this session runs under S2 Connect.
outbox: VecDeque<Outgoing>Messages waiting to go out.
acks: AckLedgerWhat is waiting to be acknowledged.
registry: RegistryWhat has been published.
ack_timeout: DurationHow long to wait for an acknowledgement.
out_of_order: OutOfOrderPolicyHow the engine answers an out-of-order message.
skew_tolerance: DurationHow far a peer’s clock may differ before it is worth reporting.
max_message_bytes: usizeThe size cap applied to inbound text.
strictness: StrictnessWhether to prune unknown properties instead of refusing the message.
reconnect_attempt: u32How many reconnection attempts have already failed, for the back-off.
A session object lives for exactly one connection, so this cannot be counted
here: it is what the application carries across reconnections, through
RmConfig::after_failed_attempts / CemConfig::after_failed_attempts. Left at
zero, every Closed event would recommend the same two-second ceiling for ever,
which is a back-off that does not back off.
stats: StatsWhat this session has done.
Implementations§
Source§impl SessionCore
impl SessionCore
Sourcepub fn poll_timeout(&self) -> Option<Timestamp>
pub fn poll_timeout(&self) -> Option<Timestamp>
The next instant at which handle_timeout
has something to do.
None once the session is over. A closed session still holds unanswered messages
in its ledger and possibly a description scheduled for tomorrow, but neither can
ever resolve — the transport is gone — so waking a driver for them would keep an
idle device’s timer alive for ever.
Sourcepub fn poll_transmit(&mut self) -> Option<Outgoing>
pub fn poll_transmit(&mut self) -> Option<Outgoing>
The next message to put on the wire.
Trait Implementations§
Source§impl Clone for SessionCore
impl Clone for SessionCore
Source§fn clone(&self) -> SessionCore
fn clone(&self) -> SessionCore
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more