Statistics
| Revision:

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

History | View | Annotate | Download (2.6 kB)

1 2486 sjacqu01
//
2 2486 sjacqu01
// posix/descriptor_base.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_POSIX_DESCRIPTOR_BASE_HPP
12 2486 sjacqu01
#define BOOST_ASIO_POSIX_DESCRIPTOR_BASE_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_POSIX_STREAM_DESCRIPTOR) \
21 2486 sjacqu01
  || defined(GENERATING_DOCUMENTATION)
22 2486 sjacqu01
23 2486 sjacqu01
#include <boost/asio/detail/io_control.hpp>
24 2486 sjacqu01
#include <boost/asio/detail/socket_option.hpp>
25 2486 sjacqu01
26 2486 sjacqu01
#include <boost/asio/detail/push_options.hpp>
27 2486 sjacqu01
28 2486 sjacqu01
namespace boost {
29 2486 sjacqu01
namespace asio {
30 2486 sjacqu01
namespace posix {
31 2486 sjacqu01
32 2486 sjacqu01
/// The descriptor_base class is used as a base for the basic_stream_descriptor
33 2486 sjacqu01
/// class template so that we have a common place to define the associated
34 2486 sjacqu01
/// IO control commands.
35 2486 sjacqu01
class descriptor_base
36 2486 sjacqu01
{
37 2486 sjacqu01
public:
38 2486 sjacqu01
  /// (Deprecated: Use non_blocking().) IO control command to set the blocking
39 2486 sjacqu01
  /// mode of the descriptor.
40 2486 sjacqu01
  /**
41 2486 sjacqu01
   * Implements the FIONBIO IO control command.
42 2486 sjacqu01
   *
43 2486 sjacqu01
   * @par Example
44 2486 sjacqu01
   * @code
45 2486 sjacqu01
   * boost::asio::posix::stream_descriptor descriptor(io_service);
46 2486 sjacqu01
   * ...
47 2486 sjacqu01
   * boost::asio::descriptor_base::non_blocking_io command(true);
48 2486 sjacqu01
   * descriptor.io_control(command);
49 2486 sjacqu01
   * @endcode
50 2486 sjacqu01
   *
51 2486 sjacqu01
   * @par Concepts:
52 2486 sjacqu01
   * IoControlCommand.
53 2486 sjacqu01
   */
54 2486 sjacqu01
#if defined(GENERATING_DOCUMENTATION)
55 2486 sjacqu01
  typedef implementation_defined non_blocking_io;
56 2486 sjacqu01
#else
57 2486 sjacqu01
  typedef boost::asio::detail::io_control::non_blocking_io non_blocking_io;
58 2486 sjacqu01
#endif
59 2486 sjacqu01
60 2486 sjacqu01
  /// IO control command to get the amount of data that can be read without
61 2486 sjacqu01
  /// blocking.
62 2486 sjacqu01
  /**
63 2486 sjacqu01
   * Implements the FIONREAD IO control command.
64 2486 sjacqu01
   *
65 2486 sjacqu01
   * @par Example
66 2486 sjacqu01
   * @code
67 2486 sjacqu01
   * boost::asio::posix::stream_descriptor descriptor(io_service);
68 2486 sjacqu01
   * ...
69 2486 sjacqu01
   * boost::asio::descriptor_base::bytes_readable command(true);
70 2486 sjacqu01
   * descriptor.io_control(command);
71 2486 sjacqu01
   * std::size_t bytes_readable = command.get();
72 2486 sjacqu01
   * @endcode
73 2486 sjacqu01
   *
74 2486 sjacqu01
   * @par Concepts:
75 2486 sjacqu01
   * IoControlCommand.
76 2486 sjacqu01
   */
77 2486 sjacqu01
#if defined(GENERATING_DOCUMENTATION)
78 2486 sjacqu01
  typedef implementation_defined bytes_readable;
79 2486 sjacqu01
#else
80 2486 sjacqu01
  typedef boost::asio::detail::io_control::bytes_readable bytes_readable;
81 2486 sjacqu01
#endif
82 2486 sjacqu01
83 2486 sjacqu01
protected:
84 2486 sjacqu01
  /// Protected destructor to prevent deletion through this type.
85 2486 sjacqu01
  ~descriptor_base()
86 2486 sjacqu01
  {
87 2486 sjacqu01
  }
88 2486 sjacqu01
};
89 2486 sjacqu01
90 2486 sjacqu01
} // namespace posix
91 2486 sjacqu01
} // namespace asio
92 2486 sjacqu01
} // namespace boost
93 2486 sjacqu01
94 2486 sjacqu01
#include <boost/asio/detail/pop_options.hpp>
95 2486 sjacqu01
96 2486 sjacqu01
#endif // defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
97 2486 sjacqu01
       //   || defined(GENERATING_DOCUMENTATION)
98 2486 sjacqu01
99 2486 sjacqu01
#endif // BOOST_ASIO_POSIX_DESCRIPTOR_BASE_HPP