Define your own P2P file sharing protocol
- A tracking server to maintain information about files to be shared and locations of those files
- Tracking server return the file’s information to a client
- Clients work together to get the requested file
- Setup Server:
- Run
cd Server
- Run
gcc FSserver.c -o FSserver
- Run
./FSserver
to run tracking server
- Run
- Setup Client:
- Run
cd Client
- Run
gcc FSClient.c -o FSClient
- Run
./FSClient <port>
to run client with port. This port is not the port of the tracking server.
- Run
These commands are used on the client side.
===========================[COMMAND LIST]=============================
Usage: fs <command>
help Hiển thị hướng dẫn
list [-p <page>] Lấy danh sách các file đang được share
find <filename> Tìm kiếm file theo tên
downloadLocation <path> Đặt đường dẫn của thư mục chứa file
download
download <ID> [-p <pass>] Yêu cầu download file
share <path> [-p <pass>] Share file với đường dẫn
Không được đặt pass là "****"
quit Ngắt kết nối với server
======================================================================