aquatic_ws: split networking into reader and writer tasks

This commit is contained in:
Joakim Frostegård 2021-11-01 21:34:34 +01:00
parent 77c9ca03e8
commit d2595e9746
2 changed files with 138 additions and 113 deletions

View file

@ -19,6 +19,9 @@ use crate::config::Config;
pub type TlsConfig = futures_rustls::rustls::ServerConfig;
#[derive(Copy, Clone, Debug)]
pub struct PendingScrapeId(pub usize);
#[derive(Copy, Clone, Debug)]
pub struct ConsumerId(pub usize);
@ -35,6 +38,7 @@ pub struct ConnectionMeta {
/// an IPv4 address if it was a IPv4-mapped IPv6 address
pub naive_peer_addr: SocketAddr,
pub converted_peer_ip: IpAddr,
pub pending_scrape_id: Option<PendingScrapeId>,
}
#[derive(PartialEq, Eq, Clone, Copy, Debug)]