You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -849,6 +849,8 @@ A sequence number hole/when there are skipped messages is when an ip dgram arriv
849
849
850
850
The transmission bandwidth and the retransmission bandwidth are both used to know whether the connection shall transmit or retransmit the packets in the retransmission queue, outgoing packet queue. Getting the transmission bandwidth is simple, if UnacknowledgedBytes <= CWND then it is equals to CWND-UnacknowledgedBytes, if not then it shall be set to 0, and the reason for that should be obvious.
851
851
852
+
The transmission bandwidth is how much should be sent in this update cycle, which can be then used to send an amount of bytes(the internal packet complete size) that is lower than the transmission bandwidth and also the `maximum datagram size excluding header bytes`. (The same applies for retransmission, however instead of using the transmission bandwidth, it would just the retransmission bandwidth but transmission bandwidth also plays a role, because there shouldnt be any retransmissions if no transmissions is possible)
853
+
852
854
Retransmission only happens for reliable packets. A retransmission queue is a dynamic array with its indexes being a reliable index and with its value being the internal packet, with the index masked by the RETRANSMISSION_QUEUE_MASK(511).
@@ -858,7 +860,7 @@ If there are packets to be retransmitted or if there are anything in the outgoin
858
860
859
861
If both the retransmission bandwidth and transmission bandwidth is greater than 0 then retransmission is possible. If so, then it is possible to send the packets that are in the retransmission queue.
860
862
861
-
the complete internal packet size shall be equals to the internal packet message size + the internal packet user buffer size.
863
+
the complete internal packet size shall be equals to the internal packet message size + internal packet user buffer size.
862
864
863
865
Below is how RakNet sends its datagrams not not overload the other side, but it depends on how the reader wants to implement it after reading and comprehending it.
864
866
@@ -876,9 +878,9 @@ When an ACK comes and interated through and whatever else happens(like congestio
876
878
877
879
When a NACK comes and iterated through and whatever else happen and if the sequence number of this iteration exists in the datagram history and if an internal packet of its internal packets is reliable and if it exists in the retransmission queue and if the the next action time is not 0(of the internal packet in the retransmission queue) then it shall be updated to be the time of this update cycle(in microseconds).
878
880
879
-
### Reliable Window
881
+
### Reliable Receive Window
880
882
881
-
Reliable window is for received internal packets where it is possible to check if there are duplicates or out of bounds reliable indexes if reliable.
883
+
Reliable receive window is for received internal packets where it is possible to check if there are duplicates or out of bounds reliable indexes if reliable.
882
884
883
885
if reliable and is not a split internal packet and the reliable index is lower than the reliable window start(0 by default) or greater than the reliable window end(2048 by default), then it is out of range. if it exists in the reliable window array then it is a duplicate internal packet.
884
886
@@ -888,6 +890,8 @@ if the reliable index start is the same as the reliable index of this reliable i
888
890
889
891
### Receiveing Ordering And Sequencing
890
892
893
+
The order and sequence of an internal packet must be validated before handling it, where if an internal packet is out of order(not really put of order but just like skipped or a future internal packet), it should simply be handled later on. If it is sequenced then if its out of order(the sequencing index is lower than the highest known for this channel) then it shall be dropped and the highest sequencing index shall be updated. (There can only be 32 channels, with each channel having its own thing)
894
+
891
895
Note: The internal packet must be reliable or sequenced for this section.
892
896
893
897
Firstly before anything, the ordering channel must be validated whether it was valid or not, and the way to do that is by checking if the ordering channel is more than the NumberOfOrderedStreams or less than 0 then it shall be ignored as it is corrupted.
0 commit comments