]> Sergey Matveev's repositories - vors.git/commitdiff
Note cookie importance
authorSergey Matveev <stargrave@stargrave.org>
Thu, 18 Apr 2024 21:02:21 +0000 (00:02 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 18 Apr 2024 21:02:21 +0000 (00:02 +0300)
doc/proto.texi

index 7d80dec27df49b91c36a163b4207d845649cb942ce0c4d4be9fcec22c326a791..9758938e7c481b6e68597f189ccf6ed291f33f726187af55a91d89fa6c3a6943 100644 (file)
@@ -38,10 +38,18 @@ client if there are too many peers or its name is already taken.
 
 @item The 128-bit cookie is sent by client over UDP to the server every
 second. If UDP packets are lost, then no connection is possible and
-after a timeout the server drops the TCP connection.
-
-@item Otherwise it replies with @code{SID XXX}, where XXX is ASCII
-decimal stream number client must use.
+after a timeout the server drops the TCP connection. That cookie means:
+
+    @itemize
+    @item confirmation of successful handshake on client side;
+    @item UDP hole punching of stateful firewall or NAT;
+    @item fact of client's UDP traffic ability to reach the server;
+    @item client's UDP address knowledge (after passing NAT, its port
+        may differ from known to client one)
+    @end itemize
+
+@item Server replies with @code{SID XXX}, where XXX is ASCII decimal
+stream number client must use.
 
 @item @code{PING} and @code{PONG} messages are then sent every ten
 seconds as a heartbeat.