Chris@16: // Chris@16: // local/stream_protocol.hpp Chris@16: // ~~~~~~~~~~~~~~~~~~~~~~~~~ Chris@16: // Chris@101: // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) Chris@16: // Chris@16: // Distributed under the Boost Software License, Version 1.0. (See accompanying Chris@16: // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: // Chris@16: Chris@16: #ifndef BOOST_ASIO_LOCAL_STREAM_PROTOCOL_HPP Chris@16: #define BOOST_ASIO_LOCAL_STREAM_PROTOCOL_HPP Chris@16: Chris@16: #if defined(_MSC_VER) && (_MSC_VER >= 1200) Chris@16: # pragma once Chris@16: #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) Chris@16: Chris@16: #include Chris@16: Chris@16: #if defined(BOOST_ASIO_HAS_LOCAL_SOCKETS) \ Chris@16: || defined(GENERATING_DOCUMENTATION) Chris@16: Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: Chris@16: #include Chris@16: Chris@16: namespace boost { Chris@16: namespace asio { Chris@16: namespace local { Chris@16: Chris@16: /// Encapsulates the flags needed for stream-oriented UNIX sockets. Chris@16: /** Chris@16: * The boost::asio::local::stream_protocol class contains flags necessary for Chris@16: * stream-oriented UNIX domain sockets. Chris@16: * Chris@16: * @par Thread Safety Chris@16: * @e Distinct @e objects: Safe.@n Chris@16: * @e Shared @e objects: Safe. Chris@16: * Chris@16: * @par Concepts: Chris@16: * Protocol. Chris@16: */ Chris@16: class stream_protocol Chris@16: { Chris@16: public: Chris@16: /// Obtain an identifier for the type of the protocol. Chris@16: int type() const Chris@16: { Chris@16: return SOCK_STREAM; Chris@16: } Chris@16: Chris@16: /// Obtain an identifier for the protocol. Chris@16: int protocol() const Chris@16: { Chris@16: return 0; Chris@16: } Chris@16: Chris@16: /// Obtain an identifier for the protocol family. Chris@16: int family() const Chris@16: { Chris@16: return AF_UNIX; Chris@16: } Chris@16: Chris@16: /// The type of a UNIX domain endpoint. Chris@16: typedef basic_endpoint endpoint; Chris@16: Chris@16: /// The UNIX domain socket type. Chris@16: typedef basic_stream_socket socket; Chris@16: Chris@16: /// The UNIX domain acceptor type. Chris@16: typedef basic_socket_acceptor acceptor; Chris@16: Chris@16: #if !defined(BOOST_ASIO_NO_IOSTREAM) Chris@16: /// The UNIX domain iostream type. Chris@16: typedef basic_socket_iostream iostream; Chris@16: #endif // !defined(BOOST_ASIO_NO_IOSTREAM) Chris@16: }; Chris@16: Chris@16: } // namespace local Chris@16: } // namespace asio Chris@16: } // namespace boost Chris@16: Chris@16: #include Chris@16: Chris@16: #endif // defined(BOOST_ASIO_HAS_LOCAL_SOCKETS) Chris@16: // || defined(GENERATING_DOCUMENTATION) Chris@16: Chris@16: #endif // BOOST_ASIO_LOCAL_STREAM_PROTOCOL_HPP