-
Notifications
You must be signed in to change notification settings - Fork 5
/
README
59 lines (39 loc) · 1.75 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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