8 #define TCP_ENDPOINT_H 1
10 #ifndef BOOST_ASIO_HPP
11 #error "asio.hpp must be included before including this, see asiolink.h as to why"
35 asio_endpoint_placeholder_(new
boost::asio::ip::tcp::endpoint()),
36 asio_endpoint_(*asio_endpoint_placeholder_)
44 asio_endpoint_placeholder_(
45 new
boost::asio::ip::tcp::endpoint(
boost::asio::ip::address::from_string(address.toText()),
47 asio_endpoint_(*asio_endpoint_placeholder_)
57 asio_endpoint_placeholder_(NULL), asio_endpoint_(asio_endpoint)
66 TCPEndpoint(
const boost::asio::ip::tcp::endpoint& asio_endpoint) :
67 asio_endpoint_placeholder_(new
boost::asio::ip::tcp::endpoint(asio_endpoint)),
68 asio_endpoint_(*asio_endpoint_placeholder_)
76 return (asio_endpoint_.address());
80 return (*asio_endpoint_.data());
84 return (asio_endpoint_.port());
88 return (asio_endpoint_.protocol().protocol());
92 return (asio_endpoint_.protocol().family());
98 return (asio_endpoint_);
101 return (asio_endpoint_);
105 boost::asio::ip::tcp::endpoint* asio_endpoint_placeholder_;
106 boost::asio::ip::tcp::endpoint& asio_endpoint_;
111 #endif // TCP_ENDPOINT_H