aquatic_http: improve ConnectionMeta field names and types

This commit is contained in:
Joakim Frostegård 2021-10-28 19:30:04 +02:00
parent 2deadb2fff
commit af0761418e
3 changed files with 13 additions and 13 deletions

View file

@ -129,15 +129,16 @@ impl Ip for Ipv6Addr {}
pub struct ConnectionMeta {
/// Index of socket worker responsible for this connection. Required for
/// sending back response through correct channel to correct worker.
pub worker_index: usize, // Or response consumer id in glommio
pub response_consumer_id: ConsumerId,
pub peer_addr: SocketAddr,
pub poll_token: usize, // Or connection id in glommio
/// Connection id local to socket worker
pub connection_id: ConnectionId,
}
#[derive(Clone, Copy, Debug)]
pub struct PeerConnectionMeta<I: Ip> {
pub worker_index: usize,
pub poll_token: usize,
pub response_consumer_id: ConsumerId,
pub connection_id: ConnectionId,
pub peer_ip_address: I,
}