11 #ifndef ASIO_GENERIC_STREAM_PROTOCOL_HPP 12 #define ASIO_GENERIC_STREAM_PROTOCOL_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 55 : family_(address_family),
56 protocol_(socket_protocol)
64 template <
typename Protocol>
66 : family_(source_protocol.
family()),
67 protocol_(source_protocol.
protocol())
69 if (source_protocol.type() !=
type())
97 return p1.family_ == p2.family_ && p1.protocol_ == p2.protocol_;
112 #if !defined(ASIO_NO_IOSTREAM) 115 #endif // !defined(ASIO_NO_IOSTREAM) 127 #endif // ASIO_GENERIC_STREAM_PROTOCOL_HPP friend bool operator!=(const stream_protocol &p1, const stream_protocol &p2)
Compare two protocols for inequality.
Iostream interface for a socket.
Provides stream-oriented socket functionality.
basic_socket_iostream< stream_protocol > iostream
The generic socket iostream type.
int type() const
Obtain an identifier for the type of the protocol.
stream_protocol(const Protocol &source_protocol)
Construct a generic protocol object from a specific protocol.
friend bool operator==(const stream_protocol &p1, const stream_protocol &p2)
Compare two protocols for equality.
stream_protocol(int address_family, int socket_protocol)
Construct a protocol object for a specific address family and protocol.
int family() const
Obtain an identifier for the protocol family.
basic_stream_socket< stream_protocol > socket
The generic socket type.
Encapsulates the flags needed for a generic stream-oriented socket.
int protocol() const
Obtain an identifier for the protocol.
void throw_exception(const Exception &e)
Describes an endpoint for any socket type.
basic_endpoint< stream_protocol > endpoint
The type of an endpoint.