From 83ff73e79319ae2a968dcddc360c152ea0d671c2 Mon Sep 17 00:00:00 2001 From: TudbuT Date: Mon, 15 Aug 2022 18:47:14 +0200 Subject: [PATCH] add explaination of what helpers are for --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 007c7bc..e9e098f 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,29 @@ qft sender : [bitrate] [skip] qft receiver : [bitrate] [skip] ``` +## What helpers do + +Helpers are there to help with holepunching. +- P1 connects\* to helper +- P1 sends the phrase to the helper +- P1 waits for a response +- Some time passes +- P2 connects\* to the same helper +- P2 sends the phrase to the helper +- P2 gets P1's public IP and port +- P1 gets P2's public IP and port +- P1 and P2 disconnect\* from the helper +- P1 and P2 start a loop: + - wait until their system clock is at .0 or .5 of a second + - fire a packet at eachother at the same time + - try to receive the packet from the other one + - if none is received, loop again + - if one is received, exit the loop +- Connection between P1 and P2 is established. + +\*UDP is a connection-less protocol, there are no handshakes. The word "connection" is used here as +an indicator that data is exchanged between the "connected" parties. The word "disconnect" is used +here as an indicator that no more data is transferred between the "previously connected" parties. ## Tips 'n Tricks - You can add a number to the end of both of your commands (after the filename) to