diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/Lossless_UDP.txt | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/docs/Lossless_UDP.txt b/docs/Lossless_UDP.txt index 7b79f443..7b69590d 100644 --- a/docs/Lossless_UDP.txt +++ b/docs/Lossless_UDP.txt | |||
@@ -8,6 +8,8 @@ Lossless UDP: | |||
8 | 8 | ||
9 | Draft of Proposed protocol: | 9 | Draft of Proposed protocol: |
10 | 10 | ||
11 | Connexion example: | ||
12 | |||
11 | Alice wants to connect to Bob (Connection handshake): | 13 | Alice wants to connect to Bob (Connection handshake): |
12 | Alice generates a random 4 byte number. | 14 | Alice generates a random 4 byte number. |
13 | Alice puts it in the handshake packet (handshake_id1). | 15 | Alice puts it in the handshake packet (handshake_id1). |
@@ -36,7 +38,13 @@ Lossless UDP: | |||
36 | bobs SYNC packets become request packets. | 38 | bobs SYNC packets become request packets. |
37 | The packet id of the missing packet(s) are added to the end of the SYNC packet. | 39 | The packet id of the missing packet(s) are added to the end of the SYNC packet. |
38 | Alice resends the packets whose numbers appear at the end of the request packet. | 40 | Alice resends the packets whose numbers appear at the end of the request packet. |
39 | 41 | ||
42 | Alice and bob disconnect suddenly: | ||
43 | Alice stops receiving SYNC packets from bob. | ||
44 | Bob stops receiving SYNC packets from Alice. | ||
45 | Connexion times out if no data is received for 5 seconds. | ||
46 | |||
47 | Packet handling: | ||
40 | 48 | ||
41 | The client receives a SYNC packet: | 49 | The client receives a SYNC packet: |
42 | He checks if the packet is valid(sent_packetnum and counter make sense) | 50 | He checks if the packet is valid(sent_packetnum and counter make sense) |
@@ -50,6 +58,7 @@ Lossless UDP: | |||
50 | Check if the other client received what we sent him (compare recv_packetnum with the number of packets we sent) and clear them from the buffer. | 58 | Check if the other client received what we sent him (compare recv_packetnum with the number of packets we sent) and clear them from the buffer. |
51 | If the packet is a request packet. | 59 | If the packet is a request packet. |
52 | Send the packets he requested. | 60 | Send the packets he requested. |
61 | |||
53 | 62 | ||
54 | 63 | ||
55 | The client receives a Connection handshake packet(not initiating connection): | 64 | The client receives a Connection handshake packet(not initiating connection): |
@@ -72,11 +81,7 @@ Lossless UDP: | |||
72 | Keep track of the percent of packets dropped, if it is too high, lower the send rate. If it is low, increase it. | 81 | Keep track of the percent of packets dropped, if it is too high, lower the send rate. If it is low, increase it. |
73 | 82 | ||
74 | 83 | ||
75 | Alice and bob disconnect suddenly: | 84 | |
76 | Alice stops receiving SYNC packets from bob. | ||
77 | Bob stops receiving SYNC packets from Alice. | ||
78 | Connexion times out if no data is received for 5 seconds. | ||
79 | |||
80 | 85 | ||
81 | 86 | ||
82 | 87 | ||