Greg Taschuk & Jordan Singleton gtaschu1 & jsingle1 Lab 5 - Bittorrent http://www.cs.swarthmore.edu/~aviv/classes/f12/cs43/labs/lab5/lab5.pdf ################################# # OVERVIEW ################################# In this lab we implement a bittorrent client(/server) which accepts a number of peers as command line arguments or as incoming connections via the bittorrent handshake protocol. This is N-Peers with Restarts ################################# # IMPLEMENTATION NOTES ################################# We believe the functions are written as you expect that we wrote them. A few notes: - We implemented symmetrically from the start - We poll all file descripters (including the incoming fd) using fd sets. This implementation is very closesly related to the one Beejus gave in his guide to network programming - Logging is done via a log_record function which is a wrapper around vprintf and accepts formatted strings - Supports starting with partial files You can make the bt_client executable via the make command in the root directory Running ./bt_client without aguments will show usage information ################################# # FILES FROM LAB ASSIGNMENT (none added) ################################# Included Files and Purpose bt_client.c : Main file where the control loop lives bt_setup.c : Contains setup code, such as parsing arguments bencode.c : Code for parsing bencoded torrent files bt_lib.c : Code for core functionality of bt bt_setup.h : Header file for setup bencode.h : Header file for bencode bt_lib.h : Header file for bt_lib Suggested Additional Files [and headers] bt_io.c[.h] : File for handing input output bt_sock.c[.h] : File for handling socket and network issues