started tcp

This commit is contained in:
Jake Hillion 2020-12-09 14:02:04 +00:00
parent 421c003bfb
commit af65e17eb1
2 changed files with 3 additions and 2 deletions

View File

@ -14,7 +14,9 @@
% --------------------------------- TCP ------------------------------------ %
\section{TCP}
TODO
The base implementation is built on TCP. TCP provides congestion control and flow control, which are all that is necessary for this form of greedy load balancing, and therefore solves almost all of the issues given here. To implement such a solution on TCP, the only difference that needs to be made is punctuating the connection. As TCP provides a byte stream and not distinct datagrams, a distinction must be made between the packets. One option is to use a punctuating character, though this would reduce the character set of the packets, and therefore require escape sequences in the packets. The second option is to read the length of the packets and then read the correct amount of data from the stream.
My implementation uses the second option, of punctuating the stream by providing the length of each packet. Although the IP packets do provide their length internally, I kept the TCP flow as flexible as possible. That is, it is kept as simple as possible, so that it doesn't have to be updated for transmitting any other sort of packets. Therefore, the TCP flow is punctuated by sending the length of the packet before the packet itself within the stream. Then, this number of bytes can be read.
\begin{figure}
\centering
@ -141,7 +143,6 @@ In implementing the UDP based protocol, I spent some time reading packet data in
\label{fig:udp-wireshark-dissector}
\end{figure}
\subsection{Congestion Control}
To allow for flexibility in congestion control, I started by building an interface (shown in figure \ref{fig:congestion-control-interface}) for congestion controllers. The aim of the interface is to provide the controller with every update that could be used for congestion control, while also providing it every opportunity to set an ACK or NACK on a packet.

Binary file not shown.