Open dubrowgn opened 2 months ago
OrderedReliableReceiver is implemented as ReliableMessageReceiver<OrderedArranger>. However, ReliableMessageReceiver erases the original message ids, and generates new ones in FIFO order.
OrderedReliableReceiver
ReliableMessageReceiver<OrderedArranger>
ReliableMessageReceiver
See:
// reliable_message_receiver.rs impl<A: ReceiverArranger> ReliableMessageReceiver<A> { ... fn push_message(...) { ... let first_index = self.current_index; self.current_index = self.current_index.wrapping_add(1); ... self.arranger .process(&mut self.incoming_messages, first_index, full_message); }
Each message is assigned a message id in order of being received. This new message id is being given to the arranger.
The original message id is being dropped:
// reliable_message_receiver.rs impl<A: ReceiverArranger> ReliableMessageReceiver<A> { ... pub fn buffer_message( ... message_index: MessageIndex, message: MessageContainer, ) { self.reliable_receiver .buffer_message(message_index, message); let received_messages = self.reliable_receiver.receive_messages(); for (_, received_message) in received_messages { self.push_message(message_kinds, entity_waitlist, converter, received_message) } }
OrderedReliableReceiver
is implemented asReliableMessageReceiver<OrderedArranger>
. However,ReliableMessageReceiver
erases the original message ids, and generates new ones in FIFO order.See:
Each message is assigned a message id in order of being received. This new message id is being given to the arranger.
The original message id is being dropped: