From 457feeed0b49a83b8244d0046e0daf3a632fc092 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Thu, 27 Jun 2013 20:59:16 -0400 Subject: Added current work on Lossless_UDP (Not done do not test it yet) Lossless_UDP code is probably filled with problems right now. this is normal. --- docs/Lossless_UDP.txt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'docs/Lossless_UDP.txt') diff --git a/docs/Lossless_UDP.txt b/docs/Lossless_UDP.txt index 54eede16..09a2c133 100644 --- a/docs/Lossless_UDP.txt +++ b/docs/Lossless_UDP.txt @@ -17,7 +17,7 @@ Lossless UDP: Bob receives the packet. Bob copies the handshake packet he got from alice but caternates a random 4 byte number to it (handshake_id2) Alice receives the packet, checks if handshake_id1 matches the one she sent. - If it does she starts sending SYNC packets with sent_packetnum = handshake_id2 . + If it does she starts sending SYNC packets with sent_packetnum = handshake_id2 and recv_packetnum = handshake_id1. Bob receives the packet, if (handshake_id2) matches Bob adds Alice to his connections list and starts sending SYNC packets to alice. Alice receives the SYNC packets and starts sending them too. @@ -64,9 +64,7 @@ Lossless UDP: The client receives a Connection handshake packet(not initiating connection): If handshake_id2 is zero: add our random handshake_id2 to it and send it back - If handshake_id2 is non zero - check if it matches what we sent. - If it does add the client sending it to our connection list. + The client receives a Connection handshake packet(initiating connection): check if handshake_id1 matches what we sent. @@ -80,7 +78,7 @@ Lossless UDP: Keep track of the percent of packets dropped, if it is too high, lower the send rate. If it is low, increase it. - + Have a send packets buffer that we can write to and a recieved packets buffer that we can read from. @@ -90,7 +88,7 @@ Lossless UDP: [byte with value: 16 (10 in hex)][4 byte (handshake_id1)][4 bytes (handshake_id2)] SYNC packets: - [byte with value: 17 (11 in hex)][byte (00 for keep alive, 01 for request)][byte (counter)][4 byte (recv_packetnum)][4 byte (sent_packetnum)][sequence of requested packet ids[4 bytes each](not present in keep alive)] + [byte with value: 17 (11 in hex)][byte (type) (00 for keep alive, 01 for request)][byte (counter)][4 byte (recv_packetnum)][4 byte (sent_packetnum)][sequence of requested packet ids[4 bytes each](not present in keep alive)] data packets: -- cgit v1.2.3