pub struct VolatileSecureMessageWriter { /* private fields */ }Expand description
Writer for DCPSParticipantVolatileMessageSecure.
Implementations§
Source§impl VolatileSecureMessageWriter
impl VolatileSecureMessageWriter
Sourcepub fn new(participant_prefix: GuidPrefix, vendor_id: VendorId) -> Self
pub fn new(participant_prefix: GuidPrefix, vendor_id: VendorId) -> Self
Creates a writer for the local participant.
Sourcepub fn reader_proxy_count(&self) -> usize
pub fn reader_proxy_count(&self) -> usize
Number of registered reader proxies.
Sourcepub fn inner(&self) -> &ReliableWriter
pub fn inner(&self) -> &ReliableWriter
Read-only access to the ReliableWriter (tests/diagnostics).
Sourcepub fn add_reader_proxy(&mut self, proxy: ReaderProxy)
pub fn add_reader_proxy(&mut self, proxy: ReaderProxy)
Adds a reader proxy.
Sourcepub fn remove_reader_proxy(&mut self, guid: Guid) -> Option<ReaderProxy>
pub fn remove_reader_proxy(&mut self, guid: Guid) -> Option<ReaderProxy>
Removes a reader proxy.
Sourcepub fn write(
&mut self,
msg: &ParticipantGenericMessage,
) -> Result<Vec<OutboundDatagram>, WireError>
pub fn write( &mut self, msg: &ParticipantGenericMessage, ) -> Result<Vec<OutboundDatagram>, WireError>
Sends a ParticipantGenericMessage. Returns one datagram per
reader proxy.
§Errors
WireError from the reliable writer (cache overflow on
KeepAll, sequence overflow).
Sourcepub fn write_with_heartbeat(
&mut self,
msg: &ParticipantGenericMessage,
now: Duration,
) -> Result<Vec<OutboundDatagram>, WireError>
pub fn write_with_heartbeat( &mut self, msg: &ParticipantGenericMessage, now: Duration, ) -> Result<Vec<OutboundDatagram>, WireError>
Write + piggyback HEARTBEAT in ONE operation (RTPS 2.5 §8.4.15.5).
Security tokens (Kx, per-endpoint crypto) are reliable and
time-critical: the remote must NACK a loss IMMEDIATELY, not only at
the periodic HEARTBEAT (VOLATILE_SECURE_HEARTBEAT_PERIOD =
250ms). Cross-vendor, the token otherwise falls behind Cyclone’s
AUTHOK delete_pending_match and is never applied. The piggyback
HEARTBEAT (final_flag=false) forces the prompt ACKNACK response —
per-send, so robust for late joiners / rediscovery (no global
state).
§Errors
Wire encode errors.
Sourcepub fn handle_acknack(
&mut self,
src_guid: Guid,
base: SequenceNumber,
requested: impl IntoIterator<Item = SequenceNumber>,
)
pub fn handle_acknack( &mut self, src_guid: Guid, base: SequenceNumber, requested: impl IntoIterator<Item = SequenceNumber>, )
Dispatch of an ACKNACK from the remote reader.
Sourcepub fn handle_nackfrag(&mut self, src_guid: Guid, nf: &NackFragSubmessage)
pub fn handle_nackfrag(&mut self, src_guid: Guid, nf: &NackFragSubmessage)
Dispatch of a NACK_FRAG from the remote reader.