Yuxin Wang
|
bb06947048
|
Use Queue() for synchronization.
|
2018-09-26 21:11:52 -04:00 |
|
Yuxin Wang
|
01dd79b974
|
Add exit method.
|
2018-09-26 21:10:30 -04:00 |
|
Yuxin Wang
|
d3901e740e
|
Add error hanlding for messages.
|
2018-09-26 21:01:11 -04:00 |
|
Yuxin Wang
|
f56bc1c33d
|
Re-order the code and notes.
|
2018-09-26 19:49:17 -04:00 |
|
Yuxin Wang
|
84c66d3067
|
Print tabulate instead of pure objects.
|
2018-09-26 17:52:02 -04:00 |
|
Yuxin Wang
|
195e01f139
|
Return a tuple to hide the internal implementation.
|
2018-09-26 17:51:23 -04:00 |
|
Yuxin Wang
|
d25f3dad15
|
Return just values to prevent printing trash.
|
2018-09-26 17:35:12 -04:00 |
|
Yuxin Wang
|
04fd311cca
|
Add list chunkinfo command.
|
2018-09-26 17:34:34 -04:00 |
|
Yuxin Wang
|
b1dc0b9430
|
Move download method to peer.
|
2018-09-26 17:33:49 -04:00 |
|
Yuxin Wang
|
42e40a535c
|
Add refresh file list in download method.
|
2018-09-26 17:31:14 -04:00 |
|
Yuxin Wang
|
f799119a69
|
Add call for release() once the method finishes.
|
2018-09-26 17:21:26 -04:00 |
|
Yuxin Wang
|
61ba4fb321
|
Delay the deletion.
|
2018-09-26 17:21:09 -04:00 |
|
Yuxin Wang
|
2a26d67430
|
Add some notes.
|
2018-09-26 17:20:29 -04:00 |
|
Yuxin Wang
|
23f269d63c
|
Add thread-safety as a TODO.
|
2018-09-26 17:20:16 -04:00 |
|
Yuxin Wang
|
2eeb3fa529
|
Add more notes.
|
2018-09-26 16:23:11 -04:00 |
|
Yuxin Wang
|
16f66910a2
|
Implement simple cmd terminal.
|
2018-09-26 11:12:39 -04:00 |
|
Yuxin Wang
|
f7d5c0db35
|
Improve notes.
|
2018-09-26 11:12:24 -04:00 |
|
Yuxin Wang
|
01ff331b58
|
Add public interfaces of states.
|
2018-09-26 11:12:16 -04:00 |
|
Yuxin Wang
|
fa54c18507
|
Manage chunkinfo separately.
|
2018-09-26 11:12:00 -04:00 |
|
Yuxin Wang
|
e88464469a
|
Chunkinfo is managed by another command.
|
2018-09-26 11:11:25 -04:00 |
|
Yuxin Wang
|
d7f6bbdb0a
|
Rename PeerServer to Peer.
|
2018-09-26 10:35:37 -04:00 |
|
Yuxin Wang
|
8ad60f73da
|
Rename module utils to server.
|
2018-09-26 09:59:56 -04:00 |
|
Yuxin Wang
|
d0c0abe00e
|
Rename the module to tracker.
|
2018-09-26 09:59:07 -04:00 |
|
Yuxin Wang
|
4b8caa06cf
|
Rename the central server to tracker.
|
2018-09-26 09:58:52 -04:00 |
|
Yuxin Wang
|
21f7fdc8d7
|
Implement publish and list file.
|
2018-09-26 09:49:25 -04:00 |
|
Yuxin Wang
|
df42d117d7
|
Add 2 messages.
|
2018-09-26 09:48:46 -04:00 |
|
Yuxin Wang
|
93f574c517
|
Add publish method.
|
2018-09-25 21:17:56 -04:00 |
|
Yuxin Wang
|
7b8d8f113c
|
Send request after peer server has started.
|
2018-09-25 15:57:49 -04:00 |
|
Yuxin Wang
|
dd7073296c
|
Use non-blocking method.
|
2018-09-25 15:57:31 -04:00 |
|
Yuxin Wang
|
7ec372ad97
|
Add non-blocking start method.
Add signal _server_started.
|
2018-09-25 15:57:22 -04:00 |
|
Yuxin Wang
|
291d7cbe9e
|
Use uuid instead of serial number.
|
2018-09-25 15:45:02 -04:00 |
|
Yuxin Wang
|
cc47037ee1
|
Handle PEER_GREET.
|
2018-09-25 14:30:10 -04:00 |
|
Yuxin Wang
|
f3e40838cb
|
Distinguish server sock and other clients.
|
2018-09-25 14:29:57 -04:00 |
|
Yuxin Wang
|
4ac21568fd
|
Store id of each peer.
|
2018-09-25 14:29:16 -04:00 |
|
Yuxin Wang
|
998daaaa59
|
Handle REQUEST_REGISTER.
|
2018-09-25 14:28:11 -04:00 |
|
Yuxin Wang
|
993b1050de
|
Store id in server.
|
2018-09-25 14:27:56 -04:00 |
|
Yuxin Wang
|
747d7890b2
|
Add request register codes.
|
2018-09-25 13:21:42 -04:00 |
|
Yuxin Wang
|
a45928a20c
|
Remove REPLY_PEER_LIST/ Add PEER_GREET.
|
2018-09-25 13:20:57 -04:00 |
|
Yuxin Wang
|
eccd48e08b
|
Output debug messages.
|
2018-09-25 13:20:38 -04:00 |
|
Yuxin Wang
|
64d28e6490
|
Output to debug channel.
|
2018-09-25 13:20:28 -04:00 |
|
Yuxin Wang
|
4c31685d4d
|
Log before new connection is processed.
|
2018-09-25 12:45:55 -04:00 |
|
Yuxin Wang
|
b36df3f9d0
|
Output debug message about the incoming packets.
|
2018-09-25 10:25:53 -04:00 |
|
Yuxin Wang
|
1deba980bf
|
Use simple enum class to represent message types.
|
2018-09-25 10:12:24 -04:00 |
|
Yuxin Wang
|
7abc057ac7
|
Add client when connected.
|
2018-09-25 10:00:55 -04:00 |
|
Yuxin Wang
|
22865f9ce6
|
Remove client when closed.
|
2018-09-25 10:00:45 -04:00 |
|
Yuxin Wang
|
bdde485c7c
|
Add debug output.
|
2018-09-25 10:00:32 -04:00 |
|
Yuxin Wang
|
a7857d257d
|
Use connect method of MessageServer.
|
2018-09-25 09:59:57 -04:00 |
|
Yuxin Wang
|
eb359ee1f0
|
Add connect method.
Auto-handling the connected socket.
|
2018-09-25 09:59:33 -04:00 |
|
Yuxin Wang
|
bd873b33a0
|
Make recvall method private.
|
2018-09-25 09:59:11 -04:00 |
|
Yuxin Wang
|
45de290bf7
|
Guard the operations.
|
2018-09-25 00:09:09 -04:00 |
|