11 #ifndef ASIO_GENERIC_BASIC_ENDPOINT_HPP 12 #define ASIO_GENERIC_BASIC_ENDPOINT_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 41 template <
typename Protocol>
50 #if defined(GENERATING_DOCUMENTATION) 63 std::size_t socket_address_size,
int socket_protocol = 0)
64 : impl_(socket_address, socket_address_size, socket_protocol)
69 template <
typename Endpo
int>
81 #if defined(ASIO_HAS_MOVE) 87 #endif // defined(ASIO_HAS_MOVE) 96 #if defined(ASIO_HAS_MOVE) 103 #endif // defined(ASIO_HAS_MOVE) 145 return e1.impl_ == e2.impl_;
152 return !(e1.impl_ == e2.impl_);
156 friend bool operator<(const basic_endpoint<Protocol>& e1,
159 return e1.impl_ < e2.impl_;
166 return e2.impl_ < e1.impl_;
170 friend bool operator<=(const basic_endpoint<Protocol>& e1,
193 #endif // ASIO_GENERIC_BASIC_ENDPOINT_HPP std::size_t capacity() const
Get the capacity of the endpoint in the native type.
const data_type * data() const
Get the underlying endpoint in the native type.
friend bool operator>=(const basic_endpoint< Protocol > &e1, const basic_endpoint< Protocol > &e2)
Compare endpoints for ordering.
basic_endpoint(const Endpoint &endpoint)
Construct an endpoint from the specific endpoint type.
Protocol protocol_type
The protocol type associated with the endpoint.
data_type * data()
Get the underlying endpoint in the native type.
sockaddr socket_addr_type
ASIO_DECL void resize(std::size_t size)
friend bool operator>(const basic_endpoint< Protocol > &e1, const basic_endpoint< Protocol > &e2)
Compare endpoints for ordering.
basic_endpoint(const void *socket_address, std::size_t socket_address_size, int socket_protocol=0)
Construct an endpoint from the specified socket address.
protocol_type protocol() const
The protocol associated with the endpoint.
basic_endpoint()
Default constructor.
basic_endpoint & operator=(const basic_endpoint &other)
Assign from another endpoint.
asio::detail::socket_addr_type * data()
std::size_t size() const
Get the underlying size of the endpoint in the native type.
void resize(std::size_t new_size)
Set the underlying size of the endpoint in the native type.
basic_endpoint(const basic_endpoint &other)
Copy constructor.
asio::detail::socket_addr_type data_type
friend bool operator==(const basic_endpoint< Protocol > &e1, const basic_endpoint< Protocol > &e2)
Compare two endpoints for equality.
friend bool operator!=(const basic_endpoint< Protocol > &e1, const basic_endpoint< Protocol > &e2)
Compare two endpoints for inequality.
std::size_t capacity() const
Describes an endpoint for any socket type.