This is a multicast file distribution protocol with implementation written in C. I have only tested this using ethernet multicast on a local network.
To compile, run make
in the project directory. The obj
and out
directories will be created. Binaries for the server and client will be built into the out
directory.
Usage:
./server [num_clients] [filepath] [port]
The server will wait until the number of clients connected is equal to num_clients before it start sending the file. The server will display its network interfaces so clients can see what its ip address is. Header information of the file specified at the given filepath will be printed when the server starts sending the file.
Usage:
./client [server_ip] [destination_path] [port]
The client will get a file from the server specified by the server_ip and copy it to the directory specified by the destination_path.
The code in the two files crc32.c
and extern.h
are taken from http://web.mit.edu/freebsd/head/usr.bin/cksum/