11 #ifndef ASIO_GENERIC_SEQ_PACKET_PROTOCOL_HPP 12 #define ASIO_GENERIC_SEQ_PACKET_PROTOCOL_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 52 : family_(address_family),
53 protocol_(socket_protocol)
62 template <
typename Protocol>
64 : family_(source_protocol.
family()),
65 protocol_(source_protocol.
protocol())
67 if (source_protocol.type() !=
type())
96 return p1.family_ == p2.family_ && p1.protocol_ == p2.protocol_;
122 #endif // ASIO_GENERIC_SEQ_PACKET_PROTOCOL_HPP int protocol() const
Obtain an identifier for the protocol.
int type() const
Obtain an identifier for the type of the protocol.
basic_seq_packet_socket< seq_packet_protocol > socket
The generic socket type.
Encapsulates the flags needed for a generic sequenced packet socket.
int family() const
Obtain an identifier for the protocol family.
friend bool operator==(const seq_packet_protocol &p1, const seq_packet_protocol &p2)
Compare two protocols for equality.
seq_packet_protocol(int address_family, int socket_protocol)
Construct a protocol object for a specific address family and protocol.
Provides sequenced packet socket functionality.
seq_packet_protocol(const Protocol &source_protocol)
Construct a generic protocol object from a specific protocol.
basic_endpoint< seq_packet_protocol > endpoint
The type of an endpoint.
void throw_exception(const Exception &e)
friend bool operator!=(const seq_packet_protocol &p1, const seq_packet_protocol &p2)
Compare two protocols for inequality.
Describes an endpoint for any socket type.