12 #ifndef ASIO_LOCAL_BASIC_ENDPOINT_HPP 13 #define ASIO_LOCAL_BASIC_ENDPOINT_HPP 15 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 17 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 21 #if defined(ASIO_HAS_LOCAL_SOCKETS) \ 22 || defined(GENERATING_DOCUMENTATION) 26 #if !defined(ASIO_NO_IOSTREAM) 28 #endif // !defined(ASIO_NO_IOSTREAM) 47 template <
typename Protocol>
52 typedef Protocol protocol_type;
56 #if defined(GENERATING_DOCUMENTATION) 57 typedef implementation_defined data_type;
68 basic_endpoint(
const char* path_name)
74 basic_endpoint(
const std::string& path_name)
80 basic_endpoint(
const basic_endpoint& other)
85 #if defined(ASIO_HAS_MOVE) 86 basic_endpoint(basic_endpoint&& other)
91 #endif // defined(ASIO_HAS_MOVE) 94 basic_endpoint& operator=(
const basic_endpoint& other)
100 #if defined(ASIO_HAS_MOVE) 101 basic_endpoint& operator=(basic_endpoint&& other)
107 #endif // defined(ASIO_HAS_MOVE) 110 protocol_type protocol()
const 112 return protocol_type();
122 const data_type* data()
const 128 std::size_t size()
const 134 void resize(std::size_t new_size)
136 impl_.resize(new_size);
140 std::size_t capacity()
const 142 return impl_.capacity();
146 std::string path()
const 152 void path(
const char* p)
158 void path(
const std::string& p)
164 friend bool operator==(
const basic_endpoint<Protocol>& e1,
165 const basic_endpoint<Protocol>& e2)
167 return e1.impl_ == e2.impl_;
171 friend bool operator!=(
const basic_endpoint<Protocol>& e1,
172 const basic_endpoint<Protocol>& e2)
174 return !(e1.impl_ == e2.impl_);
178 friend bool operator<(const basic_endpoint<Protocol>& e1,
179 const basic_endpoint<Protocol>& e2)
181 return e1.impl_ < e2.impl_;
185 friend bool operator>(
const basic_endpoint<Protocol>& e1,
186 const basic_endpoint<Protocol>& e2)
188 return e2.impl_ < e1.impl_;
192 friend bool operator<=(const basic_endpoint<Protocol>& e1,
193 const basic_endpoint<Protocol>& e2)
199 friend bool operator>=(
const basic_endpoint<Protocol>& e1,
200 const basic_endpoint<Protocol>& e2)
207 asio::local::detail::endpoint impl_;
222 template <
typename Elem,
typename Traits,
typename Protocol>
224 std::basic_ostream<Elem, Traits>& os,
225 const basic_endpoint<Protocol>& endpoint)
227 os << endpoint.path();
236 #endif // defined(ASIO_HAS_LOCAL_SOCKETS) 239 #endif // ASIO_LOCAL_BASIC_ENDPOINT_HPP
std::basic_ostream< Elem, Traits > & operator<<(std::basic_ostream< Elem, Traits > &os, const error_code &ec)
Output an error code.
sockaddr socket_addr_type
bool operator==(const endpoint &e1, const endpoint &e2)