11 #ifndef ASIO_GENERIC_RAW_PROTOCOL_HPP 12 #define ASIO_GENERIC_RAW_PROTOCOL_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 54 : family_(address_family),
55 protocol_(socket_protocol)
63 template <
typename Protocol>
65 : family_(source_protocol.
family()),
66 protocol_(source_protocol.
protocol())
68 if (source_protocol.type() !=
type())
96 return p1.family_ == p2.family_ && p1.protocol_ == p2.protocol_;
121 #endif // ASIO_GENERIC_RAW_PROTOCOL_HPP
basic_raw_socket< raw_protocol > socket
The generic socket type.
raw_protocol(const Protocol &source_protocol)
Construct a generic protocol object from a specific protocol.
int protocol() const
Obtain an identifier for the protocol.
Provides raw-oriented socket functionality.
raw_protocol(int address_family, int socket_protocol)
Construct a protocol object for a specific address family and protocol.
int type() const
Obtain an identifier for the type of the protocol.
basic_endpoint< raw_protocol > endpoint
The type of an endpoint.
void throw_exception(const Exception &e)
int family() const
Obtain an identifier for the protocol family.
friend bool operator==(const raw_protocol &p1, const raw_protocol &p2)
Compare two protocols for equality.
Encapsulates the flags needed for a generic raw socket.
Describes an endpoint for any socket type.
friend bool operator!=(const raw_protocol &p1, const raw_protocol &p2)
Compare two protocols for inequality.