Astro
7a8f9a779f
server _onHttpRequest(): don't wrap errors in errors
2014-12-11 16:24:33 +01:00
Astro
74d9139049
server _onHttpRequest(): ensure non-empty params
2014-12-11 16:22:17 +01:00
Astro
7a417a591d
parseUdpRequest(): fix params.ip
2014-12-11 16:11:12 +01:00
Astro
8439300df9
server: unify compact serialization
2014-12-10 16:51:35 +01:00
Astro
b72960dee3
server: split out Swarm
2014-12-10 16:47:41 +01:00
Astro
1c754a2f49
move parseHttpRequest(), parseUdpRequest() to lib/parse_{http,udp}.js
2014-12-10 00:44:45 +01:00
Astro
aea3c44c08
server: expose getSwarm()
...
drops capability to pass a *hex* infoHash
2014-12-09 23:18:47 +01:00
Astro
fee289b074
server: rm superfluous action fields
2014-12-09 23:18:35 +01:00
Astro
366b49bf06
server: split out _onRequest() et al
2014-12-09 02:35:05 +01:00
Astro
85be917d51
server: replace request string by action number
2014-12-09 00:29:02 +01:00
Astro
0bc88bcf22
server: split out parseUdpRequest()
2014-12-09 00:22:36 +01:00
Astro
037a53accb
server: split out parseHttpRequest()
2014-12-08 23:42:05 +01:00
Feross Aboukhadijeh
2824f16c49
don't assume peer var will exist
2014-11-26 17:40:34 +08:00
Feross Aboukhadijeh
026f2c2de0
Recover from unexpected events better
...
When you restart the tracker server, all peers it's tracking are
discarded. Then, clients that are already running will continue to send
`update` events, but the tracker throws them away because it was
expected to get a `start` event first.
This should only be a warning, and not a fatal error. I just made the
following changes:
- unexpected `started` event (for peer already in swarm) is treated as
an `update`
- unexpected `stopped` event is discarded
- unexpected `completed` event is treated as a `start`
- unexpected `update` event (from peer not in swarm) is treated as
`start`
Fixes #42
2014-11-26 15:27:02 +08:00
Feross Aboukhadijeh
01286e2ee7
listen() without port picks random port
2014-08-16 19:05:56 -07:00
Feross Aboukhadijeh
3d3c0d44d0
better 'listening' event handling
2014-08-06 22:35:43 -07:00
Feross Aboukhadijeh
a8ad0ca1fd
handle numWant === 0
2014-08-03 02:28:54 -07:00
Feross Aboukhadijeh
ea1548abb0
remove extra peer_id check
2014-08-03 01:51:55 -07:00
Feross Aboukhadijeh
ab32d5e7a1
cleanup debug() usage
2014-08-02 14:41:04 -07:00
Feross Aboukhadijeh
ad5c5b6133
lots of little cleanup
2014-08-02 13:43:06 -07:00
Feross Aboukhadijeh
8a6744f276
server: add debug logs
2014-07-20 03:33:33 -07:00
Feross Aboukhadijeh
d1ac7d930e
listen for error on udp socket
2014-07-13 15:28:23 -07:00
Feross Aboukhadijeh
24c8535792
tracker returns warnings for non-fatal conditions
2014-07-12 18:56:25 -07:00
Feross Aboukhadijeh
be875c40af
Fix serious client+server encoding error ( fix #32 )
2014-07-12 18:44:41 -07:00
Feross Aboukhadijeh
65c44e81f7
http server: error on invalid peer_id
2014-07-12 18:40:52 -07:00
Feross Aboukhadijeh
a685cb8088
Servers should obey the numWant
parameter ( fix #21 )
2014-07-11 03:51:29 -07:00
Feross Aboukhadijeh
b4928f001a
Server perf: Use binary info_hash strings ( fix #29 )
2014-07-10 22:05:56 -07:00
Feross Aboukhadijeh
ec67f42b14
only /announce and /scrape are valid endpoints
2014-07-10 21:30:17 -07:00
Feross Aboukhadijeh
23d2c02fe6
Support scrape without info_hash specified ( Fix #28 )
2014-07-10 21:30:10 -07:00
Feross Aboukhadijeh
ce171f196c
move common encode/decode fns to common.js
2014-07-10 21:28:37 -07:00
Feross Aboukhadijeh
2c34583c5f
http tracker: support multiple info_hash scrapes
2014-07-10 21:00:55 -07:00
Feross Aboukhadijeh
bf1d382c7a
http tracker server: error on missing params
2014-07-10 19:59:33 -07:00
Feross Aboukhadijeh
ac00794fb4
error on missing info hash
2014-07-05 14:41:46 -07:00
Feross Aboukhadijeh
f21ab25347
support starting udp and http on different ports
2014-07-05 14:41:22 -07:00
Feross Aboukhadijeh
d35807f5a3
emit port with 'listening' event
2014-07-03 20:05:02 -07:00
Feross Aboukhadijeh
6696c01ee2
bncode -> bencode
2014-06-11 17:57:23 -07:00
Feross Aboukhadijeh
c403e5c29f
split client and server into separate files
2014-06-07 15:11:30 -07:00