pub enum Socket<'a> {
Raw(Socket<'a>),
Icmp(Socket<'a>),
Udp(Socket<'a>),
Tcp(Socket<'a>),
Dhcpv4(Socket<'a>),
Dns(Socket<'a>),
}
Expand description
A network socket.
This enumeration abstracts the various types of sockets based on the IP protocol.
To downcast a Socket
value to a concrete socket, use the AnySocket trait,
e.g. to get udp::Socket
, call udp::Socket::downcast(socket)
.
It is usually more convenient to use SocketSet::get instead.