UDPFileTransferClient-Server / README.md
README.md
Raw

UDP Remote File Transfer Multi-Client/Server

A project assigned in Dr. Smith's Introduction to Computer Networks class, CPE 464.

Course Description

Computer network architectures; communications protocol standards; services provided by the network; historical and current examples presented.

Program Description

rcopy.c is a remote file transfer client that communicates with the file server via UDP. rcopy.c will create the output file and write the data packets sent from the server to disk.

The file copy client relies on a self-written "Sliding Window" data structure in the file titled window.c.

Ref: (https://www.baeldung.com/cs/sliding-window-algorithm)

Usage: rcopy from-filename to-filename window-size buffer-size error-percent remote-machine remote-port

Where:

  • from-filename: is the name of the file to download from the server (server sends this down)
  • to-filename: is the name of file created by rcopy (rcopy writes to this file)
  • window-size: is the size of the window in PACKETS (i.e. number of packets in window)
  • buffer-size: is the number of data bytes (from the file) transmitted in a data packet2
  • error-percent: is the percent of packets that are in error (floating point number)
  • remote-machine: is the remote machine running the server
  • remote-port: is the port number of the server application

server.c is a remote file server and is responsible for downloading the requested file to rcopy. This program only terminates unless killed with ctrl-c and will continually process file requests for multiple clients simultaneously.

The server takes two arguments, an error percentage and an optional port number for clients to use.

Usage:server error-percent optional-port-number

Where:

  • error-percent: is the percent of packets that are in error (floating point number)
  • optional-port-number: allows the user to specify the port number to be used by the server (If this parameter is not present you should pass a 0 (zero) as the port number to bind().)

Utilize MAKE to build the output files.

Packet Flags Used:

  • 3 - Data packet
  • 5 - RR packet
  • 6 - SREJ packet
  • 7 - Filename and relevant metadata (rcopy to server) (used for setup)
  • 8 - Filename response (good/bad filename) (server to rcopy)
  • 9 - EOF packet (server to rcopy)
  • 10 - EOF ACK packet (rcopy to server)

Please view the selective_reject_assignment... pdf for more verbose project details.