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
This commit is contained in:
Joakim Frostegård 2020-08-10 02:48:28 +02:00
parent 1d2dfe3fe1
commit cce7bd7150
5 changed files with 74 additions and 36 deletions

View file

@ -121,7 +121,7 @@ impl Default for NetworkConfig {
tls: TlsConfig::default(),
keep_alive: true,
poll_event_capacity: 4096,
poll_timeout_microseconds: 10_000,
poll_timeout_microseconds: 200_000,
}
}
}
@ -141,7 +141,7 @@ impl Default for ProtocolConfig {
impl Default for HandlerConfig {
fn default() -> Self {
Self {
max_requests_per_iter: 10000,
max_requests_per_iter: 10_000,
channel_recv_timeout_microseconds: 200,
}
}