Skip to content

adityatripathiiit/TCP_UDP_File_Transfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Client-Server Programming (TCP and UDP Sockets) ⭐

A simple TCP and UDP client-server socket program in python for file transfer, with custom protocol configurations.

Codebase Directory Architecture: πŸ“

TCP_UDP_File_Transfer
β”œβ”€ novels
β”‚  β”œβ”€ Heartsease.txt
β”‚  β”œβ”€ Roget’s Thesaurus.txt
β”‚  β”œβ”€ The 1991 CIA World Factbook.txt
β”‚  β”œβ”€ The Conquest Of Peru.txt
β”‚  └─ War and Peace.txt
β”œβ”€ README.md
β”œβ”€ received_files
β”‚  β”œβ”€ tcp
β”‚  β”‚  └─ War and Peace_TCP_8776.txt
β”‚  └─ udp
β”‚     └─ War and Peace_UDP_8771.txt
β”œβ”€ tcp
β”‚  β”œβ”€ tcp_client.py
β”‚  └─ tcp_server.py
└─ udp
   β”œβ”€ udp_client.py
   └─ udp_server.py

Features checklist βœ…

βœ… Client-Server Architecture
βœ… File transfer over TCP socket 
βœ… File transfer over UDP Socket
βœ… Nagle-Algorithm Switch(ON/OFF) 
βœ… Delayed-ACK Algorithm Switch(ON/OFF) 

Instructions to Run πŸƒ

  • To run the TCP server, go to the tcp folder and run the command python3 tcp_server.py

  • To run the TCP client, go to the tcp folder and run the command python3 tcp_client.py. This will give the user options to send specific files. Those files can be selected and send.

  • The same instructions goes for the UDP client and UDP server.

  • To disable nagle's algorithm in TCP server uncomment line 21

  • in tcp_sever.py.

  • To disable nagle's algorithm in TCP client uncomment line 29 in tcp_client.py.

  • To disable delayed ACK in TCP server uncomment line 24 in tcp_server.py

  • To disable delayed ACK in TCP client uncomment line 32 in tcp_client.py

  • Buffersize can be changed in clients and servers of both tcp and udp, by changing the global variable BUFSIZE.

  • To add sleep of 100 us in TCP server uncomment line 48 in tcp_server.py

  • To add sleep of 100 us in UDP server uncomment line 29 in udp_server.py

About

Simple file transfer over TCP, UDP sockets, with custom protocol configurations.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages