Skip to content

Commit

Permalink
Add description for fragment packet type
Browse files Browse the repository at this point in the history
  • Loading branch information
JFreegman authored and iphydf committed Feb 18, 2022
1 parent e568cd7 commit 24ee6e2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Network/Tox/Application/GroupChats.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,10 @@ which case they will ignore the version. They will then verify the
signature using the setter's public signature key and validate the
checksum.

If the peer who set the current topic is kicked or demoted, or if the topic lock is enabled, the peer who initiated the action will re-sign the topic using his own signature key and rebroadcast it to the entire group.
If the peer who set the current topic is kicked or demoted, or if the
topic lock is enabled, the peer who initiated the action will re-sign
the topic using his own signature key and rebroadcast it to the entire
group.

If the peer who set the current topic is kicked or demoted, or if the
topic lock is enabled, the peer who initiated the action will re-sign
Expand Down
20 changes: 20 additions & 0 deletions src/Network/Tox/Application/GroupChatsPackets.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,26 @@ follows:

\section{Lossless Packet Payloads}

\subsection{FRAGMENT (0xef)}

Fragment packets are structured as follows:

\begin{tabular}{l|l}
Length & Contents \\
\hline
\texttt{1} & Lossless Packet Type \textbf{\verb'[First chunk only]'} \\
Variable & Arbitrary data \\
\end{tabular}

Represents a segment in a sequence of packet fragments that comprise one
full lossless packet payload which exceeds the maximum allowed packet
chunk size (500 bytes). The first byte in the first chunk must be a lossless
packet type. Each chunk in the sequence must be sent in succession.

The end of the sequence is signaled by a fragment packet with a length of zero.

A fully assembled packet must be no greater than 50,000 bytes.

\subsection{KEY\_ROTATIONS (0xf0)}

Key rotation packets are structured as follows:
Expand Down

0 comments on commit 24ee6e2

Please sign in to comment.