From: Sergey Matveev Date: Thu, 18 Apr 2024 21:02:21 +0000 (+0300) Subject: Note cookie importance X-Git-Tag: v3.0.0~21 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=fb8fd5a7e1b3b9fca4c7aa47df5e97bec6d69be9f9a7ec9623020b91d748bf57;p=vors.git Note cookie importance --- diff --git a/doc/proto.texi b/doc/proto.texi index 7d80dec..9758938 100644 --- a/doc/proto.texi +++ b/doc/proto.texi @@ -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.