This is a set of programming project in CU CSEE-4119(F2021) Computer Network.
The python files:
--segments.py
--sender.py
--receiver.py
are building a TCP connection with loss recovery mechanism. The TCP connection is built based on a UDP connection, the UDP conneciton system has settings about loss rate and related selections. The UDP simulator is provided by the course and professor. The markdown file:
TCP over UDP.md
is the introduction about the system and codes in the terminal.
The python files:
--TCP Client.py
--TCP Sercer.py
--UDP Client.py
--UDP Server.py
are building client and server using TCP/UDP protocal with python code.
Please start Emulator first. Then Receiver side. Lastly Sender side.
$ ./newudpl -vv -o[sendport]:4000 -i[sendport]:* [FLAGS]
Recommand Flags: -O50 , -B50 , -d0.8 , -L10
Receiver: $ python Receiver.py [receiving_filename(recvfile.txt)] [listening_port] [sender_IP] [sender_port] [log_filename(logfile.txt)]
Sender: $ python Sender.py [sending_filename(sendfile.txt)] [remote_IP] [remote_port] [ack_port] [log_filename(logfile.txt)] [window_size(1)]
Emulator:
./newudpl -vv -o ‘localhost’:8111 -i ‘localhost’:’*’ -L 10 -B 50 -O 50 -d 0.8'''
Receiver:
python3 Receiver.py recvfile.txt 8111 localhost 8112 logfile.txt'''
Sender:
python3 Sender.py sendfile.txt localhost 41192 8112 logfile.txt 1'''
The following are introductions about UDP clients and servers code:
This project set TCP connections upon UDP connections.
Which means UDP datagrams can be lost through internet transactions and the sender will never resend it because the sender never knows.