2 // local/stream_protocol.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~~~~~
5 // Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
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)
11 #ifndef BOOST_ASIO_LOCAL_STREAM_PROTOCOL_HPP
12 #define BOOST_ASIO_LOCAL_STREAM_PROTOCOL_HPP
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
18 #include <boost/asio/detail/config.hpp>
20 #if defined(BOOST_ASIO_HAS_LOCAL_SOCKETS) \
21 || defined(GENERATING_DOCUMENTATION)
23 #include <boost/asio/basic_socket_acceptor.hpp>
24 #include <boost/asio/basic_socket_iostream.hpp>
25 #include <boost/asio/basic_stream_socket.hpp>
26 #include <boost/asio/detail/socket_types.hpp>
27 #include <boost/asio/local/basic_endpoint.hpp>
29 #include <boost/asio/detail/push_options.hpp>
35 /// Encapsulates the flags needed for stream-oriented UNIX sockets.
37 * The boost::asio::local::stream_protocol class contains flags necessary for
38 * stream-oriented UNIX domain sockets.
41 * @e Distinct @e objects: Safe.@n
42 * @e Shared @e objects: Safe.
50 /// Obtain an identifier for the type of the protocol.
51 int type() const BOOST_ASIO_NOEXCEPT
56 /// Obtain an identifier for the protocol.
57 int protocol() const BOOST_ASIO_NOEXCEPT
62 /// Obtain an identifier for the protocol family.
63 int family() const BOOST_ASIO_NOEXCEPT
68 /// The type of a UNIX domain endpoint.
69 typedef basic_endpoint<stream_protocol> endpoint;
71 /// The UNIX domain socket type.
72 typedef basic_stream_socket<stream_protocol> socket;
74 /// The UNIX domain acceptor type.
75 typedef basic_socket_acceptor<stream_protocol> acceptor;
77 #if !defined(BOOST_ASIO_NO_IOSTREAM)
78 /// The UNIX domain iostream type.
79 typedef basic_socket_iostream<stream_protocol> iostream;
80 #endif // !defined(BOOST_ASIO_NO_IOSTREAM)
87 #include <boost/asio/detail/pop_options.hpp>
89 #endif // defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
90 // || defined(GENERATING_DOCUMENTATION)
92 #endif // BOOST_ASIO_LOCAL_STREAM_PROTOCOL_HPP