Yuxin Wang
|
604464c87f
|
Simplify the base server with the asyncio.
|
2018-10-05 18:08:16 -04:00 |
|
Yuxin Wang
|
49cd3f5a35
|
Use Enum class to represent message types.
|
2018-10-05 17:15:00 -04:00 |
|
Yuxin Wang
|
fe646894b4
|
Drop python 3.4 support.
async and await syntaxes are introduced since python 3.5
|
2018-10-04 15:42:47 -04:00 |
|
Yuxin Wang
|
28ea3086dd
|
Use tqdm as the progressbar.
|
2018-10-04 00:17:26 -04:00 |
|
Yuxin Wang
|
fe18541299
|
Set socket blocking for send operations.
|
2018-10-04 00:04:50 -04:00 |
|
Yuxin Wang
|
13ba10c595
|
Add test for reporthook.
|
2018-10-04 00:01:22 -04:00 |
|
Yuxin Wang
|
f5f3335819
|
Add do_list_peers for tracker.
|
2018-10-04 00:01:07 -04:00 |
|
Yuxin Wang
|
9308d01638
|
Check file existence before doing the actual work.
|
2018-10-03 23:23:56 -04:00 |
|
Yuxin Wang
|
0c8db5cf68
|
Use urlretrive style reporthook.
|
2018-10-03 22:59:55 -04:00 |
|
Yuxin Wang
|
e801517fda
|
Make _hashfunc a class member.
|
2018-10-03 22:44:42 -04:00 |
|
Yuxin Wang
|
7d71241b7f
|
Make CHUNKSIZE protected.
|
2018-10-03 22:44:24 -04:00 |
|
Yuxin Wang
|
7bd7baf897
|
Remove wrong code.
|
2018-10-03 22:43:29 -04:00 |
|
Yuxin Wang
|
1a66e36374
|
Fix typo.
|
2018-10-03 17:10:21 -04:00 |
|
Yuxin Wang
|
5d90c2ec40
|
Remove list_peers command.
|
2018-10-03 16:29:21 -04:00 |
|
Yuxin Wang
|
b161dd00b0
|
Compute digest on raw data instead of base64 encoded data.
|
2018-10-02 23:50:07 -04:00 |
|
Yuxin Wang
|
0cdf383899
|
Add digest to chunk communications.
|
2018-10-02 21:23:09 -04:00 |
|
Yuxin Wang
|
d389ec57ad
|
Remove duplicate code.
|
2018-10-02 00:17:31 -04:00 |
|
Yuxin Wang
|
47748561a7
|
Add badges.
|
2018-10-01 23:57:19 -04:00 |
|
Yuxin Wang
|
4190742c49
|
Merge branch 'no-peer-connection-on-start'
|
2018-10-01 23:55:23 -04:00 |
|
Yuxin Wang
|
f66ba78999
|
Close the socket after calling _client_closed.
Subclass might use the client's information.
|
2018-10-01 23:55:02 -04:00 |
|
Yuxin Wang
|
d6a66bb1f7
|
Move closed error warning into subclasses.
|
2018-10-01 23:54:01 -04:00 |
|
Yuxin Wang
|
439ed70c6f
|
Stringfy the peer address.
JSON requires that the keys in dict must be strings.
|
2018-10-01 23:33:03 -04:00 |
|
Yuxin Wang
|
5345ac37e1
|
Move finally block to the end.
|
2018-10-01 23:32:06 -04:00 |
|
Yuxin Wang
|
55dde948a9
|
No need to iterate address.
|
2018-10-01 22:46:45 -04:00 |
|
Yuxin Wang
|
3cd897ab0f
|
Remove dead code.
|
2018-10-01 22:46:33 -04:00 |
|
Yuxin Wang
|
441a8fd11a
|
Move the position of the method.
|
2018-10-01 22:46:26 -04:00 |
|
Yuxin Wang
|
854d1676bb
|
Return boolean value for start method.
|
2018-10-01 22:30:46 -04:00 |
|
Yuxin Wang
|
97b2a34bef
|
Connect to peers when downloading.
|
2018-10-01 22:20:04 -04:00 |
|
Yuxin Wang
|
eb3f5c99ae
|
Store peer address instead of IDs.
|
2018-10-01 22:19:44 -04:00 |
|
Yuxin Wang
|
69c134f96d
|
Use address tuple instead of separate (ip, port).
|
2018-10-01 22:18:48 -04:00 |
|
Yuxin Wang
|
70136b99c1
|
Remove log for peers member.
|
2018-10-01 22:01:18 -04:00 |
|
Yuxin Wang
|
cd89348b1b
|
Simplify REQUEST_REGISTER.
Don't have to know the peer_list when register, only acquire when downloading.
|
2018-10-01 21:56:36 -04:00 |
|
Yuxin Wang
|
a755f21fd1
|
Remove peers member.
We don't have to maintain the list of peers since we only connect when needed.
|
2018-10-01 21:53:07 -04:00 |
|
Yuxin Wang
|
f5776ed9cd
|
Remove _server_started signal.
|
2018-10-01 21:52:24 -04:00 |
|
Yuxin Wang
|
488987a326
|
Return True/False for start method.
|
2018-10-01 21:47:53 -04:00 |
|
Yuxin Wang
|
5fb1142862
|
Remove PEER_GREET message.
|
2018-10-01 21:40:36 -04:00 |
|
Yuxin Wang
|
4819f1fb0b
|
Copy a set to prevent changes of set's size.
|
2018-10-01 20:45:53 -04:00 |
|
Yuxin Wang
|
90095353a2
|
Add timeout for server socket.
socket.accept() now will timeout in _listen method.
|
2018-10-01 20:16:00 -04:00 |
|
Yuxin Wang
|
8931aee7d2
|
Use pip to install codecov.
|
2018-10-01 16:54:21 -04:00 |
|
Yuxin Wang
|
ca44603284
|
Manage the threads.
|
2018-10-01 16:16:10 -04:00 |
|
Yuxin Wang
|
468df73f08
|
Add timeout to prevent forever waiting.
|
2018-10-01 15:18:12 -04:00 |
|
Yuxin Wang
|
2450554ffb
|
Start server after test files are created.
|
2018-10-01 15:17:53 -04:00 |
|
Yuxin Wang
|
8b6dc6a875
|
Use base class' stop.
The initiative connection is now managed by the base class.
|
2018-10-01 00:14:59 -04:00 |
|
Yuxin Wang
|
8db86a7ab4
|
Use with statement.
|
2018-10-01 00:14:26 -04:00 |
|
Yuxin Wang
|
590e9cd93f
|
Add initiative connections to connection set.
|
2018-10-01 00:14:16 -04:00 |
|
Yuxin Wang
|
9bd517fd4f
|
Fix exception capture.
|
2018-10-01 00:13:30 -04:00 |
|
Yuxin Wang
|
6d06b7900c
|
Add more notes.
|
2018-10-01 00:13:18 -04:00 |
|
Yuxin Wang
|
e6e996abf9
|
Use set to manage the connections.
|
2018-10-01 00:12:58 -04:00 |
|
Yuxin Wang
|
54bc2c901a
|
Replace exit with stop.
|
2018-09-30 14:22:55 -04:00 |
|
Yuxin Wang
|
b777ebb616
|
Fix peer name.
|
2018-09-30 13:49:24 -04:00 |
|