Matter::Transport::Exchange
Inherits Reference < Object
Represents a message exchange (request/response pair)
In Matter protocol, exchanges are bidirectional conversations identified by an exchange ID. Each exchange tracks:
- Exchange ID
- Protocol ID
- Whether we initiated the exchange
- Pending acknowledgments
- Retransmission state
Constants
MRP_BACKOFF_BASE = 1.6
MRP_BASE_TIMEOUT = 200
Retransmission parameters (from Matter spec)
MRP_MAX_RETRIES = 5
MRP_STANDALONE_ACK_MS = 200
Constructors
new(exchange_id : UInt16, protocol_id : UInt16, session_id : UInt16, initiator : Bool, peer_address : Socket::IPAddress | Nil = nil, peer_node_id : DataType::NodeId | Nil = nil)
SourceInstance methods
exchange_id
Sourceinitiator?
Sourceneeds_retransmit?
Check if message needs retransmission Returns the message to retransmit, or nil if none needed
peer_address
Sourcepeer_node_id
Sourcepending_message=(message : Codec::MessageCodec::Message) : Nil
Store message for retransmission if needed
protocol_id
Sourcesession_id
Sourcestate
Source