mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
aquatic_ws: convert ipv4-mapped ipv6 addresses to ipv4 (for state split)
This commit is contained in:
parent
4067e420c3
commit
809d16919d
4 changed files with 25 additions and 14 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use std::net::SocketAddr;
|
||||
use std::net::{SocketAddr, IpAddr};
|
||||
use std::sync::Arc;
|
||||
|
||||
use crossbeam_channel::{Sender, Receiver};
|
||||
|
|
@ -18,7 +18,10 @@ 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,
|
||||
pub peer_addr: SocketAddr,
|
||||
/// Peer address as received from socket, meaning it wasn't converted to
|
||||
/// an IPv4 address if it was a IPv4-mapped IPv6 address
|
||||
pub naive_peer_addr: SocketAddr,
|
||||
pub converted_peer_ip: IpAddr,
|
||||
pub poll_token: Token,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue