11 #ifndef ASIO_IP_IMPL_BASIC_ENDPOINT_HPP 12 #define ASIO_IP_IMPL_BASIC_ENDPOINT_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 #if !defined(ASIO_NO_IOSTREAM) 27 template <
typename Elem,
typename Traits,
typename InternetProtocol>
29 std::basic_ostream<Elem, Traits>& os,
34 std::string
s = tmp_ep.to_string(ec);
37 if (os.exceptions() & std::basic_ostream<Elem, Traits>::failbit)
40 os.setstate(std::basic_ostream<Elem, Traits>::failbit);
43 for (std::string::iterator i = s.begin(); i != s.end(); ++i)
53 #endif // !defined(ASIO_NO_IOSTREAM) 55 #endif // ASIO_IP_IMPL_BASIC_ENDPOINT_HPP void throw_error(const asio::error_code &err)
Describes an endpoint for a version-independent IP socket.
asio::ip::address address() const
Get the IP address associated with the endpoint.
unsigned short port() const
std::basic_ostream< Elem, Traits > & operator<<(std::basic_ostream< Elem, Traits > &os, const address &addr)
Class to represent an error code value.