12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- #ifndef BOOST_ASIO_IP_BASIC_RESOLVER_ENTRY_HPP
- #define BOOST_ASIO_IP_BASIC_RESOLVER_ENTRY_HPP
- #if defined(_MSC_VER) && (_MSC_VER >= 1200)
- # pragma once
- #endif
- #include <boost/asio/detail/push_options.hpp>
- #include <boost/asio/detail/push_options.hpp>
- #include <string>
- #include <boost/asio/detail/pop_options.hpp>
- namespace boost {
- namespace asio {
- namespace ip {
- template <typename InternetProtocol>
- class basic_resolver_entry
- {
- public:
-
- typedef InternetProtocol protocol_type;
-
- typedef typename InternetProtocol::endpoint endpoint_type;
-
- basic_resolver_entry()
- {
- }
-
- basic_resolver_entry(const endpoint_type& endpoint,
- const std::string& host_name, const std::string& service_name)
- : endpoint_(endpoint),
- host_name_(host_name),
- service_name_(service_name)
- {
- }
-
- endpoint_type endpoint() const
- {
- return endpoint_;
- }
-
- operator endpoint_type() const
- {
- return endpoint_;
- }
-
- std::string host_name() const
- {
- return host_name_;
- }
-
- std::string service_name() const
- {
- return service_name_;
- }
- private:
- endpoint_type endpoint_;
- std::string host_name_;
- std::string service_name_;
- };
- }
- }
- }
- #include <boost/asio/detail/pop_options.hpp>
- #endif
|