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.

stream_protocol.hpp 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. //
  2. // local/stream_protocol.hpp
  3. // ~~~~~~~~~~~~~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2003-2015 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_LOCAL_STREAM_PROTOCOL_HPP
  11. #define ASIO_LOCAL_STREAM_PROTOCOL_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. #if defined(ASIO_HAS_LOCAL_SOCKETS) \
  17. || defined(GENERATING_DOCUMENTATION)
  18. #include "asio/basic_socket_acceptor.hpp"
  19. #include "asio/basic_socket_iostream.hpp"
  20. #include "asio/basic_stream_socket.hpp"
  21. #include "asio/detail/socket_types.hpp"
  22. #include "asio/local/basic_endpoint.hpp"
  23. #include "asio/detail/push_options.hpp"
  24. namespace asio {
  25. namespace local {
  26. /// Encapsulates the flags needed for stream-oriented UNIX sockets.
  27. /**
  28. * The asio::local::stream_protocol class contains flags necessary for
  29. * stream-oriented UNIX domain sockets.
  30. *
  31. * @par Thread Safety
  32. * @e Distinct @e objects: Safe.@n
  33. * @e Shared @e objects: Safe.
  34. *
  35. * @par Concepts:
  36. * Protocol.
  37. */
  38. class stream_protocol
  39. {
  40. public:
  41. /// Obtain an identifier for the type of the protocol.
  42. int type() const
  43. {
  44. return SOCK_STREAM;
  45. }
  46. /// Obtain an identifier for the protocol.
  47. int protocol() const
  48. {
  49. return 0;
  50. }
  51. /// Obtain an identifier for the protocol family.
  52. int family() const
  53. {
  54. return AF_UNIX;
  55. }
  56. /// The type of a UNIX domain endpoint.
  57. typedef basic_endpoint<stream_protocol> endpoint;
  58. /// The UNIX domain socket type.
  59. typedef basic_stream_socket<stream_protocol> socket;
  60. /// The UNIX domain acceptor type.
  61. typedef basic_socket_acceptor<stream_protocol> acceptor;
  62. #if !defined(ASIO_NO_IOSTREAM)
  63. /// The UNIX domain iostream type.
  64. typedef basic_socket_iostream<stream_protocol> iostream;
  65. #endif // !defined(ASIO_NO_IOSTREAM)
  66. };
  67. } // namespace local
  68. } // namespace asio
  69. #include "asio/detail/pop_options.hpp"
  70. #endif // defined(ASIO_HAS_LOCAL_SOCKETS)
  71. // || defined(GENERATING_DOCUMENTATION)
  72. #endif // ASIO_LOCAL_STREAM_PROTOCOL_HPP