This project implements a TCP receiver, decomposed into three primary components: a ByteStream class, a Reassembler class, and the TCP Receiver itself.
- ByteStream: Handles reading and writing of bytes in a finite stream with a specified capacity.
- Reassembler: Reassembles out-of-order segments received from a sender into a contiguous byte stream.
- TCP Receiver: Integrates the ByteStream and Reassembler, handling TCP segments and generating appropriate acknowledgments.
-
Clone the repository:
git clone https://github.com/notkartikye/tcp-receiver.git cd tcp-receiver
-
Navigate to the build directory:
cd build
-
Configure and build the project:
cmake .. make
-
After building the project, you can run test cases with ctest:
ctest
-
To run the TCP receiver, execute the following command in the build directory:
./tcp_receiver