Encapsulates the flags needed for a generic datagram-oriented socket.
class datagram_protocol
Name |
Description |
---|---|
datagram_protocol [constructor] |
Construct a protocol object for a specific address family and protocol.
|
Obtain an identifier for the protocol family. |
|
Obtain an identifier for the protocol. |
|
Obtain an identifier for the type of the protocol. |
Name |
Description |
---|---|
Compare two protocols for inequality. |
|
Compare two protocols for equality. |
The generic::datagram_protocol
class contains flags necessary for datagram-oriented sockets of any address
family and protocol.
Constructing using a native address family and socket protocol:
datagram_protocol p(AF_INET, IPPROTO_UDP);
Constructing from a specific protocol type:
datagram_protocol p(asio::ip::udp::v4());
Distinct objects: Safe.
Shared objects: Safe.
Header: asio/generic/datagram_protocol.hpp
Convenience header: asio.hpp