pub struct HeaderV1 {
pub protocol: ProtocolSupportedV1,
pub addr_src: SocketAddr,
pub addr_dst: SocketAddr,
}
Expand description
WARNING: proxy protocol v1 is never used in Sōzu, only v2. The tests have been commented out, the whole code may be meant for deletion.
Proxy Protocol header for version 1 (text version) Example:
- TCP/IPv4:
PROXY TCP4 255.255.255.255 255.255.255.255 65535 65535\r\n
- TCP/IPv6:
PROXY TCP6 ffff:f...f:ffff ffff:f...f:ffff 65535 65535\r\n
- Unknown:
PROXY UNKNOWN\r\n
Fields§
§protocol: ProtocolSupportedV1
§addr_src: SocketAddr
§addr_dst: SocketAddr
Implementations§
Source§impl HeaderV1
impl HeaderV1
pub fn new(addr_src: SocketAddr, addr_dst: SocketAddr) -> Self
pub fn into_bytes(&self) -> Vec<u8> ⓘ
Trait Implementations§
impl Eq for HeaderV1
impl StructuralPartialEq for HeaderV1
Auto Trait Implementations§
impl Freeze for HeaderV1
impl RefUnwindSafe for HeaderV1
impl Send for HeaderV1
impl Sync for HeaderV1
impl Unpin for HeaderV1
impl UnwindSafe for HeaderV1
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.