Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.6KB

  1. //
  2. // ip/unicast.hpp
  3. // ~~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2003-2019 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 ASIO_IP_UNICAST_HPP
  11. #define 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 "asio/detail/config.hpp"
  16. #include <cstddef>
  17. #include "asio/ip/detail/socket_option.hpp"
  18. #include "asio/detail/push_options.hpp"
  19. namespace asio {
  20. namespace ip {
  21. namespace unicast {
  22. /// Socket option for time-to-live associated with outgoing unicast packets.
  23. /**
  24. * Implements the IPPROTO_IP/IP_UNICAST_TTL socket option.
  25. *
  26. * @par Examples
  27. * Setting the option:
  28. * @code
  29. * asio::ip::udp::socket socket(my_context);
  30. * ...
  31. * asio::ip::unicast::hops option(4);
  32. * socket.set_option(option);
  33. * @endcode
  34. *
  35. * @par
  36. * Getting the current option value:
  37. * @code
  38. * asio::ip::udp::socket socket(my_context);
  39. * ...
  40. * asio::ip::unicast::hops option;
  41. * socket.get_option(option);
  42. * int ttl = option.value();
  43. * @endcode
  44. *
  45. * @par Concepts:
  46. * GettableSocketOption, SettableSocketOption.
  47. */
  48. #if defined(GENERATING_DOCUMENTATION)
  49. typedef implementation_defined hops;
  50. #else
  51. typedef asio::ip::detail::socket_option::unicast_hops<
  52. ASIO_OS_DEF(IPPROTO_IP),
  53. ASIO_OS_DEF(IP_TTL),
  54. ASIO_OS_DEF(IPPROTO_IPV6),
  55. ASIO_OS_DEF(IPV6_UNICAST_HOPS)> hops;
  56. #endif
  57. } // namespace unicast
  58. } // namespace ip
  59. } // namespace asio
  60. #include "asio/detail/pop_options.hpp"
  61. #endif // ASIO_IP_UNICAST_HPP