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]
fn icmpv4() -> Self
Protocol corresponding to ICMPv4
fn icmpv6() -> Self
Protocol corresponding to ICMPv6
fn tcp() -> Self
Protocol corresponding to TCP
fn udp() -> Self
Protocol corresponding to UDP