Skip to content

Commit

Permalink
NGC handshake protocol change
Browse files Browse the repository at this point in the history
  • Loading branch information
JFreegman authored and iphydf committed Sep 1, 2023
1 parent 8a722c7 commit 43649ad
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Network/Tox/Application/GroupChatsPackets.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ Handshake packet payloads are structured as follows:
\texttt{32} & Public Session Key \\
\texttt{32} & Public Signature Key \\
\texttt{1} & Request Type \\
\texttt{1} & Join Type \\
variable & 1 Packed TCP Relay \\
\end{tabular}
\hline
Expand Down Expand Up @@ -109,6 +110,18 @@ peer info exchange, the receiving peer must respond with a
\textbf{\verb'PEER_INFO_RESPONSE'} packet followed immediately by a
\textbf{\verb'PEER_INFO_REQUEST'} packet.

The \textbf{\verb'Join Type'} indicates whether the initiator of a handshake
is joining via the public DHT or a private friend invite. This field is ignored
in handshake response packets. It is defined as an enumerator beginning at zero
as follows:

\begin{tabular}{l|l}
Type & ID \\
\hline
\textbf{\verb'PUBLIC'} & 0x00 \\
\textbf{\verb'PRIVATE'} & 0x01 \\
\end{tabular}

The packed TCP relay contains a TCP relay that the sender may be
connected through by the receiver.

Expand Down

0 comments on commit 43649ad

Please sign in to comment.