Commit graph

16 commits

Author SHA1 Message Date
Joakim Frostegård
cce7bd7150 aquatic_http: send responses for each event, use mio poll waker
This means
* less fluctuation in number of responses send per second
* longer poll timeouts can be used since poll is woken when
  responses are available for sending
* drain-like method used to fetch responses from response
  channel, meaning responses added while iterating won't
  be processed
2020-08-10 02:53:15 +02:00
Joakim Frostegård
2893fffd20 aquatic_http: use const LISTENER_TOKEN for clarity 2020-08-09 00:44:39 +02:00
Joakim Frostegård
a3a1d1606b WIP: udp: add ipv6 support
Returning IPv6 peers doesn't really work with UDP. It is not supported by
https://libtorrent.org/udp_tracker_protocol.html. There is a suggestion in
https://web.archive.org/web/20170503181830/http://opentracker.blog.h3q.com/2007/12/28/the-ipv6-situation/
of using action number 4 and returning IPv6 octets just like for IPv4
addresses. Clients seem not to support it very well, but due to a lack of
alternative solutions, it is implemented here
2020-07-31 05:37:58 +02:00
Joakim Frostegård
228511b3aa aquatic_http: replace flume with crossbeam; clean connections less often 2020-07-24 20:36:46 +02:00
Joakim Frostegård
f1f708465a remove aquatic_common_tcp crate, move contents into aquatic_http
It doesn't make a lot of sense to make a separate crate for
the few things here. I don't really want tight coupling between
the crates anyway, since it impedes making changes in them
and makes understanding them more difficult.
2020-07-21 23:01:34 +02:00
Joakim Frostegård
4ac2012a2a aquatic_http: move protocol module to new crate aquatic_http_protocol 2020-07-19 21:59:31 +02:00
Joakim Frostegård
9df1f0ecc6 aquatic_http: rewrite request parsing, use smartstring
Use smartstring in PeerMapKey too.

Improves benchmark speed.

request-from-path:

time:   [2.1484 us 2.1530 us 2.1586 us]
change: [-24.246% -23.908% -23.570%] (p = 0.00 < 0.01)
Performance has improved.
2020-07-19 15:38:26 +02:00
Joakim Frostegård
8ddccb20aa aquatic_http: use new trait Ip for ip generic parameters 2020-07-08 14:22:30 +02:00
Joakim Frostegård
2386dd0e8b aquatic_http: parameterise many data structures over peer IP protocol 2020-07-08 14:13:10 +02:00
Joakim Frostegård
43a33d80c4 aquatic_http: add ipv6 compact responses; fix ipv4/ipv6 issue 2020-07-08 12:26:41 +02:00
Joakim Frostegård
ccafdc5cd3 aquatic_http: clean up clode 2020-07-04 13:51:43 +02:00
Joakim Frostegård
c50dec3496 aquatic_http: add PeerMapKey with PeerID and Either<Ip, announce key> 2020-07-04 12:00:36 +02:00
Joakim Frostegård
7419c51434 aquatic_http protocol: refactor into more submodules, other fixes 2020-07-03 17:25:31 +02:00
Joakim Frostegård
1dc2f44d9c restructure aquatic_common_tcp, move more into it from aquatic_http 2020-07-03 00:23:19 +02:00
Joakim Frostegård
2e53a2adc1 add aquatic_common_tcp crate, move common functionality there 2020-07-02 16:34:36 +02:00
Joakim Frostegård
404e528616 WIP: start work on http tracker 2020-07-01 18:56:19 +02:00