/Src/Dependencies/Boost/boost/asio/ip/unicast.hpp

http://hadesmem.googlecode.com/ · C++ Header · 69 lines · 25 code · 9 blank · 35 comment · 1 complexity · 58baeac148a8cdbd61e9e6e418403a36 MD5 · raw file

  1. //
  2. // ip/unicast.hpp
  3. // ~~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  6. //
  7. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  8. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. #ifndef BOOST_ASIO_IP_UNICAST_HPP
  11. #define BOOST_ASIO_IP_UNICAST_HPP
  12. #if defined(_MSC_VER) && (_MSC_VER >= 1200)
  13. # pragma once
  14. #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
  15. #include <boost/asio/detail/config.hpp>
  16. #include <cstddef>
  17. #include <boost/asio/ip/detail/socket_option.hpp>
  18. #include <boost/asio/detail/push_options.hpp>
  19. namespace boost {
  20. namespace asio {
  21. namespace ip {
  22. namespace unicast {
  23. /// Socket option for time-to-live associated with outgoing unicast packets.
  24. /**
  25. * Implements the IPPROTO_IP/IP_UNICAST_TTL socket option.
  26. *
  27. * @par Examples
  28. * Setting the option:
  29. * @code
  30. * boost::asio::ip::udp::socket socket(io_service);
  31. * ...
  32. * boost::asio::ip::unicast::hops option(4);
  33. * socket.set_option(option);
  34. * @endcode
  35. *
  36. * @par
  37. * Getting the current option value:
  38. * @code
  39. * boost::asio::ip::udp::socket socket(io_service);
  40. * ...
  41. * boost::asio::ip::unicast::hops option;
  42. * socket.get_option(option);
  43. * int ttl = option.value();
  44. * @endcode
  45. *
  46. * @par Concepts:
  47. * GettableSocketOption, SettableSocketOption.
  48. */
  49. #if defined(GENERATING_DOCUMENTATION)
  50. typedef implementation_defined hops;
  51. #else
  52. typedef boost::asio::ip::detail::socket_option::unicast_hops<
  53. IPPROTO_IP, IP_TTL, IPPROTO_IPV6, IPV6_UNICAST_HOPS> hops;
  54. #endif
  55. } // namespace unicast
  56. } // namespace ip
  57. } // namespace asio
  58. } // namespace boost
  59. #include <boost/asio/detail/pop_options.hpp>
  60. #endif // BOOST_ASIO_IP_UNICAST_HPP