Statistics
| Revision:

root / tmp / org.txm.statsengine.r.core.win32 / res / win32 / library / BH / include / boost / asio / local / stream_protocol.hpp @ 2486

History | View | Annotate | Download (2.3 kB)

1 2486 sjacqu01
//
2 2486 sjacqu01
// local/stream_protocol.hpp
3 2486 sjacqu01
// ~~~~~~~~~~~~~~~~~~~~~~~~~
4 2486 sjacqu01
//
5 2486 sjacqu01
// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6 2486 sjacqu01
//
7 2486 sjacqu01
// Distributed under the Boost Software License, Version 1.0. (See accompanying
8 2486 sjacqu01
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 2486 sjacqu01
//
10 2486 sjacqu01
11 2486 sjacqu01
#ifndef BOOST_ASIO_LOCAL_STREAM_PROTOCOL_HPP
12 2486 sjacqu01
#define BOOST_ASIO_LOCAL_STREAM_PROTOCOL_HPP
13 2486 sjacqu01
14 2486 sjacqu01
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 2486 sjacqu01
# pragma once
16 2486 sjacqu01
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17 2486 sjacqu01
18 2486 sjacqu01
#include <boost/asio/detail/config.hpp>
19 2486 sjacqu01
20 2486 sjacqu01
#if defined(BOOST_ASIO_HAS_LOCAL_SOCKETS) \
21 2486 sjacqu01
  || defined(GENERATING_DOCUMENTATION)
22 2486 sjacqu01
23 2486 sjacqu01
#include <boost/asio/basic_socket_acceptor.hpp>
24 2486 sjacqu01
#include <boost/asio/basic_socket_iostream.hpp>
25 2486 sjacqu01
#include <boost/asio/basic_stream_socket.hpp>
26 2486 sjacqu01
#include <boost/asio/detail/socket_types.hpp>
27 2486 sjacqu01
#include <boost/asio/local/basic_endpoint.hpp>
28 2486 sjacqu01
29 2486 sjacqu01
#include <boost/asio/detail/push_options.hpp>
30 2486 sjacqu01
31 2486 sjacqu01
namespace boost {
32 2486 sjacqu01
namespace asio {
33 2486 sjacqu01
namespace local {
34 2486 sjacqu01
35 2486 sjacqu01
/// Encapsulates the flags needed for stream-oriented UNIX sockets.
36 2486 sjacqu01
/**
37 2486 sjacqu01
 * The boost::asio::local::stream_protocol class contains flags necessary for
38 2486 sjacqu01
 * stream-oriented UNIX domain sockets.
39 2486 sjacqu01
 *
40 2486 sjacqu01
 * @par Thread Safety
41 2486 sjacqu01
 * @e Distinct @e objects: Safe.@n
42 2486 sjacqu01
 * @e Shared @e objects: Safe.
43 2486 sjacqu01
 *
44 2486 sjacqu01
 * @par Concepts:
45 2486 sjacqu01
 * Protocol.
46 2486 sjacqu01
 */
47 2486 sjacqu01
class stream_protocol
48 2486 sjacqu01
{
49 2486 sjacqu01
public:
50 2486 sjacqu01
  /// Obtain an identifier for the type of the protocol.
51 2486 sjacqu01
  int type() const
52 2486 sjacqu01
  {
53 2486 sjacqu01
    return SOCK_STREAM;
54 2486 sjacqu01
  }
55 2486 sjacqu01
56 2486 sjacqu01
  /// Obtain an identifier for the protocol.
57 2486 sjacqu01
  int protocol() const
58 2486 sjacqu01
  {
59 2486 sjacqu01
    return 0;
60 2486 sjacqu01
  }
61 2486 sjacqu01
62 2486 sjacqu01
  /// Obtain an identifier for the protocol family.
63 2486 sjacqu01
  int family() const
64 2486 sjacqu01
  {
65 2486 sjacqu01
    return AF_UNIX;
66 2486 sjacqu01
  }
67 2486 sjacqu01
68 2486 sjacqu01
  /// The type of a UNIX domain endpoint.
69 2486 sjacqu01
  typedef basic_endpoint<stream_protocol> endpoint;
70 2486 sjacqu01
71 2486 sjacqu01
  /// The UNIX domain socket type.
72 2486 sjacqu01
  typedef basic_stream_socket<stream_protocol> socket;
73 2486 sjacqu01
74 2486 sjacqu01
  /// The UNIX domain acceptor type.
75 2486 sjacqu01
  typedef basic_socket_acceptor<stream_protocol> acceptor;
76 2486 sjacqu01
77 2486 sjacqu01
#if !defined(BOOST_ASIO_NO_IOSTREAM)
78 2486 sjacqu01
  /// The UNIX domain iostream type.
79 2486 sjacqu01
  typedef basic_socket_iostream<stream_protocol> iostream;
80 2486 sjacqu01
#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
81 2486 sjacqu01
};
82 2486 sjacqu01
83 2486 sjacqu01
} // namespace local
84 2486 sjacqu01
} // namespace asio
85 2486 sjacqu01
} // namespace boost
86 2486 sjacqu01
87 2486 sjacqu01
#include <boost/asio/detail/pop_options.hpp>
88 2486 sjacqu01
89 2486 sjacqu01
#endif // defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
90 2486 sjacqu01
       //   || defined(GENERATING_DOCUMENTATION)
91 2486 sjacqu01
92 2486 sjacqu01
#endif // BOOST_ASIO_LOCAL_STREAM_PROTOCOL_HPP