Struct socket2::Protocol
[−]
[src]
pub struct Protocol(_);
Protocol specification used for creating sockets via Socket::new.
This is a newtype wrapper around an integer which provides a nicer API in addition to an injection point for documentation.
This type is freely interconvertible with the i32 type, however, if a raw
value needs to be provided.
Methods
impl Protocol[src]
pub fn icmpv4() -> Self[src]
Protocol corresponding to ICMPv4
pub fn icmpv6() -> Self[src]
Protocol corresponding to ICMPv6
pub fn tcp() -> Self[src]
Protocol corresponding to TCP
pub fn udp() -> Self[src]
Protocol corresponding to UDP