Boost logo

Boost-Commit :

From: chris_at_[hidden]
Date: 2008-06-19 18:21:07


Author: chris_kohlhoff
Date: 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
New Revision: 46533
URL: http://svn.boost.org/trac/boost/changeset/46533

Log:
Merged from trunk to release branch.

........
  r44662 | chris_kohlhoff | 2008-04-21 11:23:42 +1000 (Mon, 21 Apr 2008) | 3 lines
  
  Add ability to disable the uses of the typeid operator by defining
  BOOST_NO_TYPEID or BOOST_ASIO_NO_TYPEID.
........
  r44663 | chris_kohlhoff | 2008-04-21 11:27:48 +1000 (Mon, 21 Apr 2008) | 3 lines
  
  Ensure that timer dispatching responsibility is correctly relinquished when
  processing leftover interrupts from a previous run invocation.
........
  r44665 | chris_kohlhoff | 2008-04-21 11:36:28 +1000 (Mon, 21 Apr 2008) | 3 lines
  
  Enhance example to make it clear that invocation hooking can be used with
  asynchronous operations.
........
  r44666 | chris_kohlhoff | 2008-04-21 11:39:06 +1000 (Mon, 21 Apr 2008) | 3 lines
  
  Improve efficiency of basic_streambuf::consume() by using a single call to
  gbump() rather than calling sbumpc() in a loop.
........
  r44667 | chris_kohlhoff | 2008-04-21 11:41:29 +1000 (Mon, 21 Apr 2008) | 2 lines
  
  Update version number to match release.
........
  r44668 | chris_kohlhoff | 2008-04-21 11:42:10 +1000 (Mon, 21 Apr 2008) | 2 lines
  
  Fix infinite recursion in the ssl::stream's shutdown() implementation.
........
  r44670 | chris_kohlhoff | 2008-04-21 12:01:34 +1000 (Mon, 21 Apr 2008) | 2 lines
  
  Improve documentation for the protected functions and data in basic_io_object<>.
........
  r44673 | chris_kohlhoff | 2008-04-21 14:02:37 +1000 (Mon, 21 Apr 2008) | 4 lines
  
  Add a special null_buffers type that allows read and write operations to
  be used to indicate the socket's readiness to read or write without
  blocking.
........
  r44674 | chris_kohlhoff | 2008-04-21 14:43:05 +1000 (Mon, 21 Apr 2008) | 2 lines
  
  Add support for UNIX domain sockets.
........
  r44675 | chris_kohlhoff | 2008-04-21 15:16:15 +1000 (Mon, 21 Apr 2008) | 2 lines
  
  Add new wrapper classes for stream-oriented file descriptors on POSIX platforms.
........
  r44676 | chris_kohlhoff | 2008-04-21 15:32:34 +1000 (Mon, 21 Apr 2008) | 2 lines
  
  Add new wrapper classes for stream-oriented handles on Windows.
........
  r44678 | chris_kohlhoff | 2008-04-21 15:43:42 +1000 (Mon, 21 Apr 2008) | 3 lines
  
  Add porthopper example to demonstrate applications that mix synchronous and
  asynchronous operations.
........
  r44679 | chris_kohlhoff | 2008-04-21 15:52:20 +1000 (Mon, 21 Apr 2008) | 3 lines
  
  Remove a local variable that was hiding the ec parameter and preventing
  error codes from being correctly propagated. Fixes #1820.
........
  r44681 | chris_kohlhoff | 2008-04-21 16:14:29 +1000 (Mon, 21 Apr 2008) | 2 lines
  
  Ensure all non-friend related functions are included in the documentation.
........
  r44682 | chris_kohlhoff | 2008-04-21 16:15:17 +1000 (Mon, 21 Apr 2008) | 3 lines
  
  Add UNIX domain sockets, POSIX stream-oriented descriptors and Windows
  stream-oriented handles to the reference documentation.
........
  r44683 | chris_kohlhoff | 2008-04-21 16:15:50 +1000 (Mon, 21 Apr 2008) | 2 lines
  
  Regenerate documentation.
........
  r44684 | chris_kohlhoff | 2008-04-21 16:20:32 +1000 (Mon, 21 Apr 2008) | 3 lines
  
  Add documentation on the limits of the number of buffers that may be
  transferred in individual operations.
........
  r44685 | chris_kohlhoff | 2008-04-21 17:59:21 +1000 (Mon, 21 Apr 2008) | 3 lines
  
  Add requirements for handle and descriptor services. Add new classes to the
  quickref index page.
........
  r44727 | chris_kohlhoff | 2008-04-23 09:46:15 +1000 (Wed, 23 Apr 2008) | 2 lines
  
  Fix or suppress MSVC level 4 warnings. Fixes #1703.
........
  r44848 | chris_kohlhoff | 2008-04-28 23:35:27 +1000 (Mon, 28 Apr 2008) | 2 lines
  
  Update asio version number.
........
  r44849 | chris_kohlhoff | 2008-04-28 23:36:18 +1000 (Mon, 28 Apr 2008) | 2 lines
  
  Add raw socket support.
........
  r44851 | chris_kohlhoff | 2008-04-28 23:56:07 +1000 (Mon, 28 Apr 2008) | 2 lines
  
  Add an experimental two-lock queue implementation for task_io_service.
........
  r44997 | chris_kohlhoff | 2008-05-02 08:00:26 +1000 (Fri, 02 May 2008) | 3 lines
  
  Add a fast path for some speculative read and write operations in the
  epoll_reactor.
........
  r44998 | chris_kohlhoff | 2008-05-02 08:27:21 +1000 (Fri, 02 May 2008) | 3 lines
  
  A memory barrier is needed on some platforms to ensure that all updates
  to the node occur before the tail pointer is updated.
........
  r45006 | chris_kohlhoff | 2008-05-02 17:59:01 +1000 (Fri, 02 May 2008) | 3 lines
  
  Fully qualify uses of asio's placeholders to resolve ambiguity with C++0x's
  placeholders namespace.
........
  r45010 | chris_kohlhoff | 2008-05-02 18:38:15 +1000 (Fri, 02 May 2008) | 3 lines
  
  Don't use the names readv and writev for functions defined inside asio as
  these names seem to be macros on Tru64.
........
  r45059 | chris_kohlhoff | 2008-05-03 21:36:16 +1000 (Sat, 03 May 2008) | 2 lines
  
  Add fast-pathing of speculative reads and writes to the kqueue_reactor.
........
  r45122 | chris_kohlhoff | 2008-05-05 16:30:13 +1000 (Mon, 05 May 2008) | 2 lines
  
  Implement custom memory allocation support for reactor-based asynchronous operations.
........
  r45179 | chris_kohlhoff | 2008-05-07 08:09:47 +1000 (Wed, 07 May 2008) | 2 lines
  
  Use an atomic counter for strand reference counting.
........
  r45292 | chris_kohlhoff | 2008-05-12 18:30:21 +1000 (Mon, 12 May 2008) | 2 lines
  
  Regenerate documentation to include raw socket classes.
........
  r45293 | chris_kohlhoff | 2008-05-12 18:35:56 +1000 (Mon, 12 May 2008) | 2 lines
  
  Don't generate enum value lists for empty enums.
........
  r45355 | chris_kohlhoff | 2008-05-14 22:17:26 +1000 (Wed, 14 May 2008) | 3 lines
  
  Add check for empty heap when determining the minimum wait duration for a
  timer queue.
........
  r45600 | chris_kohlhoff | 2008-05-21 19:25:12 +1000 (Wed, 21 May 2008) | 2 lines
  
  Implement custom allocation support for timer operations.
........
  r45633 | chris_kohlhoff | 2008-05-22 08:56:49 +1000 (Thu, 22 May 2008) | 2 lines
  
  Some Windows platforms don't define IPPROTO_ICMPV6.
........
  r45811 | chris_kohlhoff | 2008-05-27 17:54:12 +1000 (Tue, 27 May 2008) | 3 lines
  
  Fix a crash that can occur when destroying a handler object that owns its
  own memory (as is the case when destroying handlers in an orphaned strand).
........
  r45935 | chris_kohlhoff | 2008-05-30 18:39:19 +1000 (Fri, 30 May 2008) | 5 lines
  
  Fix a deadlock that can occur when destroying a thread object with global
  lifetime in a dynamically loaded DLL on Windows. Note that deadlock can
  still occur if the thread is launched by the constructor of an object with
  global lifetime.
........
  r46003 | chris_kohlhoff | 2008-06-01 11:31:25 +1000 (Sun, 01 Jun 2008) | 4 lines
  
  Add test for the crash that can occur when destroying a handler object that
  owns its own memory (as is the case when destroying handlers in an orphaned
  strand).
........
  r46272 | chris_kohlhoff | 2008-06-09 22:54:55 +1000 (Mon, 09 Jun 2008) | 2 lines
  
  Add support for serial ports.
........
  r46319 | chris_kohlhoff | 2008-06-11 21:17:53 +1000 (Wed, 11 Jun 2008) | 2 lines
  
  Add random-access handles for use on Windows.
........
  r46325 | chris_kohlhoff | 2008-06-11 22:41:48 +1000 (Wed, 11 Jun 2008) | 2 lines
  
  Remove repeated typedef of reactor_type.
........
  r46327 | chris_kohlhoff | 2008-06-11 23:07:41 +1000 (Wed, 11 Jun 2008) | 2 lines
  
  Only perform check for a 0-byte receive meaning EOF on SOCK_STREAM sockets.
........
  r46415 | chris_kohlhoff | 2008-06-16 10:41:29 +1000 (Mon, 16 Jun 2008) | 2 lines
  
  Add an iterator for bytewise traversal of a buffer sequence.
........
  r46473 | chris_kohlhoff | 2008-06-18 21:22:21 +1000 (Wed, 18 Jun 2008) | 2 lines
  
  Fix write_at declaration. Add missing documentation for offset parameters.
........
  r46475 | chris_kohlhoff | 2008-06-18 23:03:46 +1000 (Wed, 18 Jun 2008) | 3 lines
  
  Add new overloads for read_until and async_read_until that invoke a
  user-defined function object to determine when a match has been found.
........
  r46476 | chris_kohlhoff | 2008-06-18 23:08:21 +1000 (Wed, 18 Jun 2008) | 2 lines
  
  Regenerate documentation.
........
  r46506 | chris_kohlhoff | 2008-06-19 22:41:32 +1000 (Thu, 19 Jun 2008) | 2 lines
  
  Fix for unicode builds.
........
  r46507 | chris_kohlhoff | 2008-06-19 22:50:02 +1000 (Thu, 19 Jun 2008) | 3 lines
  
  Fix serial port support on POSIX platforms that don't provide the BSD
  extensions cfmakeraw, cfsetspeed and CRTSCTS.
........

Added:
   branches/release/boost/asio/basic_raw_socket.hpp
      - copied unchanged from r44849, /trunk/boost/asio/basic_raw_socket.hpp
   branches/release/boost/asio/basic_serial_port.hpp
      - copied unchanged from r46272, /trunk/boost/asio/basic_serial_port.hpp
   branches/release/boost/asio/buffers_iterator.hpp
      - copied unchanged from r46415, /trunk/boost/asio/buffers_iterator.hpp
   branches/release/boost/asio/detail/descriptor_ops.hpp
      - copied, changed from r44685, /trunk/boost/asio/detail/descriptor_ops.hpp
   branches/release/boost/asio/detail/handler_base_from_member.hpp
      - copied unchanged from r45122, /trunk/boost/asio/detail/handler_base_from_member.hpp
   branches/release/boost/asio/detail/indirect_handler_queue.hpp
      - copied, changed from r44851, /trunk/boost/asio/detail/indirect_handler_queue.hpp
   branches/release/boost/asio/detail/reactive_descriptor_service.hpp
      - copied, changed from r44685, /trunk/boost/asio/detail/reactive_descriptor_service.hpp
   branches/release/boost/asio/detail/reactive_serial_port_service.hpp
      - copied, changed from r46272, /trunk/boost/asio/detail/reactive_serial_port_service.hpp
   branches/release/boost/asio/detail/task_io_service_2lock.hpp
      - copied unchanged from r44851, /trunk/boost/asio/detail/task_io_service_2lock.hpp
   branches/release/boost/asio/detail/win_iocp_handle_service.hpp
      - copied, changed from r44685, /trunk/boost/asio/detail/win_iocp_handle_service.hpp
   branches/release/boost/asio/detail/win_iocp_serial_port_service.hpp
      - copied, changed from r46272, /trunk/boost/asio/detail/win_iocp_serial_port_service.hpp
   branches/release/boost/asio/impl/read_at.ipp
      - copied unchanged from r46319, /trunk/boost/asio/impl/read_at.ipp
   branches/release/boost/asio/impl/serial_port_base.ipp
      - copied, changed from r46272, /trunk/boost/asio/impl/serial_port_base.ipp
   branches/release/boost/asio/impl/write_at.ipp
      - copied unchanged from r46319, /trunk/boost/asio/impl/write_at.ipp
   branches/release/boost/asio/ip/icmp.hpp
      - copied unchanged from r44849, /trunk/boost/asio/ip/icmp.hpp
   branches/release/boost/asio/local/
      - copied from r44685, /trunk/boost/asio/local/
   branches/release/boost/asio/local/basic_endpoint.hpp
      - copied unchanged from r44685, /trunk/boost/asio/local/basic_endpoint.hpp
   branches/release/boost/asio/local/connect_pair.hpp
      - copied unchanged from r44685, /trunk/boost/asio/local/connect_pair.hpp
   branches/release/boost/asio/local/datagram_protocol.hpp
      - copied unchanged from r44685, /trunk/boost/asio/local/datagram_protocol.hpp
   branches/release/boost/asio/local/stream_protocol.hpp
      - copied unchanged from r44685, /trunk/boost/asio/local/stream_protocol.hpp
   branches/release/boost/asio/posix/
      - copied from r44685, /trunk/boost/asio/posix/
   branches/release/boost/asio/posix/basic_descriptor.hpp
      - copied unchanged from r44685, /trunk/boost/asio/posix/basic_descriptor.hpp
   branches/release/boost/asio/posix/basic_stream_descriptor.hpp
      - copied unchanged from r44685, /trunk/boost/asio/posix/basic_stream_descriptor.hpp
   branches/release/boost/asio/posix/descriptor_base.hpp
      - copied unchanged from r44685, /trunk/boost/asio/posix/descriptor_base.hpp
   branches/release/boost/asio/posix/stream_descriptor.hpp
      - copied unchanged from r44685, /trunk/boost/asio/posix/stream_descriptor.hpp
   branches/release/boost/asio/posix/stream_descriptor_service.hpp
      - copied unchanged from r44685, /trunk/boost/asio/posix/stream_descriptor_service.hpp
   branches/release/boost/asio/raw_socket_service.hpp
      - copied unchanged from r44849, /trunk/boost/asio/raw_socket_service.hpp
   branches/release/boost/asio/read_at.hpp
      - copied unchanged from r46319, /trunk/boost/asio/read_at.hpp
   branches/release/boost/asio/serial_port.hpp
      - copied unchanged from r46272, /trunk/boost/asio/serial_port.hpp
   branches/release/boost/asio/serial_port_base.hpp
      - copied unchanged from r46272, /trunk/boost/asio/serial_port_base.hpp
   branches/release/boost/asio/serial_port_service.hpp
      - copied unchanged from r46272, /trunk/boost/asio/serial_port_service.hpp
   branches/release/boost/asio/windows/
      - copied from r44685, /trunk/boost/asio/windows/
   branches/release/boost/asio/windows/basic_handle.hpp
      - copied unchanged from r44685, /trunk/boost/asio/windows/basic_handle.hpp
   branches/release/boost/asio/windows/basic_random_access_handle.hpp
      - copied unchanged from r46319, /trunk/boost/asio/windows/basic_random_access_handle.hpp
   branches/release/boost/asio/windows/basic_stream_handle.hpp
      - copied unchanged from r44685, /trunk/boost/asio/windows/basic_stream_handle.hpp
   branches/release/boost/asio/windows/random_access_handle.hpp
      - copied unchanged from r46319, /trunk/boost/asio/windows/random_access_handle.hpp
   branches/release/boost/asio/windows/random_access_handle_service.hpp
      - copied unchanged from r46319, /trunk/boost/asio/windows/random_access_handle_service.hpp
   branches/release/boost/asio/windows/stream_handle.hpp
      - copied unchanged from r44685, /trunk/boost/asio/windows/stream_handle.hpp
   branches/release/boost/asio/windows/stream_handle_service.hpp
      - copied unchanged from r44685, /trunk/boost/asio/windows/stream_handle_service.hpp
   branches/release/boost/asio/write_at.hpp
      - copied, changed from r46319, /trunk/boost/asio/write_at.hpp
   branches/release/libs/asio/doc/requirements/DescriptorService.qbk
      - copied unchanged from r44685, /trunk/libs/asio/doc/requirements/DescriptorService.qbk
   branches/release/libs/asio/doc/requirements/HandleService.qbk
      - copied unchanged from r44685, /trunk/libs/asio/doc/requirements/HandleService.qbk
   branches/release/libs/asio/doc/requirements/StreamDescriptorService.qbk
      - copied unchanged from r44685, /trunk/libs/asio/doc/requirements/StreamDescriptorService.qbk
   branches/release/libs/asio/doc/requirements/StreamHandleService.qbk
      - copied unchanged from r44685, /trunk/libs/asio/doc/requirements/StreamHandleService.qbk
   branches/release/libs/asio/example/nonblocking/
      - copied from r44685, /trunk/libs/asio/example/nonblocking/
   branches/release/libs/asio/example/nonblocking/Jamfile
      - copied unchanged from r44685, /trunk/libs/asio/example/nonblocking/Jamfile
   branches/release/libs/asio/example/nonblocking/Jamfile.v2
      - copied unchanged from r44685, /trunk/libs/asio/example/nonblocking/Jamfile.v2
   branches/release/libs/asio/example/nonblocking/third_party_lib.cpp
      - copied unchanged from r44685, /trunk/libs/asio/example/nonblocking/third_party_lib.cpp
   branches/release/libs/asio/example/porthopper/
      - copied from r44685, /trunk/libs/asio/example/porthopper/
   branches/release/libs/asio/example/porthopper/Jamfile
      - copied unchanged from r44685, /trunk/libs/asio/example/porthopper/Jamfile
   branches/release/libs/asio/example/porthopper/Jamfile.v2
      - copied unchanged from r44685, /trunk/libs/asio/example/porthopper/Jamfile.v2
   branches/release/libs/asio/example/porthopper/client.cpp
      - copied unchanged from r44685, /trunk/libs/asio/example/porthopper/client.cpp
   branches/release/libs/asio/example/porthopper/protocol.hpp
      - copied unchanged from r44685, /trunk/libs/asio/example/porthopper/protocol.hpp
   branches/release/libs/asio/example/porthopper/server.cpp
      - copied unchanged from r44685, /trunk/libs/asio/example/porthopper/server.cpp
   branches/release/libs/asio/test/basic_serial_port.cpp
      - copied unchanged from r46272, /trunk/libs/asio/test/basic_serial_port.cpp
   branches/release/libs/asio/test/buffers_iterator.cpp
      - copied unchanged from r46415, /trunk/libs/asio/test/buffers_iterator.cpp
   branches/release/libs/asio/test/local/
      - copied from r44685, /trunk/libs/asio/test/local/
   branches/release/libs/asio/test/local/basic_endpoint.cpp
      - copied, changed from r44685, /trunk/libs/asio/test/local/basic_endpoint.cpp
   branches/release/libs/asio/test/local/connect_pair.cpp
      - copied, changed from r44685, /trunk/libs/asio/test/local/connect_pair.cpp
   branches/release/libs/asio/test/local/datagram_protocol.cpp
      - copied, changed from r44685, /trunk/libs/asio/test/local/datagram_protocol.cpp
   branches/release/libs/asio/test/local/stream_protocol.cpp
      - copied, changed from r44685, /trunk/libs/asio/test/local/stream_protocol.cpp
   branches/release/libs/asio/test/posix/
      - copied from r44685, /trunk/libs/asio/test/posix/
   branches/release/libs/asio/test/posix/basic_descriptor.cpp
      - copied, changed from r44685, /trunk/libs/asio/test/posix/basic_descriptor.cpp
   branches/release/libs/asio/test/posix/basic_stream_descriptor.cpp
      - copied, changed from r44685, /trunk/libs/asio/test/posix/basic_stream_descriptor.cpp
   branches/release/libs/asio/test/posix/descriptor_base.cpp
      - copied, changed from r44685, /trunk/libs/asio/test/posix/descriptor_base.cpp
   branches/release/libs/asio/test/posix/stream_descriptor.cpp
      - copied, changed from r44685, /trunk/libs/asio/test/posix/stream_descriptor.cpp
   branches/release/libs/asio/test/posix/stream_descriptor_service.cpp
      - copied, changed from r44685, /trunk/libs/asio/test/posix/stream_descriptor_service.cpp
   branches/release/libs/asio/test/serial_port.cpp
      - copied unchanged from r46272, /trunk/libs/asio/test/serial_port.cpp
   branches/release/libs/asio/test/serial_port_base.cpp
      - copied unchanged from r46272, /trunk/libs/asio/test/serial_port_base.cpp
   branches/release/libs/asio/test/serial_port_service.cpp
      - copied unchanged from r46272, /trunk/libs/asio/test/serial_port_service.cpp
   branches/release/libs/asio/test/windows/
      - copied from r44685, /trunk/libs/asio/test/windows/
   branches/release/libs/asio/test/windows/basic_handle.cpp
      - copied, changed from r44685, /trunk/libs/asio/test/windows/basic_handle.cpp
   branches/release/libs/asio/test/windows/basic_random_access_handle.cpp
      - copied unchanged from r46319, /trunk/libs/asio/test/windows/basic_random_access_handle.cpp
   branches/release/libs/asio/test/windows/basic_stream_handle.cpp
      - copied, changed from r44685, /trunk/libs/asio/test/windows/basic_stream_handle.cpp
   branches/release/libs/asio/test/windows/random_access_handle.cpp
      - copied unchanged from r46319, /trunk/libs/asio/test/windows/random_access_handle.cpp
   branches/release/libs/asio/test/windows/random_access_handle_service.cpp
      - copied unchanged from r46319, /trunk/libs/asio/test/windows/random_access_handle_service.cpp
   branches/release/libs/asio/test/windows/stream_handle.cpp
      - copied, changed from r44685, /trunk/libs/asio/test/windows/stream_handle.cpp
   branches/release/libs/asio/test/windows/stream_handle_service.cpp
      - copied, changed from r44685, /trunk/libs/asio/test/windows/stream_handle_service.cpp
Properties modified:
   branches/release/ (props changed)
Text files modified:
   branches/release/boost/asio.hpp | 26
   branches/release/boost/asio/basic_io_object.hpp | 12
   branches/release/boost/asio/basic_streambuf.hpp | 8
   branches/release/boost/asio/buffer.hpp | 27
   branches/release/boost/asio/detail/consuming_buffers.hpp | 20
   branches/release/boost/asio/detail/deadline_timer_service.hpp | 13
   branches/release/boost/asio/detail/descriptor_ops.hpp | 23
   branches/release/boost/asio/detail/dev_poll_reactor.hpp | 127
   branches/release/boost/asio/detail/epoll_reactor.hpp | 180
   branches/release/boost/asio/detail/handler_queue.hpp | 10
   branches/release/boost/asio/detail/hash_map.hpp | 34
   branches/release/boost/asio/detail/indirect_handler_queue.hpp | 28
   branches/release/boost/asio/detail/kqueue_reactor.hpp | 192
   branches/release/boost/asio/detail/null_thread.hpp | 5
   branches/release/boost/asio/detail/old_win_sdk_compat.hpp | 5
   branches/release/boost/asio/detail/posix_thread.hpp | 5
   branches/release/boost/asio/detail/push_options.hpp | 2
   branches/release/boost/asio/detail/reactive_descriptor_service.hpp | 121
   branches/release/boost/asio/detail/reactive_serial_port_service.hpp | 9
   branches/release/boost/asio/detail/reactive_socket_service.hpp | 446
   branches/release/boost/asio/detail/reactor_op_queue.hpp | 209
   branches/release/boost/asio/detail/select_reactor.hpp | 131
   branches/release/boost/asio/detail/service_registry.hpp | 10
   branches/release/boost/asio/detail/socket_ops.hpp | 16
   branches/release/boost/asio/detail/socket_types.hpp | 2
   branches/release/boost/asio/detail/strand_service.hpp | 21
   branches/release/boost/asio/detail/task_io_service.hpp | 6
   branches/release/boost/asio/detail/timer_queue.hpp | 101
   branches/release/boost/asio/detail/timer_queue_base.hpp | 4
   branches/release/boost/asio/detail/win_iocp_handle_service.hpp | 90
   branches/release/boost/asio/detail/win_iocp_io_service.hpp | 41
   branches/release/boost/asio/detail/win_iocp_serial_port_service.hpp | 2
   branches/release/boost/asio/detail/win_iocp_socket_service.hpp | 432
   branches/release/boost/asio/detail/win_thread.hpp | 73
   branches/release/boost/asio/detail/wince_thread.hpp | 5
   branches/release/boost/asio/detail/wrapped_handler.hpp | 48
   branches/release/boost/asio/error.hpp | 3
   branches/release/boost/asio/impl/read_until.ipp | 374
   branches/release/boost/asio/impl/serial_port_base.ipp | 14
   branches/release/boost/asio/read_until.hpp | 306
   branches/release/boost/asio/ssl/detail/openssl_operation.hpp | 9
   branches/release/boost/asio/version.hpp | 2
   branches/release/boost/asio/write.hpp | 6
   branches/release/boost/asio/write_at.hpp | 8
   branches/release/libs/asio/doc/design/implementation.qbk | 46
   branches/release/libs/asio/doc/quickref.xml | 23
   branches/release/libs/asio/doc/reference.dox | 3
   branches/release/libs/asio/doc/reference.qbk | 51488 ++++++++++++++++++++++++++++-----------
   branches/release/libs/asio/doc/reference.xsl | 113
   branches/release/libs/asio/doc/using.qbk | 7
   branches/release/libs/asio/example/invocation/prioritised_handlers.cpp | 23
   branches/release/libs/asio/test/Jamfile | 17
   branches/release/libs/asio/test/Jamfile.v2 | 34
   branches/release/libs/asio/test/basic_datagram_socket.cpp | 2
   branches/release/libs/asio/test/basic_deadline_timer.cpp | 2
   branches/release/libs/asio/test/basic_socket_acceptor.cpp | 2
   branches/release/libs/asio/test/basic_stream_socket.cpp | 2
   branches/release/libs/asio/test/buffer.cpp | 2
   branches/release/libs/asio/test/buffered_read_stream.cpp | 2
   branches/release/libs/asio/test/buffered_stream.cpp | 2
   branches/release/libs/asio/test/buffered_write_stream.cpp | 2
   branches/release/libs/asio/test/completion_condition.cpp | 2
   branches/release/libs/asio/test/datagram_socket_service.cpp | 2
   branches/release/libs/asio/test/deadline_timer.cpp | 2
   branches/release/libs/asio/test/deadline_timer_service.cpp | 2
   branches/release/libs/asio/test/error.cpp | 2
   branches/release/libs/asio/test/io_service.cpp | 2
   branches/release/libs/asio/test/ip/address.cpp | 2
   branches/release/libs/asio/test/ip/address_v4.cpp | 2
   branches/release/libs/asio/test/ip/address_v6.cpp | 2
   branches/release/libs/asio/test/ip/basic_endpoint.cpp | 2
   branches/release/libs/asio/test/ip/basic_resolver.cpp | 2
   branches/release/libs/asio/test/ip/basic_resolver_entry.cpp | 2
   branches/release/libs/asio/test/ip/basic_resolver_iterator.cpp | 2
   branches/release/libs/asio/test/ip/basic_resolver_query.cpp | 2
   branches/release/libs/asio/test/ip/host_name.cpp | 2
   branches/release/libs/asio/test/ip/multicast.cpp | 2
   branches/release/libs/asio/test/ip/resolver_query_base.cpp | 2
   branches/release/libs/asio/test/ip/resolver_service.cpp | 2
   branches/release/libs/asio/test/ip/tcp.cpp | 17
   branches/release/libs/asio/test/ip/udp.cpp | 45
   branches/release/libs/asio/test/ip/unicast.cpp | 2
   branches/release/libs/asio/test/ip/v6_only.cpp | 2
   branches/release/libs/asio/test/is_read_buffered.cpp | 2
   branches/release/libs/asio/test/is_write_buffered.cpp | 2
   branches/release/libs/asio/test/local/basic_endpoint.cpp | 2
   branches/release/libs/asio/test/local/connect_pair.cpp | 2
   branches/release/libs/asio/test/local/datagram_protocol.cpp | 2
   branches/release/libs/asio/test/local/stream_protocol.cpp | 2
   branches/release/libs/asio/test/placeholders.cpp | 2
   branches/release/libs/asio/test/posix/basic_descriptor.cpp | 2
   branches/release/libs/asio/test/posix/basic_stream_descriptor.cpp | 2
   branches/release/libs/asio/test/posix/descriptor_base.cpp | 2
   branches/release/libs/asio/test/posix/stream_descriptor.cpp | 2
   branches/release/libs/asio/test/posix/stream_descriptor_service.cpp | 2
   branches/release/libs/asio/test/read.cpp | 2
   branches/release/libs/asio/test/read_until.cpp | 181
   branches/release/libs/asio/test/socket_acceptor_service.cpp | 2
   branches/release/libs/asio/test/socket_base.cpp | 2
   branches/release/libs/asio/test/ssl/basic_context.cpp | 2
   branches/release/libs/asio/test/ssl/context.cpp | 2
   branches/release/libs/asio/test/ssl/context_base.cpp | 2
   branches/release/libs/asio/test/ssl/context_service.cpp | 2
   branches/release/libs/asio/test/ssl/stream.cpp | 2
   branches/release/libs/asio/test/ssl/stream_base.cpp | 2
   branches/release/libs/asio/test/ssl/stream_service.cpp | 2
   branches/release/libs/asio/test/strand.cpp | 17
   branches/release/libs/asio/test/stream_socket_service.cpp | 2
   branches/release/libs/asio/test/time_traits.cpp | 2
   branches/release/libs/asio/test/unit_test.hpp | 1
   branches/release/libs/asio/test/windows/basic_handle.cpp | 2
   branches/release/libs/asio/test/windows/basic_stream_handle.cpp | 2
   branches/release/libs/asio/test/windows/stream_handle.cpp | 2
   branches/release/libs/asio/test/windows/stream_handle_service.cpp | 2
   branches/release/libs/asio/test/write.cpp | 2
   115 files changed, 39523 insertions(+), 15812 deletions(-)

Modified: branches/release/boost/asio.hpp
==============================================================================
--- branches/release/boost/asio.hpp (original)
+++ branches/release/boost/asio.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -20,6 +20,8 @@
 #include <boost/asio/basic_datagram_socket.hpp>
 #include <boost/asio/basic_deadline_timer.hpp>
 #include <boost/asio/basic_io_object.hpp>
+#include <boost/asio/basic_raw_socket.hpp>
+#include <boost/asio/basic_serial_port.hpp>
 #include <boost/asio/basic_socket_acceptor.hpp>
 #include <boost/asio/basic_socket_iostream.hpp>
 #include <boost/asio/basic_socket_streambuf.hpp>
@@ -32,6 +34,7 @@
 #include <boost/asio/buffered_stream.hpp>
 #include <boost/asio/buffered_write_stream_fwd.hpp>
 #include <boost/asio/buffered_write_stream.hpp>
+#include <boost/asio/buffers_iterator.hpp>
 #include <boost/asio/completion_condition.hpp>
 #include <boost/asio/datagram_socket_service.hpp>
 #include <boost/asio/deadline_timer_service.hpp>
@@ -49,6 +52,7 @@
 #include <boost/asio/ip/basic_resolver_iterator.hpp>
 #include <boost/asio/ip/basic_resolver_query.hpp>
 #include <boost/asio/ip/host_name.hpp>
+#include <boost/asio/ip/icmp.hpp>
 #include <boost/asio/ip/multicast.hpp>
 #include <boost/asio/ip/resolver_query_base.hpp>
 #include <boost/asio/ip/resolver_service.hpp>
@@ -58,9 +62,23 @@
 #include <boost/asio/ip/v6_only.hpp>
 #include <boost/asio/is_read_buffered.hpp>
 #include <boost/asio/is_write_buffered.hpp>
+#include <boost/asio/local/basic_endpoint.hpp>
+#include <boost/asio/local/connect_pair.hpp>
+#include <boost/asio/local/datagram_protocol.hpp>
+#include <boost/asio/local/stream_protocol.hpp>
 #include <boost/asio/placeholders.hpp>
+#include <boost/asio/posix/basic_descriptor.hpp>
+#include <boost/asio/posix/basic_stream_descriptor.hpp>
+#include <boost/asio/posix/descriptor_base.hpp>
+#include <boost/asio/posix/stream_descriptor.hpp>
+#include <boost/asio/posix/stream_descriptor_service.hpp>
+#include <boost/asio/raw_socket_service.hpp>
 #include <boost/asio/read.hpp>
+#include <boost/asio/read_at.hpp>
 #include <boost/asio/read_until.hpp>
+#include <boost/asio/serial_port.hpp>
+#include <boost/asio/serial_port_base.hpp>
+#include <boost/asio/serial_port_service.hpp>
 #include <boost/asio/socket_acceptor_service.hpp>
 #include <boost/asio/socket_base.hpp>
 #include <boost/asio/strand.hpp>
@@ -68,6 +86,14 @@
 #include <boost/asio/streambuf.hpp>
 #include <boost/asio/time_traits.hpp>
 #include <boost/asio/version.hpp>
+#include <boost/asio/windows/basic_handle.hpp>
+#include <boost/asio/windows/basic_random_access_handle.hpp>
+#include <boost/asio/windows/basic_stream_handle.hpp>
+#include <boost/asio/windows/random_access_handle.hpp>
+#include <boost/asio/windows/random_access_handle_service.hpp>
+#include <boost/asio/windows/stream_handle.hpp>
+#include <boost/asio/windows/stream_handle_service.hpp>
 #include <boost/asio/write.hpp>
+#include <boost/asio/write_at.hpp>
 
 #endif // BOOST_ASIO_HPP

Modified: branches/release/boost/asio/basic_io_object.hpp
==============================================================================
--- branches/release/boost/asio/basic_io_object.hpp (original)
+++ branches/release/boost/asio/basic_io_object.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -64,6 +64,10 @@
 
 protected:
   /// Construct a basic_io_object.
+ /**
+ * Performs:
+ * @code service.construct(implementation); @endcode
+ */
   explicit basic_io_object(boost::asio::io_service& io_service)
     : service(boost::asio::use_service<IoObjectService>(io_service))
   {
@@ -71,15 +75,19 @@
   }
 
   /// Protected destructor to prevent deletion through this type.
+ /**
+ * Performs:
+ * @code service.destroy(implementation); @endcode
+ */
   ~basic_io_object()
   {
     service.destroy(implementation);
   }
 
- // The backend service implementation.
+ /// The service associated with the I/O object.
   service_type& service;
 
- // The underlying native implementation.
+ /// The underlying implementation of the I/O object.
   implementation_type implementation;
 };
 

Modified: branches/release/boost/asio/basic_streambuf.hpp
==============================================================================
--- branches/release/boost/asio/basic_streambuf.hpp (original)
+++ branches/release/boost/asio/basic_streambuf.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -101,11 +101,9 @@
   /// Move the start of the get area by the specified number of characters.
   void consume(std::size_t n)
   {
- while (n > 0)
- {
- sbumpc();
- --n;
- }
+ if (gptr() + n > pptr())
+ n = pptr() - gptr();
+ gbump(static_cast<int>(n));
   }
 
 protected:

Modified: branches/release/boost/asio/buffer.hpp
==============================================================================
--- branches/release/boost/asio/buffer.hpp (original)
+++ branches/release/boost/asio/buffer.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -379,6 +379,33 @@
   }
 };
 
+/// An implementation of both the ConstBufferSequence and MutableBufferSequence
+/// concepts to represent a null buffer sequence.
+class null_buffers
+{
+public:
+ /// The type for each element in the list of buffers.
+ typedef mutable_buffer value_type;
+
+ /// A random-access iterator type that may be used to read elements.
+ typedef const mutable_buffer* const_iterator;
+
+ /// Get a random-access iterator to the first element.
+ const_iterator begin() const
+ {
+ return &buf_;
+ }
+
+ /// Get a random-access iterator for one past the last element.
+ const_iterator end() const
+ {
+ return &buf_;
+ }
+
+private:
+ mutable_buffer buf_;
+};
+
 #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
 namespace detail {
 

Modified: branches/release/boost/asio/detail/consuming_buffers.hpp
==============================================================================
--- branches/release/boost/asio/detail/consuming_buffers.hpp (original)
+++ branches/release/boost/asio/detail/consuming_buffers.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -24,6 +24,8 @@
 #include <boost/iterator/iterator_facade.hpp>
 #include <boost/asio/detail/pop_options.hpp>
 
+#include <boost/asio/buffer.hpp>
+
 namespace boost {
 namespace asio {
 namespace detail {
@@ -198,6 +200,24 @@
   typename Buffers::const_iterator begin_remainder_;
 };
 
+// Specialisation for null_buffers to ensure that the null_buffers type is
+// always passed through to the underlying read or write operation.
+template <typename Buffer>
+class consuming_buffers<Buffer, boost::asio::null_buffers>
+ : public boost::asio::null_buffers
+{
+public:
+ consuming_buffers(const boost::asio::null_buffers&)
+ {
+ // No-op.
+ }
+
+ void consume(std::size_t)
+ {
+ // No-op.
+ }
+};
+
 } // namespace detail
 } // namespace asio
 } // namespace boost

Modified: branches/release/boost/asio/detail/deadline_timer_service.hpp
==============================================================================
--- branches/release/boost/asio/detail/deadline_timer_service.hpp (original)
+++ branches/release/boost/asio/detail/deadline_timer_service.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -26,6 +26,7 @@
 #include <boost/asio/error.hpp>
 #include <boost/asio/io_service.hpp>
 #include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/handler_base_from_member.hpp>
 #include <boost/asio/detail/noncopyable.hpp>
 #include <boost/asio/detail/service_base.hpp>
 #include <boost/asio/detail/socket_ops.hpp>
@@ -154,25 +155,25 @@
   }
 
   template <typename Handler>
- class wait_handler
+ class wait_handler :
+ public handler_base_from_member<Handler>
   {
   public:
     wait_handler(boost::asio::io_service& io_service, Handler handler)
- : io_service_(io_service),
- work_(io_service),
- handler_(handler)
+ : handler_base_from_member<Handler>(handler),
+ io_service_(io_service),
+ work_(io_service)
     {
     }
 
     void operator()(const boost::system::error_code& result)
     {
- io_service_.post(detail::bind_handler(handler_, result));
+ io_service_.post(detail::bind_handler(this->handler_, result));
     }
 
   private:
     boost::asio::io_service& io_service_;
     boost::asio::io_service::work work_;
- Handler handler_;
   };
 
   // Start an asynchronous wait on the timer.

Copied: branches/release/boost/asio/detail/descriptor_ops.hpp (from r44685, /trunk/boost/asio/detail/descriptor_ops.hpp)
==============================================================================
--- /trunk/boost/asio/detail/descriptor_ops.hpp (original)
+++ branches/release/boost/asio/detail/descriptor_ops.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -47,6 +47,12 @@
   return return_value;
 }
 
+inline int open(const char* path, int flags, boost::system::error_code& ec)
+{
+ clear_error(ec);
+ return error_wrapper(::open(path, flags), ec);
+}
+
 inline int close(int d, boost::system::error_code& ec)
 {
   clear_error(ec);
@@ -67,13 +73,14 @@
   b.iov_len = size;
 }
 
-inline int readv(int d, buf* bufs, size_t count, boost::system::error_code& ec)
+inline int scatter_read(int d, buf* bufs, size_t count,
+ boost::system::error_code& ec)
 {
   clear_error(ec);
   return error_wrapper(::readv(d, bufs, static_cast<int>(count)), ec);
 }
 
-inline int writev(int d, const buf* bufs, size_t count,
+inline int gather_write(int d, const buf* bufs, size_t count,
     boost::system::error_code& ec)
 {
   clear_error(ec);
@@ -87,6 +94,18 @@
   return error_wrapper(::ioctl(d, cmd, arg), ec);
 }
 
+inline int fcntl(int d, long cmd, boost::system::error_code& ec)
+{
+ clear_error(ec);
+ return error_wrapper(::fcntl(d, cmd), ec);
+}
+
+inline int fcntl(int d, long cmd, long arg, boost::system::error_code& ec)
+{
+ clear_error(ec);
+ return error_wrapper(::fcntl(d, cmd, arg), ec);
+}
+
 inline int poll_read(int d, boost::system::error_code& ec)
 {
   clear_error(ec);

Modified: branches/release/boost/asio/detail/dev_poll_reactor.hpp
==============================================================================
--- branches/release/boost/asio/detail/dev_poll_reactor.hpp (original)
+++ branches/release/boost/asio/detail/dev_poll_reactor.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -54,6 +54,11 @@
   : public boost::asio::detail::service_base<dev_poll_reactor<Own_Thread> >
 {
 public:
+ // Per-descriptor data.
+ struct per_descriptor_data
+ {
+ };
+
   // Constructor.
   dev_poll_reactor(boost::asio::io_service& io_service)
     : boost::asio::detail::service_base<
@@ -116,11 +121,11 @@
     for (std::size_t i = 0; i < timer_queues_.size(); ++i)
       timer_queues_[i]->destroy_timers();
     timer_queues_.clear();
- }
+ }
 
   // Register a socket with the reactor. Returns 0 on success, system error
   // code on failure.
- int register_descriptor(socket_type descriptor)
+ int register_descriptor(socket_type, per_descriptor_data&)
   {
     return 0;
   }
@@ -128,16 +133,27 @@
   // Start a new read operation. The handler object will be invoked when the
   // given descriptor is ready to be read, or an error has occurred.
   template <typename Handler>
- void start_read_op(socket_type descriptor, Handler handler)
+ void start_read_op(socket_type descriptor, per_descriptor_data&,
+ Handler handler, bool allow_speculative_read = true)
   {
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
 
     if (shutdown_)
       return;
 
- if (!read_op_queue_.has_operation(descriptor))
- if (handler(boost::system::error_code()))
- return;
+ if (allow_speculative_read)
+ {
+ if (!read_op_queue_.has_operation(descriptor))
+ {
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = 0;
+ if (handler.perform(ec, bytes_transferred))
+ {
+ handler.complete(ec, bytes_transferred);
+ return;
+ }
+ }
+ }
 
     if (read_op_queue_.enqueue_operation(descriptor, handler))
     {
@@ -154,16 +170,27 @@
   // Start a new write operation. The handler object will be invoked when the
   // given descriptor is ready to be written, or an error has occurred.
   template <typename Handler>
- void start_write_op(socket_type descriptor, Handler handler)
+ void start_write_op(socket_type descriptor, per_descriptor_data&,
+ Handler handler, bool allow_speculative_write = true)
   {
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
 
     if (shutdown_)
       return;
 
- if (!write_op_queue_.has_operation(descriptor))
- if (handler(boost::system::error_code()))
- return;
+ if (allow_speculative_write)
+ {
+ if (!write_op_queue_.has_operation(descriptor))
+ {
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = 0;
+ if (handler.perform(ec, bytes_transferred))
+ {
+ handler.complete(ec, bytes_transferred);
+ return;
+ }
+ }
+ }
 
     if (write_op_queue_.enqueue_operation(descriptor, handler))
     {
@@ -180,7 +207,8 @@
   // Start a new exception operation. The handler object will be invoked when
   // the given descriptor has exception information, or an error has occurred.
   template <typename Handler>
- void start_except_op(socket_type descriptor, Handler handler)
+ void start_except_op(socket_type descriptor,
+ per_descriptor_data&, Handler handler)
   {
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
 
@@ -199,26 +227,25 @@
     }
   }
 
- // Start new write and exception operations. The handler object will be
- // invoked when the given descriptor is ready for writing or has exception
+ // Start a new write operation. The handler object will be invoked when the
   // information available, or an error has occurred.
   template <typename Handler>
- void start_write_and_except_ops(socket_type descriptor, Handler handler)
+ void start_connect_op(socket_type descriptor,
+ per_descriptor_data&, Handler handler)
   {
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
 
     if (shutdown_)
       return;
 
- bool need_mod = write_op_queue_.enqueue_operation(descriptor, handler);
- need_mod = except_op_queue_.enqueue_operation(descriptor, handler)
- && need_mod;
- if (need_mod)
+ if (write_op_queue_.enqueue_operation(descriptor, handler))
     {
       ::pollfd& ev = add_pending_event_change(descriptor);
- ev.events = POLLOUT | POLLPRI | POLLERR | POLLHUP;
+ ev.events = POLLOUT | POLLERR | POLLHUP;
       if (read_op_queue_.has_operation(descriptor))
         ev.events |= POLLIN;
+ if (except_op_queue_.has_operation(descriptor))
+ ev.events |= POLLPRI;
       interrupter_.interrupt();
     }
   }
@@ -226,25 +253,15 @@
   // Cancel all operations associated with the given descriptor. The
   // handlers associated with the descriptor will be invoked with the
   // operation_aborted error.
- void cancel_ops(socket_type descriptor)
+ void cancel_ops(socket_type descriptor, per_descriptor_data&)
   {
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
     cancel_ops_unlocked(descriptor);
   }
 
- // Enqueue cancellation of all operations associated with the given
- // descriptor. The handlers associated with the descriptor will be invoked
- // with the operation_aborted error. This function does not acquire the
- // dev_poll_reactor's mutex, and so should only be used from within a reactor
- // handler.
- void enqueue_cancel_ops_unlocked(socket_type descriptor)
- {
- pending_cancellations_.push_back(descriptor);
- }
-
   // Cancel any operations that are running against the descriptor and remove
   // its registration from the reactor.
- void close_descriptor(socket_type descriptor)
+ void close_descriptor(socket_type descriptor, per_descriptor_data&)
   {
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
 
@@ -314,16 +331,16 @@
 
     // Dispatch any operation cancellations that were made while the select
     // loop was not running.
- read_op_queue_.dispatch_cancellations();
- write_op_queue_.dispatch_cancellations();
- except_op_queue_.dispatch_cancellations();
+ read_op_queue_.perform_cancellations();
+ write_op_queue_.perform_cancellations();
+ except_op_queue_.perform_cancellations();
     for (std::size_t i = 0; i < timer_queues_.size(); ++i)
       timer_queues_[i]->dispatch_cancellations();
 
     // Check if the thread is supposed to stop.
     if (stop_thread_)
     {
- cleanup_operations_and_timers(lock);
+ complete_operations_and_timers(lock);
       return;
     }
 
@@ -332,7 +349,7 @@
     if (!block && read_op_queue_.empty() && write_op_queue_.empty()
         && except_op_queue_.empty() && all_timer_queues_are_empty())
     {
- cleanup_operations_and_timers(lock);
+ complete_operations_and_timers(lock);
       return;
     }
 
@@ -348,9 +365,9 @@
         int descriptor = pending_event_changes_[i].fd;
         boost::system::error_code ec = boost::system::error_code(
             errno, boost::asio::error::get_system_category());
- read_op_queue_.dispatch_all_operations(descriptor, ec);
- write_op_queue_.dispatch_all_operations(descriptor, ec);
- except_op_queue_.dispatch_all_operations(descriptor, ec);
+ read_op_queue_.perform_all_operations(descriptor, ec);
+ write_op_queue_.perform_all_operations(descriptor, ec);
+ except_op_queue_.perform_all_operations(descriptor, ec);
       }
     }
     pending_event_changes_.clear();
@@ -371,7 +388,7 @@
     lock.lock();
     wait_in_progress_ = false;
 
- // Block signals while dispatching operations.
+ // Block signals while performing operations.
     boost::asio::detail::signal_blocker sb;
 
     // Dispatch the waiting events.
@@ -392,17 +409,17 @@
         // Exception operations must be processed first to ensure that any
         // out-of-band data is read before normal data.
         if (events[i].events & (POLLPRI | POLLERR | POLLHUP))
- more_except = except_op_queue_.dispatch_operation(descriptor, ec);
+ more_except = except_op_queue_.perform_operation(descriptor, ec);
         else
           more_except = except_op_queue_.has_operation(descriptor);
 
         if (events[i].events & (POLLIN | POLLERR | POLLHUP))
- more_reads = read_op_queue_.dispatch_operation(descriptor, ec);
+ more_reads = read_op_queue_.perform_operation(descriptor, ec);
         else
           more_reads = read_op_queue_.has_operation(descriptor);
 
         if (events[i].events & (POLLOUT | POLLERR | POLLHUP))
- more_writes = write_op_queue_.dispatch_operation(descriptor, ec);
+ more_writes = write_op_queue_.perform_operation(descriptor, ec);
         else
           more_writes = write_op_queue_.has_operation(descriptor);
 
@@ -437,16 +454,16 @@
           {
             ec = boost::system::error_code(errno,
                 boost::asio::error::get_system_category());
- read_op_queue_.dispatch_all_operations(descriptor, ec);
- write_op_queue_.dispatch_all_operations(descriptor, ec);
- except_op_queue_.dispatch_all_operations(descriptor, ec);
+ read_op_queue_.perform_all_operations(descriptor, ec);
+ write_op_queue_.perform_all_operations(descriptor, ec);
+ except_op_queue_.perform_all_operations(descriptor, ec);
           }
         }
       }
     }
- read_op_queue_.dispatch_cancellations();
- write_op_queue_.dispatch_cancellations();
- except_op_queue_.dispatch_cancellations();
+ read_op_queue_.perform_cancellations();
+ write_op_queue_.perform_cancellations();
+ except_op_queue_.perform_cancellations();
     for (std::size_t i = 0; i < timer_queues_.size(); ++i)
     {
       timer_queues_[i]->dispatch_timers();
@@ -458,7 +475,7 @@
       cancel_ops_unlocked(pending_cancellations_[i]);
     pending_cancellations_.clear();
 
- cleanup_operations_and_timers(lock);
+ complete_operations_and_timers(lock);
   }
 
   // Run the select loop in the thread.
@@ -558,16 +575,16 @@
   // destructors may make calls back into this reactor. We make a copy of the
   // vector of timer queues since the original may be modified while the lock
   // is not held.
- void cleanup_operations_and_timers(
+ void complete_operations_and_timers(
       boost::asio::detail::mutex::scoped_lock& lock)
   {
     timer_queues_for_cleanup_ = timer_queues_;
     lock.unlock();
- read_op_queue_.cleanup_operations();
- write_op_queue_.cleanup_operations();
- except_op_queue_.cleanup_operations();
+ read_op_queue_.complete_operations();
+ write_op_queue_.complete_operations();
+ except_op_queue_.complete_operations();
     for (std::size_t i = 0; i < timer_queues_for_cleanup_.size(); ++i)
- timer_queues_for_cleanup_[i]->cleanup_timers();
+ timer_queues_for_cleanup_[i]->complete_timers();
   }
 
   // Add a pending event entry for the given descriptor.

Modified: branches/release/boost/asio/detail/epoll_reactor.hpp
==============================================================================
--- branches/release/boost/asio/detail/epoll_reactor.hpp (original)
+++ branches/release/boost/asio/detail/epoll_reactor.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -54,6 +54,13 @@
   : public boost::asio::detail::service_base<epoll_reactor<Own_Thread> >
 {
 public:
+ // Per-descriptor data.
+ struct per_descriptor_data
+ {
+ bool allow_speculative_read;
+ bool allow_speculative_write;
+ };
+
   // Constructor.
   epoll_reactor(boost::asio::io_service& io_service)
     : boost::asio::detail::service_base<epoll_reactor<Own_Thread> >(io_service),
@@ -119,10 +126,14 @@
 
   // Register a socket with the reactor. Returns 0 on success, system error
   // code on failure.
- int register_descriptor(socket_type descriptor)
+ int register_descriptor(socket_type descriptor,
+ per_descriptor_data& descriptor_data)
   {
     // No need to lock according to epoll documentation.
 
+ descriptor_data.allow_speculative_read = true;
+ descriptor_data.allow_speculative_write = true;
+
     epoll_event ev = { 0, { 0 } };
     ev.events = 0;
     ev.data.fd = descriptor;
@@ -135,16 +146,47 @@
   // Start a new read operation. The handler object will be invoked when the
   // given descriptor is ready to be read, or an error has occurred.
   template <typename Handler>
- void start_read_op(socket_type descriptor, Handler handler)
- {
+ void start_read_op(socket_type descriptor,
+ per_descriptor_data& descriptor_data,
+ Handler handler, bool allow_speculative_read = true)
+ {
+ if (allow_speculative_read && descriptor_data.allow_speculative_read)
+ {
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = 0;
+ if (handler.perform(ec, bytes_transferred))
+ {
+ handler.complete(ec, bytes_transferred);
+ return;
+ }
+
+ // We only get one shot at a speculative read in this function.
+ allow_speculative_read = false;
+ }
+
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
 
     if (shutdown_)
       return;
 
- if (!read_op_queue_.has_operation(descriptor))
- if (handler(boost::system::error_code()))
+ if (!allow_speculative_read)
+ need_epoll_wait_ = true;
+ else if (!read_op_queue_.has_operation(descriptor))
+ {
+ // Speculative reads are ok as there are no queued read operations.
+ descriptor_data.allow_speculative_read = true;
+
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = 0;
+ if (handler.perform(ec, bytes_transferred))
+ {
+ handler.complete(ec, bytes_transferred);
         return;
+ }
+ }
+
+ // Speculative reads are not ok as there will be queued read operations.
+ descriptor_data.allow_speculative_read = false;
 
     if (read_op_queue_.enqueue_operation(descriptor, handler))
     {
@@ -163,7 +205,7 @@
       {
         boost::system::error_code ec(errno,
             boost::asio::error::get_system_category());
- read_op_queue_.dispatch_all_operations(descriptor, ec);
+ read_op_queue_.perform_all_operations(descriptor, ec);
       }
     }
   }
@@ -171,16 +213,47 @@
   // Start a new write operation. The handler object will be invoked when the
   // given descriptor is ready to be written, or an error has occurred.
   template <typename Handler>
- void start_write_op(socket_type descriptor, Handler handler)
- {
+ void start_write_op(socket_type descriptor,
+ per_descriptor_data& descriptor_data,
+ Handler handler, bool allow_speculative_write = true)
+ {
+ if (allow_speculative_write && descriptor_data.allow_speculative_write)
+ {
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = 0;
+ if (handler.perform(ec, bytes_transferred))
+ {
+ handler.complete(ec, bytes_transferred);
+ return;
+ }
+
+ // We only get one shot at a speculative write in this function.
+ allow_speculative_write = false;
+ }
+
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
 
     if (shutdown_)
       return;
 
- if (!write_op_queue_.has_operation(descriptor))
- if (handler(boost::system::error_code()))
+ if (!allow_speculative_write)
+ need_epoll_wait_ = true;
+ else if (!write_op_queue_.has_operation(descriptor))
+ {
+ // Speculative writes are ok as there are no queued write operations.
+ descriptor_data.allow_speculative_write = true;
+
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = 0;
+ if (handler.perform(ec, bytes_transferred))
+ {
+ handler.complete(ec, bytes_transferred);
         return;
+ }
+ }
+
+ // Speculative writes are not ok as there will be queued write operations.
+ descriptor_data.allow_speculative_write = false;
 
     if (write_op_queue_.enqueue_operation(descriptor, handler))
     {
@@ -199,7 +272,7 @@
       {
         boost::system::error_code ec(errno,
             boost::asio::error::get_system_category());
- write_op_queue_.dispatch_all_operations(descriptor, ec);
+ write_op_queue_.perform_all_operations(descriptor, ec);
       }
     }
   }
@@ -207,7 +280,8 @@
   // Start a new exception operation. The handler object will be invoked when
   // the given descriptor has exception information, or an error has occurred.
   template <typename Handler>
- void start_except_op(socket_type descriptor, Handler handler)
+ void start_except_op(socket_type descriptor,
+ per_descriptor_data&, Handler handler)
   {
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
 
@@ -231,31 +305,34 @@
       {
         boost::system::error_code ec(errno,
             boost::asio::error::get_system_category());
- except_op_queue_.dispatch_all_operations(descriptor, ec);
+ except_op_queue_.perform_all_operations(descriptor, ec);
       }
     }
   }
 
- // Start new write and exception operations. The handler object will be
- // invoked when the given descriptor is ready for writing or has exception
- // information available, or an error has occurred.
+ // Start a new write operation. The handler object will be invoked when the
+ // given descriptor is ready for writing or an error has occurred. Speculative
+ // writes are not allowed.
   template <typename Handler>
- void start_write_and_except_ops(socket_type descriptor, Handler handler)
+ void start_connect_op(socket_type descriptor,
+ per_descriptor_data& descriptor_data, Handler handler)
   {
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
 
     if (shutdown_)
       return;
 
- bool need_mod = write_op_queue_.enqueue_operation(descriptor, handler);
- need_mod = except_op_queue_.enqueue_operation(descriptor, handler)
- && need_mod;
- if (need_mod)
+ // Speculative writes are not ok as there will be queued write operations.
+ descriptor_data.allow_speculative_write = false;
+
+ if (write_op_queue_.enqueue_operation(descriptor, handler))
     {
       epoll_event ev = { 0, { 0 } };
- ev.events = EPOLLOUT | EPOLLPRI | EPOLLERR | EPOLLHUP;
+ ev.events = EPOLLOUT | EPOLLERR | EPOLLHUP;
       if (read_op_queue_.has_operation(descriptor))
         ev.events |= EPOLLIN;
+ if (except_op_queue_.has_operation(descriptor))
+ ev.events |= EPOLLPRI;
       ev.data.fd = descriptor;
 
       int result = epoll_ctl(epoll_fd_, EPOLL_CTL_MOD, descriptor, &ev);
@@ -265,8 +342,7 @@
       {
         boost::system::error_code ec(errno,
             boost::asio::error::get_system_category());
- write_op_queue_.dispatch_all_operations(descriptor, ec);
- except_op_queue_.dispatch_all_operations(descriptor, ec);
+ write_op_queue_.perform_all_operations(descriptor, ec);
       }
     }
   }
@@ -274,25 +350,15 @@
   // Cancel all operations associated with the given descriptor. The
   // handlers associated with the descriptor will be invoked with the
   // operation_aborted error.
- void cancel_ops(socket_type descriptor)
+ void cancel_ops(socket_type descriptor, per_descriptor_data&)
   {
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
     cancel_ops_unlocked(descriptor);
   }
 
- // Enqueue cancellation of all operations associated with the given
- // descriptor. The handlers associated with the descriptor will be invoked
- // with the operation_aborted error. This function does not acquire the
- // epoll_reactor's mutex, and so should only be used from within a reactor
- // handler.
- void enqueue_cancel_ops_unlocked(socket_type descriptor)
- {
- pending_cancellations_.push_back(descriptor);
- }
-
   // Cancel any operations that are running against the descriptor and remove
   // its registration from the reactor.
- void close_descriptor(socket_type descriptor)
+ void close_descriptor(socket_type descriptor, per_descriptor_data&)
   {
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
 
@@ -361,16 +427,16 @@
 
     // Dispatch any operation cancellations that were made while the select
     // loop was not running.
- read_op_queue_.dispatch_cancellations();
- write_op_queue_.dispatch_cancellations();
- except_op_queue_.dispatch_cancellations();
+ read_op_queue_.perform_cancellations();
+ write_op_queue_.perform_cancellations();
+ except_op_queue_.perform_cancellations();
     for (std::size_t i = 0; i < timer_queues_.size(); ++i)
       timer_queues_[i]->dispatch_cancellations();
 
     // Check if the thread is supposed to stop.
     if (stop_thread_)
     {
- cleanup_operations_and_timers(lock);
+ complete_operations_and_timers(lock);
       return;
     }
 
@@ -379,7 +445,7 @@
     if (!block && read_op_queue_.empty() && write_op_queue_.empty()
         && except_op_queue_.empty() && all_timer_queues_are_empty())
     {
- cleanup_operations_and_timers(lock);
+ complete_operations_and_timers(lock);
       return;
     }
 
@@ -396,7 +462,7 @@
     lock.lock();
     wait_in_progress_ = false;
 
- // Block signals while dispatching operations.
+ // Block signals while performing operations.
     boost::asio::detail::signal_blocker sb;
 
     // Dispatch the waiting events.
@@ -417,17 +483,17 @@
         // Exception operations must be processed first to ensure that any
         // out-of-band data is read before normal data.
         if (events[i].events & (EPOLLPRI | EPOLLERR | EPOLLHUP))
- more_except = except_op_queue_.dispatch_operation(descriptor, ec);
+ more_except = except_op_queue_.perform_operation(descriptor, ec);
         else
           more_except = except_op_queue_.has_operation(descriptor);
 
         if (events[i].events & (EPOLLIN | EPOLLERR | EPOLLHUP))
- more_reads = read_op_queue_.dispatch_operation(descriptor, ec);
+ more_reads = read_op_queue_.perform_operation(descriptor, ec);
         else
           more_reads = read_op_queue_.has_operation(descriptor);
 
         if (events[i].events & (EPOLLOUT | EPOLLERR | EPOLLHUP))
- more_writes = write_op_queue_.dispatch_operation(descriptor, ec);
+ more_writes = write_op_queue_.perform_operation(descriptor, ec);
         else
           more_writes = write_op_queue_.has_operation(descriptor);
 
@@ -461,16 +527,16 @@
           {
             ec = boost::system::error_code(errno,
                 boost::asio::error::get_system_category());
- read_op_queue_.dispatch_all_operations(descriptor, ec);
- write_op_queue_.dispatch_all_operations(descriptor, ec);
- except_op_queue_.dispatch_all_operations(descriptor, ec);
+ read_op_queue_.perform_all_operations(descriptor, ec);
+ write_op_queue_.perform_all_operations(descriptor, ec);
+ except_op_queue_.perform_all_operations(descriptor, ec);
           }
         }
       }
     }
- read_op_queue_.dispatch_cancellations();
- write_op_queue_.dispatch_cancellations();
- except_op_queue_.dispatch_cancellations();
+ read_op_queue_.perform_cancellations();
+ write_op_queue_.perform_cancellations();
+ except_op_queue_.perform_cancellations();
     for (std::size_t i = 0; i < timer_queues_.size(); ++i)
     {
       timer_queues_[i]->dispatch_timers();
@@ -486,7 +552,7 @@
     need_epoll_wait_ = !read_op_queue_.empty()
       || !write_op_queue_.empty() || !except_op_queue_.empty();
 
- cleanup_operations_and_timers(lock);
+ complete_operations_and_timers(lock);
   }
 
   // Run the select loop in the thread.
@@ -589,16 +655,16 @@
   // destructors may make calls back into this reactor. We make a copy of the
   // vector of timer queues since the original may be modified while the lock
   // is not held.
- void cleanup_operations_and_timers(
+ void complete_operations_and_timers(
       boost::asio::detail::mutex::scoped_lock& lock)
   {
     timer_queues_for_cleanup_ = timer_queues_;
     lock.unlock();
- read_op_queue_.cleanup_operations();
- write_op_queue_.cleanup_operations();
- except_op_queue_.cleanup_operations();
+ read_op_queue_.complete_operations();
+ write_op_queue_.complete_operations();
+ except_op_queue_.complete_operations();
     for (std::size_t i = 0; i < timer_queues_for_cleanup_.size(); ++i)
- timer_queues_for_cleanup_[i]->cleanup_timers();
+ timer_queues_for_cleanup_[i]->complete_timers();
   }
 
   // Mutex to protect access to internal data.

Modified: branches/release/boost/asio/detail/handler_queue.hpp
==============================================================================
--- branches/release/boost/asio/detail/handler_queue.hpp (original)
+++ branches/release/boost/asio/detail/handler_queue.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -199,6 +199,16 @@
       this_type* h(static_cast<this_type*>(base));
       typedef handler_alloc_traits<Handler, this_type> alloc_traits;
       handler_ptr<alloc_traits> ptr(h->handler_, h);
+
+ // A sub-object of the handler may be the true owner of the memory
+ // associated with the handler. Consequently, a local copy of the handler
+ // is required to ensure that any owning sub-object remains valid until
+ // after we have deallocated the memory here.
+ Handler handler(h->handler_);
+ (void)handler;
+
+ // Free the memory associated with the handler.
+ ptr.reset();
     }
 
   private:

Modified: branches/release/boost/asio/detail/hash_map.hpp
==============================================================================
--- branches/release/boost/asio/detail/hash_map.hpp (original)
+++ branches/release/boost/asio/detail/hash_map.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -44,6 +44,7 @@
 }
 #endif // defined(_WIN64)
 
+// Note: assumes K and V are POD types.
 template <typename K, typename V>
 class hash_map
   : private noncopyable
@@ -140,7 +141,7 @@
     if (it == values_.end())
     {
       buckets_[bucket].first = buckets_[bucket].last =
- values_.insert(values_.end(), v);
+ values_insert(values_.end(), v);
       return std::pair<iterator, bool>(buckets_[bucket].last, true);
     }
     iterator end = buckets_[bucket].last;
@@ -151,7 +152,7 @@
         return std::pair<iterator, bool>(it, false);
       ++it;
     }
- buckets_[bucket].last = values_.insert(end, v);
+ buckets_[bucket].last = values_insert(end, v);
     return std::pair<iterator, bool>(buckets_[bucket].last, true);
   }
 
@@ -170,7 +171,7 @@
     else if (is_last)
       --buckets_[bucket].last;
 
- values_.erase(it);
+ values_erase(it);
   }
 
   // Remove all entries from the map.
@@ -185,9 +186,36 @@
   }
 
 private:
+ // Insert an element into the values list by splicing from the spares list,
+ // if a spare is available, and otherwise by inserting a new element.
+ iterator values_insert(iterator it, const value_type& v)
+ {
+ if (spares_.empty())
+ {
+ return values_.insert(it, v);
+ }
+ else
+ {
+ spares_.front() = v;
+ values_.splice(it, spares_, spares_.begin());
+ return --it;
+ }
+ }
+
+ // Erase an element from the values list by splicing it to the spares list.
+ void values_erase(iterator it)
+ {
+ *it = value_type();
+ spares_.splice(spares_.begin(), values_, it);
+ }
+
   // The list of all values in the hash map.
   std::list<value_type> values_;
 
+ // The list of spare nodes waiting to be recycled. Assumes that POD types only
+ // are stored in the hash map.
+ std::list<value_type> spares_;
+
   // The type for a bucket in the hash table.
   struct bucket_type
   {

Copied: branches/release/boost/asio/detail/indirect_handler_queue.hpp (from r44851, /trunk/boost/asio/detail/indirect_handler_queue.hpp)
==============================================================================
--- /trunk/boost/asio/detail/indirect_handler_queue.hpp (original)
+++ branches/release/boost/asio/detail/indirect_handler_queue.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -21,6 +21,11 @@
 #include <boost/asio/detail/handler_invoke_helpers.hpp>
 #include <boost/asio/detail/noncopyable.hpp>
 
+#if defined(_MSC_VER) && (_MSC_VER >= 1310)
+extern "C" void _ReadWriteBarrier();
+# pragma intrinsic(_ReadWriteBarrier)
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1310)
+
 namespace boost {
 namespace asio {
 namespace detail {
@@ -195,6 +200,7 @@
     next_version_ += 2;
     n->handler_ = h;
     n->next_ = 0;
+ memory_barrier();
     back_->next_ = n;
     back_ = n;
   }
@@ -240,12 +246,34 @@
       this_type* h(static_cast<this_type*>(base));
       typedef handler_alloc_traits<Handler, this_type> alloc_traits;
       handler_ptr<alloc_traits> ptr(h->handler_, h);
+
+ // A sub-object of the handler may be the true owner of the memory
+ // associated with the handler. Consequently, a local copy of the handler
+ // is required to ensure that any owning sub-object remains valid until
+ // after we have deallocated the memory here.
+ Handler handler(h->handler_);
+ (void)handler;
+
+ // Free the memory associated with the handler.
+ ptr.reset();
     }
 
   private:
     Handler handler_;
   };
 
+ // Helper function to create a memory barrier.
+ static void memory_barrier()
+ {
+#if defined(_GLIBCXX_WRITE_MEM_BARRIER)
+ _GLIBCXX_WRITE_MEM_BARRIER;
+#elif defined(_MSC_VER) && (_MSC_VER >= 1310)
+ _ReadWriteBarrier();
+#else
+# error memory barrier required
+#endif
+ }
+
   // The front of the queue.
   node* front_;
 

Modified: branches/release/boost/asio/detail/kqueue_reactor.hpp
==============================================================================
--- branches/release/boost/asio/detail/kqueue_reactor.hpp (original)
+++ branches/release/boost/asio/detail/kqueue_reactor.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -61,6 +61,13 @@
   : public boost::asio::detail::service_base<kqueue_reactor<Own_Thread> >
 {
 public:
+ // Per-descriptor data.
+ struct per_descriptor_data
+ {
+ bool allow_speculative_read;
+ bool allow_speculative_write;
+ };
+
   // Constructor.
   kqueue_reactor(boost::asio::io_service& io_service)
     : boost::asio::detail::service_base<
@@ -127,24 +134,58 @@
 
   // Register a socket with the reactor. Returns 0 on success, system error
   // code on failure.
- int register_descriptor(socket_type)
+ int register_descriptor(socket_type, per_descriptor_data& descriptor_data)
   {
+ descriptor_data.allow_speculative_read = true;
+ descriptor_data.allow_speculative_write = true;
+
     return 0;
   }
 
   // Start a new read operation. The handler object will be invoked when the
   // given descriptor is ready to be read, or an error has occurred.
   template <typename Handler>
- void start_read_op(socket_type descriptor, Handler handler)
- {
+ void start_read_op(socket_type descriptor,
+ per_descriptor_data& descriptor_data, Handler handler,
+ bool allow_speculative_read = true)
+ {
+ if (allow_speculative_read && descriptor_data.allow_speculative_read)
+ {
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = 0;
+ if (handler.perform(ec, bytes_transferred))
+ {
+ handler.complete(ec, bytes_transferred);
+ return;
+ }
+
+ // We only get one shot at a speculative read in this function.
+ allow_speculative_read = false;
+ }
+
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
 
     if (shutdown_)
       return;
 
- if (!read_op_queue_.has_operation(descriptor))
- if (handler(boost::system::error_code()))
+ if (!allow_speculative_read)
+ need_kqueue_wait_ = true;
+ else if (!read_op_queue_.has_operation(descriptor))
+ {
+ // Speculative reads are ok as there are no queued read operations.
+ descriptor_data.allow_speculative_read = true;
+
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = 0;
+ if (handler.perform(ec, bytes_transferred))
+ {
+ handler.complete(ec, bytes_transferred);
         return;
+ }
+ }
+
+ // Speculative reads are not ok as there will be queued read operations.
+ descriptor_data.allow_speculative_read = false;
 
     if (read_op_queue_.enqueue_operation(descriptor, handler))
     {
@@ -154,7 +195,7 @@
       {
         boost::system::error_code ec(errno,
             boost::asio::error::get_system_category());
- read_op_queue_.dispatch_all_operations(descriptor, ec);
+ read_op_queue_.perform_all_operations(descriptor, ec);
       }
     }
   }
@@ -162,16 +203,47 @@
   // Start a new write operation. The handler object will be invoked when the
   // given descriptor is ready to be written, or an error has occurred.
   template <typename Handler>
- void start_write_op(socket_type descriptor, Handler handler)
- {
+ void start_write_op(socket_type descriptor,
+ per_descriptor_data& descriptor_data, Handler handler,
+ bool allow_speculative_write = true)
+ {
+ if (allow_speculative_write && descriptor_data.allow_speculative_write)
+ {
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = 0;
+ if (handler.perform(ec, bytes_transferred))
+ {
+ handler.complete(ec, bytes_transferred);
+ return;
+ }
+
+ // We only get one shot at a speculative write in this function.
+ allow_speculative_write = false;
+ }
+
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
 
     if (shutdown_)
       return;
 
- if (!write_op_queue_.has_operation(descriptor))
- if (handler(boost::system::error_code()))
+ if (!allow_speculative_write)
+ need_kqueue_wait_ = true;
+ else if (!write_op_queue_.has_operation(descriptor))
+ {
+ // Speculative writes are ok as there are no queued write operations.
+ descriptor_data.allow_speculative_write = true;
+
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = 0;
+ if (handler.perform(ec, bytes_transferred))
+ {
+ handler.complete(ec, bytes_transferred);
         return;
+ }
+ }
+
+ // Speculative writes are not ok as there will be queued write operations.
+ descriptor_data.allow_speculative_write = false;
 
     if (write_op_queue_.enqueue_operation(descriptor, handler))
     {
@@ -181,7 +253,7 @@
       {
         boost::system::error_code ec(errno,
             boost::asio::error::get_system_category());
- write_op_queue_.dispatch_all_operations(descriptor, ec);
+ write_op_queue_.perform_all_operations(descriptor, ec);
       }
     }
   }
@@ -189,7 +261,8 @@
   // Start a new exception operation. The handler object will be invoked when
   // the given descriptor has exception information, or an error has occurred.
   template <typename Handler>
- void start_except_op(socket_type descriptor, Handler handler)
+ void start_except_op(socket_type descriptor,
+ per_descriptor_data&, Handler handler)
   {
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
 
@@ -207,22 +280,25 @@
       {
         boost::system::error_code ec(errno,
             boost::asio::error::get_system_category());
- except_op_queue_.dispatch_all_operations(descriptor, ec);
+ except_op_queue_.perform_all_operations(descriptor, ec);
       }
     }
   }
 
- // Start new write and exception operations. The handler object will be
- // invoked when the given descriptor is ready for writing or has exception
- // information available, or an error has occurred.
+ // Start a new write operation. The handler object will be invoked when the
+ // given descriptor is ready to be written, or an error has occurred.
   template <typename Handler>
- void start_write_and_except_ops(socket_type descriptor, Handler handler)
+ void start_connect_op(socket_type descriptor,
+ per_descriptor_data& descriptor_data, Handler handler)
   {
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
 
     if (shutdown_)
       return;
 
+ // Speculative writes are not ok as there will be queued write operations.
+ descriptor_data.allow_speculative_write = false;
+
     if (write_op_queue_.enqueue_operation(descriptor, handler))
     {
       struct kevent event;
@@ -231,23 +307,7 @@
       {
         boost::system::error_code ec(errno,
             boost::asio::error::get_system_category());
- write_op_queue_.dispatch_all_operations(descriptor, ec);
- }
- }
-
- if (except_op_queue_.enqueue_operation(descriptor, handler))
- {
- struct kevent event;
- if (read_op_queue_.has_operation(descriptor))
- EV_SET(&event, descriptor, EVFILT_READ, EV_ADD, 0, 0, 0);
- else
- EV_SET(&event, descriptor, EVFILT_READ, EV_ADD, EV_OOBAND, 0, 0);
- if (::kevent(kqueue_fd_, &event, 1, 0, 0, 0) == -1)
- {
- boost::system::error_code ec(errno,
- boost::asio::error::get_system_category());
- except_op_queue_.dispatch_all_operations(descriptor, ec);
- write_op_queue_.dispatch_all_operations(descriptor, ec);
+ write_op_queue_.perform_all_operations(descriptor, ec);
       }
     }
   }
@@ -255,25 +315,15 @@
   // Cancel all operations associated with the given descriptor. The
   // handlers associated with the descriptor will be invoked with the
   // operation_aborted error.
- void cancel_ops(socket_type descriptor)
+ void cancel_ops(socket_type descriptor, per_descriptor_data&)
   {
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
     cancel_ops_unlocked(descriptor);
   }
 
- // Enqueue cancellation of all operations associated with the given
- // descriptor. The handlers associated with the descriptor will be invoked
- // with the operation_aborted error. This function does not acquire the
- // kqueue_reactor's mutex, and so should only be used from within a reactor
- // handler.
- void enqueue_cancel_ops_unlocked(socket_type descriptor)
- {
- pending_cancellations_.push_back(descriptor);
- }
-
   // Cancel any operations that are running against the descriptor and remove
   // its registration from the reactor.
- void close_descriptor(socket_type descriptor)
+ void close_descriptor(socket_type descriptor, per_descriptor_data&)
   {
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
 
@@ -344,16 +394,16 @@
 
     // Dispatch any operation cancellations that were made while the select
     // loop was not running.
- read_op_queue_.dispatch_cancellations();
- write_op_queue_.dispatch_cancellations();
- except_op_queue_.dispatch_cancellations();
+ read_op_queue_.perform_cancellations();
+ write_op_queue_.perform_cancellations();
+ except_op_queue_.perform_cancellations();
     for (std::size_t i = 0; i < timer_queues_.size(); ++i)
       timer_queues_[i]->dispatch_cancellations();
 
     // Check if the thread is supposed to stop.
     if (stop_thread_)
     {
- cleanup_operations_and_timers(lock);
+ complete_operations_and_timers(lock);
       return;
     }
 
@@ -362,7 +412,7 @@
     if (!block && read_op_queue_.empty() && write_op_queue_.empty()
         && except_op_queue_.empty() && all_timer_queues_are_empty())
     {
- cleanup_operations_and_timers(lock);
+ complete_operations_and_timers(lock);
       return;
     }
 
@@ -382,7 +432,7 @@
     lock.lock();
     wait_in_progress_ = false;
 
- // Block signals while dispatching operations.
+ // Block signals while performing operations.
     boost::asio::detail::signal_blocker sb;
 
     // Dispatch the waiting events.
@@ -402,22 +452,22 @@
         {
           boost::system::error_code error(
               events[i].data, boost::asio::error::get_system_category());
- except_op_queue_.dispatch_all_operations(descriptor, error);
- read_op_queue_.dispatch_all_operations(descriptor, error);
+ except_op_queue_.perform_all_operations(descriptor, error);
+ read_op_queue_.perform_all_operations(descriptor, error);
         }
         else if (events[i].flags & EV_OOBAND)
         {
           boost::system::error_code error;
- more_except = except_op_queue_.dispatch_operation(descriptor, error);
+ more_except = except_op_queue_.perform_operation(descriptor, error);
           if (events[i].data > 0)
- more_reads = read_op_queue_.dispatch_operation(descriptor, error);
+ more_reads = read_op_queue_.perform_operation(descriptor, error);
           else
             more_reads = read_op_queue_.has_operation(descriptor);
         }
         else
         {
           boost::system::error_code error;
- more_reads = read_op_queue_.dispatch_operation(descriptor, error);
+ more_reads = read_op_queue_.perform_operation(descriptor, error);
           more_except = except_op_queue_.has_operation(descriptor);
         }
 
@@ -433,8 +483,8 @@
         {
           boost::system::error_code error(errno,
               boost::asio::error::get_system_category());
- except_op_queue_.dispatch_all_operations(descriptor, error);
- read_op_queue_.dispatch_all_operations(descriptor, error);
+ except_op_queue_.perform_all_operations(descriptor, error);
+ read_op_queue_.perform_all_operations(descriptor, error);
         }
       }
       else if (events[i].filter == EVFILT_WRITE)
@@ -445,12 +495,12 @@
         {
           boost::system::error_code error(
               events[i].data, boost::asio::error::get_system_category());
- write_op_queue_.dispatch_all_operations(descriptor, error);
+ write_op_queue_.perform_all_operations(descriptor, error);
         }
         else
         {
           boost::system::error_code error;
- more_writes = write_op_queue_.dispatch_operation(descriptor, error);
+ more_writes = write_op_queue_.perform_operation(descriptor, error);
         }
 
         // Update the descriptor in the kqueue.
@@ -463,14 +513,14 @@
         {
           boost::system::error_code error(errno,
               boost::asio::error::get_system_category());
- write_op_queue_.dispatch_all_operations(descriptor, error);
+ write_op_queue_.perform_all_operations(descriptor, error);
         }
       }
     }
 
- read_op_queue_.dispatch_cancellations();
- write_op_queue_.dispatch_cancellations();
- except_op_queue_.dispatch_cancellations();
+ read_op_queue_.perform_cancellations();
+ write_op_queue_.perform_cancellations();
+ except_op_queue_.perform_cancellations();
     for (std::size_t i = 0; i < timer_queues_.size(); ++i)
     {
       timer_queues_[i]->dispatch_timers();
@@ -486,7 +536,7 @@
     need_kqueue_wait_ = !read_op_queue_.empty()
       || !write_op_queue_.empty() || !except_op_queue_.empty();
 
- cleanup_operations_and_timers(lock);
+ complete_operations_and_timers(lock);
   }
 
   // Run the select loop in the thread.
@@ -587,16 +637,16 @@
   // destructors may make calls back into this reactor. We make a copy of the
   // vector of timer queues since the original may be modified while the lock
   // is not held.
- void cleanup_operations_and_timers(
+ void complete_operations_and_timers(
       boost::asio::detail::mutex::scoped_lock& lock)
   {
     timer_queues_for_cleanup_ = timer_queues_;
     lock.unlock();
- read_op_queue_.cleanup_operations();
- write_op_queue_.cleanup_operations();
- except_op_queue_.cleanup_operations();
+ read_op_queue_.complete_operations();
+ write_op_queue_.complete_operations();
+ except_op_queue_.complete_operations();
     for (std::size_t i = 0; i < timer_queues_for_cleanup_.size(); ++i)
- timer_queues_for_cleanup_[i]->cleanup_timers();
+ timer_queues_for_cleanup_[i]->complete_timers();
   }
 
   // Mutex to protect access to internal data.

Modified: branches/release/boost/asio/detail/null_thread.hpp
==============================================================================
--- branches/release/boost/asio/detail/null_thread.hpp (original)
+++ branches/release/boost/asio/detail/null_thread.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -39,9 +39,12 @@
   : private noncopyable
 {
 public:
+ // The purpose of the thread.
+ enum purpose { internal, external };
+
   // Constructor.
   template <typename Function>
- null_thread(Function f)
+ null_thread(Function f, purpose = internal)
   {
     boost::system::system_error e(
         boost::asio::error::operation_not_supported, "thread");

Modified: branches/release/boost/asio/detail/old_win_sdk_compat.hpp
==============================================================================
--- branches/release/boost/asio/detail/old_win_sdk_compat.hpp (original)
+++ branches/release/boost/asio/detail/old_win_sdk_compat.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -330,6 +330,11 @@
 # define IPV6_V6ONLY 27
 #endif
 
+// Some SDKs (e.g. Windows CE) don't define IPPROTO_ICMPV6.
+#if !defined(IPPROTO_ICMPV6)
+# define IPPROTO_ICMPV6 58
+#endif
+
 #endif // defined(BOOST_WINDOWS) || defined(__CYGWIN__)
 
 #include <boost/asio/detail/pop_options.hpp>

Modified: branches/release/boost/asio/detail/posix_thread.hpp
==============================================================================
--- branches/release/boost/asio/detail/posix_thread.hpp (original)
+++ branches/release/boost/asio/detail/posix_thread.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -43,9 +43,12 @@
   : private noncopyable
 {
 public:
+ // The purpose of the thread.
+ enum purpose { internal, external };
+
   // Constructor.
   template <typename Function>
- posix_thread(Function f)
+ posix_thread(Function f, purpose = internal)
     : joined_(false)
   {
     std::auto_ptr<func_base> arg(new func<Function>(f));

Modified: branches/release/boost/asio/detail/push_options.hpp
==============================================================================
--- branches/release/boost/asio/detail/push_options.hpp (original)
+++ branches/release/boost/asio/detail/push_options.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -87,8 +87,10 @@
 
 # pragma warning (disable:4103)
 # pragma warning (push)
+# pragma warning (disable:4127)
 # pragma warning (disable:4244)
 # pragma warning (disable:4355)
+# pragma warning (disable:4512)
 # pragma warning (disable:4675)
 # if defined(_M_IX86) && defined(_Wp64)
 // The /Wp64 option is broken. If you want to check 64 bit portability, use a

Copied: branches/release/boost/asio/detail/reactive_descriptor_service.hpp (from r44685, /trunk/boost/asio/detail/reactive_descriptor_service.hpp)
==============================================================================
--- /trunk/boost/asio/detail/reactive_descriptor_service.hpp (original)
+++ branches/release/boost/asio/detail/reactive_descriptor_service.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -21,6 +21,7 @@
 #include <boost/asio/error.hpp>
 #include <boost/asio/io_service.hpp>
 #include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/handler_base_from_member.hpp>
 #include <boost/asio/detail/noncopyable.hpp>
 #include <boost/asio/detail/service_base.hpp>
 #include <boost/asio/detail/descriptor_ops.hpp>
@@ -67,6 +68,9 @@
 
     // Flags indicating the current state of the descriptor.
     unsigned char flags_;
+
+ // Per-descriptor data used by the reactor.
+ typename Reactor::per_descriptor_data reactor_data_;
   };
 
   // The maximum number of buffers to support in a single operation.
@@ -97,7 +101,7 @@
   {
     if (impl.descriptor_ != -1)
     {
- reactor_.close_descriptor(impl.descriptor_);
+ reactor_.close_descriptor(impl.descriptor_, impl.reactor_data_);
 
       if (impl.flags_ & implementation_type::internal_non_blocking)
       {
@@ -125,7 +129,8 @@
       return ec;
     }
 
- if (int err = reactor_.register_descriptor(native_descriptor))
+ if (int err = reactor_.register_descriptor(
+ native_descriptor, impl.reactor_data_))
     {
       ec = boost::system::error_code(err,
           boost::asio::error::get_system_category());
@@ -150,7 +155,7 @@
   {
     if (is_open(impl))
     {
- reactor_.close_descriptor(impl.descriptor_);
+ reactor_.close_descriptor(impl.descriptor_, impl.reactor_data_);
 
       if (impl.flags_ & implementation_type::internal_non_blocking)
       {
@@ -172,7 +177,7 @@
   }
 
   // Get the native descriptor representation.
- native_type native(implementation_type& impl)
+ native_type native(const implementation_type& impl) const
   {
     return impl.descriptor_;
   }
@@ -187,7 +192,7 @@
       return ec;
     }
 
- reactor_.cancel_ops(impl.descriptor_);
+ reactor_.cancel_ops(impl.descriptor_, impl.reactor_data_);
     ec = boost::system::error_code();
     return ec;
   }
@@ -269,7 +274,8 @@
     for (;;)
     {
       // Try to complete the operation without blocking.
- int bytes_sent = descriptor_ops::writev(impl.descriptor_, bufs, i, ec);
+ int bytes_sent = descriptor_ops::gather_write(
+ impl.descriptor_, bufs, i, ec);
 
       // Check if operation succeeded.
       if (bytes_sent >= 0)
@@ -304,25 +310,27 @@
   }
 
   template <typename ConstBufferSequence, typename Handler>
- class write_handler
+ class write_operation :
+ public handler_base_from_member<Handler>
   {
   public:
- write_handler(int descriptor, boost::asio::io_service& io_service,
+ write_operation(int descriptor, boost::asio::io_service& io_service,
         const ConstBufferSequence& buffers, Handler handler)
- : descriptor_(descriptor),
+ : handler_base_from_member<Handler>(handler),
+ descriptor_(descriptor),
         io_service_(io_service),
         work_(io_service),
- buffers_(buffers),
- handler_(handler)
+ buffers_(buffers)
     {
     }
 
- bool operator()(const boost::system::error_code& result)
+ bool perform(boost::system::error_code& ec,
+ std::size_t& bytes_transferred)
     {
       // Check whether the operation was successful.
- if (result)
+ if (ec)
       {
- io_service_.post(bind_handler(handler_, result, 0));
+ bytes_transferred = 0;
         return true;
       }
 
@@ -340,24 +348,28 @@
       }
 
       // Write the data.
- boost::system::error_code ec;
- int bytes = descriptor_ops::writev(descriptor_, bufs, i, ec);
+ int bytes = descriptor_ops::gather_write(descriptor_, bufs, i, ec);
 
       // Check if we need to run the operation again.
       if (ec == boost::asio::error::would_block
           || ec == boost::asio::error::try_again)
         return false;
 
- io_service_.post(bind_handler(handler_, ec, bytes < 0 ? 0 : bytes));
+ bytes_transferred = (bytes < 0 ? 0 : bytes);
       return true;
     }
 
+ void complete(const boost::system::error_code& ec,
+ std::size_t bytes_transferred)
+ {
+ io_service_.post(bind_handler(this->handler_, ec, bytes_transferred));
+ }
+
   private:
     int descriptor_;
     boost::asio::io_service& io_service_;
     boost::asio::io_service::work work_;
     ConstBufferSequence buffers_;
- Handler handler_;
   };
 
   // Start an asynchronous write. The data being sent must be valid for the
@@ -405,31 +417,39 @@
         impl.flags_ |= implementation_type::internal_non_blocking;
       }
 
- reactor_.start_write_op(impl.descriptor_,
- write_handler<ConstBufferSequence, Handler>(
+ reactor_.start_write_op(impl.descriptor_, impl.reactor_data_,
+ write_operation<ConstBufferSequence, Handler>(
             impl.descriptor_, this->get_io_service(), buffers, handler));
     }
   }
 
   template <typename Handler>
- class null_buffers_handler
+ class null_buffers_operation :
+ public handler_base_from_member<Handler>
   {
   public:
- null_buffers_handler(boost::asio::io_service& io_service, Handler handler)
- : work_(io_service),
- handler_(handler)
+ null_buffers_operation(boost::asio::io_service& io_service, Handler handler)
+ : handler_base_from_member<Handler>(handler),
+ work_(io_service)
     {
     }
 
- bool operator()(const boost::system::error_code& result)
+ bool perform(boost::system::error_code&,
+ std::size_t& bytes_transferred)
     {
- work_.get_io_service().post(bind_handler(handler_, result, 0));
+ bytes_transferred = 0;
       return true;
     }
 
+ void complete(const boost::system::error_code& ec,
+ std::size_t bytes_transferred)
+ {
+ work_.get_io_service().post(bind_handler(
+ this->handler_, ec, bytes_transferred));
+ }
+
   private:
     boost::asio::io_service::work work_;
- Handler handler_;
   };
 
   // Start an asynchronous wait until data can be written without blocking.
@@ -444,8 +464,8 @@
     }
     else
     {
- reactor_.start_write_op(impl.descriptor_,
- null_buffers_handler<Handler>(this->get_io_service(), handler),
+ reactor_.start_write_op(impl.descriptor_, impl.reactor_data_,
+ null_buffers_operation<Handler>(this->get_io_service(), handler),
           false);
     }
   }
@@ -499,7 +519,8 @@
     for (;;)
     {
       // Try to complete the operation without blocking.
- int bytes_read = descriptor_ops::readv(impl.descriptor_, bufs, i, ec);
+ int bytes_read = descriptor_ops::scatter_read(
+ impl.descriptor_, bufs, i, ec);
 
       // Check if operation succeeded.
       if (bytes_read > 0)
@@ -526,7 +547,7 @@
 
   // Wait until data can be read without blocking.
   size_t read_some(implementation_type& impl,
- const null_buffers& buffers, boost::system::error_code& ec)
+ const null_buffers&, boost::system::error_code& ec)
   {
     if (!is_open(impl))
     {
@@ -541,25 +562,27 @@
   }
 
   template <typename MutableBufferSequence, typename Handler>
- class read_handler
+ class read_operation :
+ public handler_base_from_member<Handler>
   {
   public:
- read_handler(int descriptor, boost::asio::io_service& io_service,
+ read_operation(int descriptor, boost::asio::io_service& io_service,
         const MutableBufferSequence& buffers, Handler handler)
- : descriptor_(descriptor),
+ : handler_base_from_member<Handler>(handler),
+ descriptor_(descriptor),
         io_service_(io_service),
         work_(io_service),
- buffers_(buffers),
- handler_(handler)
+ buffers_(buffers)
     {
     }
 
- bool operator()(const boost::system::error_code& result)
+ bool perform(boost::system::error_code& ec,
+ std::size_t& bytes_transferred)
     {
       // Check whether the operation was successful.
- if (result)
+ if (ec)
       {
- io_service_.post(bind_handler(handler_, result, 0));
+ bytes_transferred = 0;
         return true;
       }
 
@@ -577,8 +600,7 @@
       }
 
       // Read some data.
- boost::system::error_code ec;
- int bytes = descriptor_ops::readv(descriptor_, bufs, i, ec);
+ int bytes = descriptor_ops::scatter_read(descriptor_, bufs, i, ec);
       if (bytes == 0)
         ec = boost::asio::error::eof;
 
@@ -587,16 +609,21 @@
           || ec == boost::asio::error::try_again)
         return false;
 
- io_service_.post(bind_handler(handler_, ec, bytes < 0 ? 0 : bytes));
+ bytes_transferred = (bytes < 0 ? 0 : bytes);
       return true;
     }
 
+ void complete(const boost::system::error_code& ec,
+ std::size_t bytes_transferred)
+ {
+ io_service_.post(bind_handler(this->handler_, ec, bytes_transferred));
+ }
+
   private:
     int descriptor_;
     boost::asio::io_service& io_service_;
     boost::asio::io_service::work work_;
     MutableBufferSequence buffers_;
- Handler handler_;
   };
 
   // Start an asynchronous read. The buffer for the data being read must be
@@ -644,8 +671,8 @@
         impl.flags_ |= implementation_type::internal_non_blocking;
       }
 
- reactor_.start_read_op(impl.descriptor_,
- read_handler<MutableBufferSequence, Handler>(
+ reactor_.start_read_op(impl.descriptor_, impl.reactor_data_,
+ read_operation<MutableBufferSequence, Handler>(
             impl.descriptor_, this->get_io_service(), buffers, handler));
     }
   }
@@ -662,8 +689,8 @@
     }
     else
     {
- reactor_.start_read_op(impl.descriptor_,
- null_buffers_handler<Handler>(this->get_io_service(), handler),
+ reactor_.start_read_op(impl.descriptor_, impl.reactor_data_,
+ null_buffers_operation<Handler>(this->get_io_service(), handler),
           false);
     }
   }

Copied: branches/release/boost/asio/detail/reactive_serial_port_service.hpp (from r46272, /trunk/boost/asio/detail/reactive_serial_port_service.hpp)
==============================================================================
--- /trunk/boost/asio/detail/reactive_serial_port_service.hpp (original)
+++ branches/release/boost/asio/detail/reactive_serial_port_service.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -109,7 +109,16 @@
     s = descriptor_ops::error_wrapper(::tcgetattr(fd, &ios), ec);
     if (s >= 0)
     {
+#if defined(_BSD_SOURCE)
       ::cfmakeraw(&ios);
+#else
+ ios.c_iflag &= ~(IGNBRK | BRKINT | PARMRK
+ | ISTRIP | INLCR | IGNCR | ICRNL | IXON);
+ ios.c_oflag &= ~OPOST;
+ ios.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
+ ios.c_cflag &= ~(CSIZE | PARENB);
+ ios.c_cflag |= CS8;
+#endif
       ios.c_iflag |= IGNPAR;
       descriptor_ops::clear_error(ec);
       s = descriptor_ops::error_wrapper(::tcsetattr(fd, TCSANOW, &ios), ec);

Modified: branches/release/boost/asio/detail/reactive_socket_service.hpp
==============================================================================
--- branches/release/boost/asio/detail/reactive_socket_service.hpp (original)
+++ branches/release/boost/asio/detail/reactive_socket_service.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -26,6 +26,7 @@
 #include <boost/asio/io_service.hpp>
 #include <boost/asio/socket_base.hpp>
 #include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/handler_base_from_member.hpp>
 #include <boost/asio/detail/noncopyable.hpp>
 #include <boost/asio/detail/service_base.hpp>
 #include <boost/asio/detail/socket_holder.hpp>
@@ -84,6 +85,9 @@
 
     // The protocol associated with the socket.
     protocol_type protocol_;
+
+ // Per-descriptor data used by the reactor.
+ typename Reactor::per_descriptor_data reactor_data_;
   };
 
   // The maximum number of buffers to support in a single operation.
@@ -114,7 +118,7 @@
   {
     if (impl.socket_ != invalid_socket)
     {
- reactor_.close_descriptor(impl.socket_);
+ reactor_.close_descriptor(impl.socket_, impl.reactor_data_);
 
       if (impl.flags_ & implementation_type::internal_non_blocking)
       {
@@ -156,7 +160,7 @@
     if (sock.get() == invalid_socket)
       return ec;
 
- if (int err = reactor_.register_descriptor(sock.get()))
+ if (int err = reactor_.register_descriptor(sock.get(), impl.reactor_data_))
     {
       ec = boost::system::error_code(err,
           boost::asio::error::get_system_category());
@@ -181,7 +185,8 @@
       return ec;
     }
 
- if (int err = reactor_.register_descriptor(native_socket))
+ if (int err = reactor_.register_descriptor(
+ native_socket, impl.reactor_data_))
     {
       ec = boost::system::error_code(err,
           boost::asio::error::get_system_category());
@@ -207,7 +212,7 @@
   {
     if (is_open(impl))
     {
- reactor_.close_descriptor(impl.socket_);
+ reactor_.close_descriptor(impl.socket_, impl.reactor_data_);
 
       if (impl.flags_ & implementation_type::internal_non_blocking)
       {
@@ -243,7 +248,7 @@
       return ec;
     }
 
- reactor_.cancel_ops(impl.socket_);
+ reactor_.cancel_ops(impl.socket_, impl.reactor_data_);
     ec = boost::system::error_code();
     return ec;
   }
@@ -559,28 +564,46 @@
     }
   }
 
+ // Wait until data can be sent without blocking.
+ size_t send(implementation_type& impl, const null_buffers&,
+ socket_base::message_flags, boost::system::error_code& ec)
+ {
+ if (!is_open(impl))
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // Wait for socket to become ready.
+ socket_ops::poll_write(impl.socket_, ec);
+
+ return 0;
+ }
+
   template <typename ConstBufferSequence, typename Handler>
- class send_handler
+ class send_operation :
+ public handler_base_from_member<Handler>
   {
   public:
- send_handler(socket_type socket, boost::asio::io_service& io_service,
+ send_operation(socket_type socket, boost::asio::io_service& io_service,
         const ConstBufferSequence& buffers, socket_base::message_flags flags,
         Handler handler)
- : socket_(socket),
+ : handler_base_from_member<Handler>(handler),
+ socket_(socket),
         io_service_(io_service),
         work_(io_service),
         buffers_(buffers),
- flags_(flags),
- handler_(handler)
+ flags_(flags)
     {
     }
 
- bool operator()(const boost::system::error_code& result)
+ bool perform(boost::system::error_code& ec,
+ std::size_t& bytes_transferred)
     {
       // Check whether the operation was successful.
- if (result)
+ if (ec)
       {
- io_service_.post(bind_handler(handler_, result, 0));
+ bytes_transferred = 0;
         return true;
       }
 
@@ -598,7 +621,6 @@
       }
 
       // Send the data.
- boost::system::error_code ec;
       int bytes = socket_ops::send(socket_, bufs, i, flags_, ec);
 
       // Check if we need to run the operation again.
@@ -606,17 +628,22 @@
           || ec == boost::asio::error::try_again)
         return false;
 
- io_service_.post(bind_handler(handler_, ec, bytes < 0 ? 0 : bytes));
+ bytes_transferred = (bytes < 0 ? 0 : bytes);
       return true;
     }
 
+ void complete(const boost::system::error_code& ec,
+ std::size_t bytes_transferred)
+ {
+ io_service_.post(bind_handler(this->handler_, ec, bytes_transferred));
+ }
+
   private:
     socket_type socket_;
     boost::asio::io_service& io_service_;
     boost::asio::io_service::work work_;
     ConstBufferSequence buffers_;
     socket_base::message_flags flags_;
- Handler handler_;
   };
 
   // Start an asynchronous send. The data being sent must be valid for the
@@ -667,12 +694,59 @@
         impl.flags_ |= implementation_type::internal_non_blocking;
       }
 
- reactor_.start_write_op(impl.socket_,
- send_handler<ConstBufferSequence, Handler>(
+ reactor_.start_write_op(impl.socket_, impl.reactor_data_,
+ send_operation<ConstBufferSequence, Handler>(
             impl.socket_, this->get_io_service(), buffers, flags, handler));
     }
   }
 
+ template <typename Handler>
+ class null_buffers_operation :
+ public handler_base_from_member<Handler>
+ {
+ public:
+ null_buffers_operation(boost::asio::io_service& io_service, Handler handler)
+ : handler_base_from_member<Handler>(handler),
+ work_(io_service)
+ {
+ }
+
+ bool perform(boost::system::error_code&,
+ std::size_t& bytes_transferred)
+ {
+ bytes_transferred = 0;
+ return true;
+ }
+
+ void complete(const boost::system::error_code& ec,
+ std::size_t bytes_transferred)
+ {
+ work_.get_io_service().post(bind_handler(
+ this->handler_, ec, bytes_transferred));
+ }
+
+ private:
+ boost::asio::io_service::work work_;
+ };
+
+ // Start an asynchronous wait until data can be sent without blocking.
+ template <typename Handler>
+ void async_send(implementation_type& impl, const null_buffers&,
+ socket_base::message_flags, Handler handler)
+ {
+ if (!is_open(impl))
+ {
+ this->get_io_service().post(bind_handler(handler,
+ boost::asio::error::bad_descriptor, 0));
+ }
+ else
+ {
+ reactor_.start_write_op(impl.socket_, impl.reactor_data_,
+ null_buffers_operation<Handler>(this->get_io_service(), handler),
+ false);
+ }
+ }
+
   // Send a datagram to the specified endpoint. Returns the number of bytes
   // sent.
   template <typename ConstBufferSequence>
@@ -734,29 +808,48 @@
     }
   }
 
+ // Wait until data can be sent without blocking.
+ size_t send_to(implementation_type& impl, const null_buffers&,
+ socket_base::message_flags, const endpoint_type&,
+ boost::system::error_code& ec)
+ {
+ if (!is_open(impl))
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // Wait for socket to become ready.
+ socket_ops::poll_write(impl.socket_, ec);
+
+ return 0;
+ }
+
   template <typename ConstBufferSequence, typename Handler>
- class send_to_handler
+ class send_to_operation :
+ public handler_base_from_member<Handler>
   {
   public:
- send_to_handler(socket_type socket, boost::asio::io_service& io_service,
+ send_to_operation(socket_type socket, boost::asio::io_service& io_service,
         const ConstBufferSequence& buffers, const endpoint_type& endpoint,
         socket_base::message_flags flags, Handler handler)
- : socket_(socket),
+ : handler_base_from_member<Handler>(handler),
+ socket_(socket),
         io_service_(io_service),
         work_(io_service),
         buffers_(buffers),
         destination_(endpoint),
- flags_(flags),
- handler_(handler)
+ flags_(flags)
     {
     }
 
- bool operator()(const boost::system::error_code& result)
+ bool perform(boost::system::error_code& ec,
+ std::size_t& bytes_transferred)
     {
       // Check whether the operation was successful.
- if (result)
+ if (ec)
       {
- io_service_.post(bind_handler(handler_, result, 0));
+ bytes_transferred = 0;
         return true;
       }
 
@@ -774,7 +867,6 @@
       }
 
       // Send the data.
- boost::system::error_code ec;
       int bytes = socket_ops::sendto(socket_, bufs, i, flags_,
           destination_.data(), destination_.size(), ec);
 
@@ -783,10 +875,16 @@
           || ec == boost::asio::error::try_again)
         return false;
 
- io_service_.post(bind_handler(handler_, ec, bytes < 0 ? 0 : bytes));
+ bytes_transferred = (bytes < 0 ? 0 : bytes);
       return true;
     }
 
+ void complete(const boost::system::error_code& ec,
+ std::size_t bytes_transferred)
+ {
+ io_service_.post(bind_handler(this->handler_, ec, bytes_transferred));
+ }
+
   private:
     socket_type socket_;
     boost::asio::io_service& io_service_;
@@ -794,7 +892,6 @@
     ConstBufferSequence buffers_;
     endpoint_type destination_;
     socket_base::message_flags flags_;
- Handler handler_;
   };
 
   // Start an asynchronous send. The data being sent must be valid for the
@@ -825,13 +922,31 @@
         impl.flags_ |= implementation_type::internal_non_blocking;
       }
 
- reactor_.start_write_op(impl.socket_,
- send_to_handler<ConstBufferSequence, Handler>(
+ reactor_.start_write_op(impl.socket_, impl.reactor_data_,
+ send_to_operation<ConstBufferSequence, Handler>(
             impl.socket_, this->get_io_service(), buffers,
             destination, flags, handler));
     }
   }
 
+ // Start an asynchronous wait until data can be sent without blocking.
+ template <typename Handler>
+ void async_send_to(implementation_type& impl, const null_buffers&,
+ socket_base::message_flags, const endpoint_type&, Handler handler)
+ {
+ if (!is_open(impl))
+ {
+ this->get_io_service().post(bind_handler(handler,
+ boost::asio::error::bad_descriptor, 0));
+ }
+ else
+ {
+ reactor_.start_write_op(impl.socket_, impl.reactor_data_,
+ null_buffers_operation<Handler>(this->get_io_service(), handler),
+ false);
+ }
+ }
+
   // Receive some data from the peer. Returns the number of bytes received.
   template <typename MutableBufferSequence>
   size_t receive(implementation_type& impl,
@@ -889,7 +1004,7 @@
         return bytes_recvd;
 
       // Check for EOF.
- if (bytes_recvd == 0)
+ if (bytes_recvd == 0 && impl.protocol_.type() == SOCK_STREAM)
       {
         ec = boost::asio::error::eof;
         return 0;
@@ -907,28 +1022,48 @@
     }
   }
 
+ // Wait until data can be received without blocking.
+ size_t receive(implementation_type& impl, const null_buffers&,
+ socket_base::message_flags, boost::system::error_code& ec)
+ {
+ if (!is_open(impl))
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // Wait for socket to become ready.
+ socket_ops::poll_read(impl.socket_, ec);
+
+ return 0;
+ }
+
   template <typename MutableBufferSequence, typename Handler>
- class receive_handler
+ class receive_operation :
+ public handler_base_from_member<Handler>
   {
   public:
- receive_handler(socket_type socket, boost::asio::io_service& io_service,
- const MutableBufferSequence& buffers, socket_base::message_flags flags,
- Handler handler)
- : socket_(socket),
+ receive_operation(socket_type socket, int protocol_type,
+ boost::asio::io_service& io_service,
+ const MutableBufferSequence& buffers,
+ socket_base::message_flags flags, Handler handler)
+ : handler_base_from_member<Handler>(handler),
+ socket_(socket),
+ protocol_type_(protocol_type),
         io_service_(io_service),
         work_(io_service),
         buffers_(buffers),
- flags_(flags),
- handler_(handler)
+ flags_(flags)
     {
     }
 
- bool operator()(const boost::system::error_code& result)
+ bool perform(boost::system::error_code& ec,
+ std::size_t& bytes_transferred)
     {
       // Check whether the operation was successful.
- if (result)
+ if (ec)
       {
- io_service_.post(bind_handler(handler_, result, 0));
+ bytes_transferred = 0;
         return true;
       }
 
@@ -946,9 +1081,8 @@
       }
 
       // Receive some data.
- boost::system::error_code ec;
       int bytes = socket_ops::recv(socket_, bufs, i, flags_, ec);
- if (bytes == 0)
+ if (bytes == 0 && protocol_type_ == SOCK_STREAM)
         ec = boost::asio::error::eof;
 
       // Check if we need to run the operation again.
@@ -956,17 +1090,23 @@
           || ec == boost::asio::error::try_again)
         return false;
 
- io_service_.post(bind_handler(handler_, ec, bytes < 0 ? 0 : bytes));
+ bytes_transferred = (bytes < 0 ? 0 : bytes);
       return true;
     }
 
+ void complete(const boost::system::error_code& ec,
+ std::size_t bytes_transferred)
+ {
+ io_service_.post(bind_handler(this->handler_, ec, bytes_transferred));
+ }
+
   private:
     socket_type socket_;
+ int protocol_type_;
     boost::asio::io_service& io_service_;
     boost::asio::io_service::work work_;
     MutableBufferSequence buffers_;
     socket_base::message_flags flags_;
- Handler handler_;
   };
 
   // Start an asynchronous receive. The buffer for the data being received
@@ -1020,19 +1160,44 @@
 
       if (flags & socket_base::message_out_of_band)
       {
- reactor_.start_except_op(impl.socket_,
- receive_handler<MutableBufferSequence, Handler>(
- impl.socket_, this->get_io_service(), buffers, flags, handler));
+ reactor_.start_except_op(impl.socket_, impl.reactor_data_,
+ receive_operation<MutableBufferSequence, Handler>(
+ impl.socket_, impl.protocol_.type(),
+ this->get_io_service(), buffers, flags, handler));
       }
       else
       {
- reactor_.start_read_op(impl.socket_,
- receive_handler<MutableBufferSequence, Handler>(
- impl.socket_, this->get_io_service(), buffers, flags, handler));
+ reactor_.start_read_op(impl.socket_, impl.reactor_data_,
+ receive_operation<MutableBufferSequence, Handler>(
+ impl.socket_, impl.protocol_.type(),
+ this->get_io_service(), buffers, flags, handler));
       }
     }
   }
 
+ // Wait until data can be received without blocking.
+ template <typename Handler>
+ void async_receive(implementation_type& impl, const null_buffers&,
+ socket_base::message_flags flags, Handler handler)
+ {
+ if (!is_open(impl))
+ {
+ this->get_io_service().post(bind_handler(handler,
+ boost::asio::error::bad_descriptor, 0));
+ }
+ else if (flags & socket_base::message_out_of_band)
+ {
+ reactor_.start_except_op(impl.socket_, impl.reactor_data_,
+ null_buffers_operation<Handler>(this->get_io_service(), handler));
+ }
+ else
+ {
+ reactor_.start_read_op(impl.socket_, impl.reactor_data_,
+ null_buffers_operation<Handler>(this->get_io_service(), handler),
+ false);
+ }
+ }
+
   // Receive a datagram with the endpoint of the sender. Returns the number of
   // bytes received.
   template <typename MutableBufferSequence>
@@ -1088,7 +1253,7 @@
       }
 
       // Check for EOF.
- if (bytes_recvd == 0)
+ if (bytes_recvd == 0 && impl.protocol_.type() == SOCK_STREAM)
       {
         ec = boost::asio::error::eof;
         return 0;
@@ -1106,30 +1271,53 @@
     }
   }
 
+ // Wait until data can be received without blocking.
+ size_t receive_from(implementation_type& impl, const null_buffers&,
+ endpoint_type& sender_endpoint, socket_base::message_flags,
+ boost::system::error_code& ec)
+ {
+ if (!is_open(impl))
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // Wait for socket to become ready.
+ socket_ops::poll_read(impl.socket_, ec);
+
+ // Reset endpoint since it can be given no sensible value at this time.
+ sender_endpoint = endpoint_type();
+
+ return 0;
+ }
+
   template <typename MutableBufferSequence, typename Handler>
- class receive_from_handler
+ class receive_from_operation :
+ public handler_base_from_member<Handler>
   {
   public:
- receive_from_handler(socket_type socket,
+ receive_from_operation(socket_type socket, int protocol_type,
         boost::asio::io_service& io_service,
         const MutableBufferSequence& buffers, endpoint_type& endpoint,
         socket_base::message_flags flags, Handler handler)
- : socket_(socket),
+ : handler_base_from_member<Handler>(handler),
+ socket_(socket),
+ protocol_type_(protocol_type),
         io_service_(io_service),
         work_(io_service),
         buffers_(buffers),
         sender_endpoint_(endpoint),
- flags_(flags),
- handler_(handler)
+ flags_(flags)
     {
     }
 
- bool operator()(const boost::system::error_code& result)
+ bool perform(boost::system::error_code& ec,
+ std::size_t& bytes_transferred)
     {
       // Check whether the operation was successful.
- if (result)
+ if (ec)
       {
- io_service_.post(bind_handler(handler_, result, 0));
+ bytes_transferred = 0;
         return true;
       }
 
@@ -1148,10 +1336,9 @@
 
       // Receive some data.
       std::size_t addr_len = sender_endpoint_.capacity();
- boost::system::error_code ec;
       int bytes = socket_ops::recvfrom(socket_, bufs, i, flags_,
           sender_endpoint_.data(), &addr_len, ec);
- if (bytes == 0)
+ if (bytes == 0 && protocol_type_ == SOCK_STREAM)
         ec = boost::asio::error::eof;
 
       // Check if we need to run the operation again.
@@ -1160,18 +1347,24 @@
         return false;
 
       sender_endpoint_.resize(addr_len);
- io_service_.post(bind_handler(handler_, ec, bytes < 0 ? 0 : bytes));
+ bytes_transferred = (bytes < 0 ? 0 : bytes);
       return true;
     }
 
+ void complete(const boost::system::error_code& ec,
+ std::size_t bytes_transferred)
+ {
+ io_service_.post(bind_handler(this->handler_, ec, bytes_transferred));
+ }
+
   private:
     socket_type socket_;
+ int protocol_type_;
     boost::asio::io_service& io_service_;
     boost::asio::io_service::work work_;
     MutableBufferSequence buffers_;
     endpoint_type& sender_endpoint_;
     socket_base::message_flags flags_;
- Handler handler_;
   };
 
   // Start an asynchronous receive. The buffer for the data being received and
@@ -1202,10 +1395,40 @@
         impl.flags_ |= implementation_type::internal_non_blocking;
       }
 
- reactor_.start_read_op(impl.socket_,
- receive_from_handler<MutableBufferSequence, Handler>(
- impl.socket_, this->get_io_service(), buffers,
- sender_endpoint, flags, handler));
+ reactor_.start_read_op(impl.socket_, impl.reactor_data_,
+ receive_from_operation<MutableBufferSequence, Handler>(
+ impl.socket_, impl.protocol_.type(), this->get_io_service(),
+ buffers, sender_endpoint, flags, handler));
+ }
+ }
+
+ // Wait until data can be received without blocking.
+ template <typename Handler>
+ void async_receive_from(implementation_type& impl,
+ const null_buffers&, endpoint_type& sender_endpoint,
+ socket_base::message_flags flags, Handler handler)
+ {
+ if (!is_open(impl))
+ {
+ this->get_io_service().post(bind_handler(handler,
+ boost::asio::error::bad_descriptor, 0));
+ }
+ else
+ {
+ // Reset endpoint since it can be given no sensible value at this time.
+ sender_endpoint = endpoint_type();
+
+ if (flags & socket_base::message_out_of_band)
+ {
+ reactor_.start_except_op(impl.socket_, impl.reactor_data_,
+ null_buffers_operation<Handler>(this->get_io_service(), handler));
+ }
+ else
+ {
+ reactor_.start_read_op(impl.socket_, impl.reactor_data_,
+ null_buffers_operation<Handler>(this->get_io_service(), handler),
+ false);
+ }
     }
   }
 
@@ -1300,35 +1523,32 @@
   }
 
   template <typename Socket, typename Handler>
- class accept_handler
+ class accept_operation :
+ public handler_base_from_member<Handler>
   {
   public:
- accept_handler(socket_type socket, boost::asio::io_service& io_service,
+ accept_operation(socket_type socket, boost::asio::io_service& io_service,
         Socket& peer, const protocol_type& protocol,
         endpoint_type* peer_endpoint, bool enable_connection_aborted,
         Handler handler)
- : socket_(socket),
+ : handler_base_from_member<Handler>(handler),
+ socket_(socket),
         io_service_(io_service),
         work_(io_service),
         peer_(peer),
         protocol_(protocol),
         peer_endpoint_(peer_endpoint),
- enable_connection_aborted_(enable_connection_aborted),
- handler_(handler)
+ enable_connection_aborted_(enable_connection_aborted)
     {
     }
 
- bool operator()(const boost::system::error_code& result)
+ bool perform(boost::system::error_code& ec, std::size_t&)
     {
       // Check whether the operation was successful.
- if (result)
- {
- io_service_.post(bind_handler(handler_, result));
+ if (ec)
         return true;
- }
 
       // Accept the waiting connection.
- boost::system::error_code ec;
       socket_holder new_socket;
       std::size_t addr_len = 0;
       if (peer_endpoint_)
@@ -1364,10 +1584,14 @@
           new_socket.release();
       }
 
- io_service_.post(bind_handler(handler_, ec));
       return true;
     }
 
+ void complete(const boost::system::error_code& ec, std::size_t)
+ {
+ io_service_.post(bind_handler(this->handler_, ec));
+ }
+
   private:
     socket_type socket_;
     boost::asio::io_service& io_service_;
@@ -1376,7 +1600,6 @@
     protocol_type protocol_;
     endpoint_type* peer_endpoint_;
     bool enable_connection_aborted_;
- Handler handler_;
   };
 
   // Start an asynchronous accept. The peer and peer_endpoint objects
@@ -1410,8 +1633,8 @@
         impl.flags_ |= implementation_type::internal_non_blocking;
       }
 
- reactor_.start_read_op(impl.socket_,
- accept_handler<Socket, Handler>(
+ reactor_.start_read_op(impl.socket_, impl.reactor_data_,
+ accept_operation<Socket, Handler>(
             impl.socket_, this->get_io_service(),
             peer, impl.protocol_, peer_endpoint,
             (impl.flags_ & implementation_type::enable_connection_aborted) != 0,
@@ -1445,70 +1668,52 @@
   }
 
   template <typename Handler>
- class connect_handler
+ class connect_operation :
+ public handler_base_from_member<Handler>
   {
   public:
- connect_handler(socket_type socket, boost::shared_ptr<bool> completed,
- boost::asio::io_service& io_service, Reactor& reactor, Handler handler)
- : socket_(socket),
- completed_(completed),
+ connect_operation(socket_type socket,
+ boost::asio::io_service& io_service, Handler handler)
+ : handler_base_from_member<Handler>(handler),
+ socket_(socket),
         io_service_(io_service),
- work_(io_service),
- reactor_(reactor),
- handler_(handler)
+ work_(io_service)
     {
     }
 
- bool operator()(const boost::system::error_code& result)
+ bool perform(boost::system::error_code& ec, std::size_t&)
     {
- // Check whether a handler has already been called for the connection.
- // If it has, then we don't want to do anything in this handler.
- if (*completed_)
- return true;
-
- // Cancel the other reactor operation for the connection.
- *completed_ = true;
- reactor_.enqueue_cancel_ops_unlocked(socket_);
-
       // Check whether the operation was successful.
- if (result)
- {
- io_service_.post(bind_handler(handler_, result));
+ if (ec)
         return true;
- }
 
       // Get the error code from the connect operation.
       int connect_error = 0;
       size_t connect_error_len = sizeof(connect_error);
- boost::system::error_code ec;
       if (socket_ops::getsockopt(socket_, SOL_SOCKET, SO_ERROR,
             &connect_error, &connect_error_len, ec) == socket_error_retval)
- {
- io_service_.post(bind_handler(handler_, ec));
         return true;
- }
 
- // If connection failed then post the handler with the error code.
+ // The connection failed so the handler will be posted with an error code.
       if (connect_error)
       {
         ec = boost::system::error_code(connect_error,
             boost::asio::error::get_system_category());
- io_service_.post(bind_handler(handler_, ec));
         return true;
       }
 
- // Post the result of the successful connection operation.
- io_service_.post(bind_handler(handler_, ec));
       return true;
     }
 
+ void complete(const boost::system::error_code& ec, std::size_t)
+ {
+ io_service_.post(bind_handler(this->handler_, ec));
+ }
+
   private:
     socket_type socket_;
- boost::shared_ptr<bool> completed_;
     boost::asio::io_service& io_service_;
     boost::asio::io_service::work work_;
- Reactor& reactor_;
- Handler handler_;
   };
 
   // Start an asynchronous connect.
@@ -1552,10 +1757,9 @@
     {
       // The connection is happening in the background, and we need to wait
       // until the socket becomes writeable.
- boost::shared_ptr<bool> completed(new bool(false));
- reactor_.start_write_and_except_ops(impl.socket_,
- connect_handler<Handler>(impl.socket_, completed,
- this->get_io_service(), reactor_, handler));
+ reactor_.start_connect_op(impl.socket_, impl.reactor_data_,
+ connect_operation<Handler>(impl.socket_,
+ this->get_io_service(), handler));
     }
     else
     {

Modified: branches/release/boost/asio/detail/reactor_op_queue.hpp
==============================================================================
--- branches/release/boost/asio/detail/reactor_op_queue.hpp (original)
+++ branches/release/boost/asio/detail/reactor_op_queue.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -22,6 +22,7 @@
 #include <boost/asio/detail/pop_options.hpp>
 
 #include <boost/asio/error.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
 #include <boost/asio/detail/hash_map.hpp>
 #include <boost/asio/detail/noncopyable.hpp>
 
@@ -38,36 +39,42 @@
   reactor_op_queue()
     : operations_(),
       cancelled_operations_(0),
- cleanup_operations_(0)
+ complete_operations_(0)
   {
   }
 
   // Add a new operation to the queue. Returns true if this is the only
   // operation for the given descriptor, in which case the reactor's event
   // demultiplexing function call may need to be interrupted and restarted.
- template <typename Handler>
- bool enqueue_operation(Descriptor descriptor, Handler handler)
+ template <typename Operation>
+ bool enqueue_operation(Descriptor descriptor, Operation operation)
   {
- op_base* new_op = new op<Handler>(descriptor, handler);
+ // Allocate and construct an object to wrap the handler.
+ typedef handler_alloc_traits<Operation, op<Operation> > alloc_traits;
+ raw_handler_ptr<alloc_traits> raw_ptr(operation);
+ handler_ptr<alloc_traits> ptr(raw_ptr, descriptor, operation);
 
     typedef typename operation_map::iterator iterator;
     typedef typename operation_map::value_type value_type;
     std::pair<iterator, bool> entry =
- operations_.insert(value_type(descriptor, new_op));
+ operations_.insert(value_type(descriptor, ptr.get()));
     if (entry.second)
+ {
+ ptr.release();
       return true;
+ }
 
     op_base* current_op = entry.first->second;
     while (current_op->next_)
       current_op = current_op->next_;
- current_op->next_ = new_op;
+ current_op->next_ = ptr.release();
 
     return false;
   }
 
   // Cancel all operations associated with the descriptor. Any operations
   // pending for the descriptor will be notified that they have been cancelled
- // next time dispatch_cancellations is called. Returns true if any operations
+ // next time perform_cancellations is called. Returns true if any operations
   // were cancelled, in which case the reactor's event demultiplexing function
   // may need to be interrupted and restarted.
   bool cancel_operations(Descriptor descriptor)
@@ -99,9 +106,9 @@
     return operations_.find(descriptor) != operations_.end();
   }
 
- // Dispatch the first operation corresponding to the descriptor. Returns true
+ // Perform the first operation corresponding to the descriptor. Returns true
   // if there are more operations queued for the descriptor.
- bool dispatch_operation(Descriptor descriptor,
+ bool perform_operation(Descriptor descriptor,
       const boost::system::error_code& result)
   {
     typename operation_map::iterator i = operations_.find(descriptor);
@@ -109,9 +116,9 @@
     {
       op_base* this_op = i->second;
       i->second = this_op->next_;
- this_op->next_ = cleanup_operations_;
- cleanup_operations_ = this_op;
- bool done = this_op->invoke(result);
+ this_op->next_ = complete_operations_;
+ complete_operations_ = this_op;
+ bool done = this_op->perform(result);
       if (done)
       {
         // Operation has finished.
@@ -128,8 +135,8 @@
       else
       {
         // Operation wants to be called again. Leave it at the front of the
- // queue for this descriptor, and remove from the cleanup list.
- cleanup_operations_ = this_op->next_;
+ // queue for this descriptor, and remove from the completed list.
+ complete_operations_ = this_op->next_;
         this_op->next_ = i->second;
         i->second = this_op;
         return true;
@@ -138,8 +145,8 @@
     return false;
   }
 
- // Dispatch all operations corresponding to the descriptor.
- void dispatch_all_operations(Descriptor descriptor,
+ // Perform all operations corresponding to the descriptor.
+ void perform_all_operations(Descriptor descriptor,
       const boost::system::error_code& result)
   {
     typename operation_map::iterator i = operations_.find(descriptor);
@@ -149,14 +156,14 @@
       {
         op_base* this_op = i->second;
         i->second = this_op->next_;
- this_op->next_ = cleanup_operations_;
- cleanup_operations_ = this_op;
- bool done = this_op->invoke(result);
+ this_op->next_ = complete_operations_;
+ complete_operations_ = this_op;
+ bool done = this_op->perform(result);
         if (!done)
         {
           // Operation has not finished yet, so leave at front of queue, and
- // remove from the cleanup list.
- cleanup_operations_ = this_op->next_;
+ // remove from the completed list.
+ complete_operations_ = this_op->next_;
           this_op->next_ = i->second;
           i->second = this_op;
           return;
@@ -179,15 +186,15 @@
       if (!descriptors.set(descriptor))
       {
         boost::system::error_code ec(error::fd_set_failure);
- dispatch_all_operations(descriptor, ec);
+ perform_all_operations(descriptor, ec);
       }
     }
   }
 
- // Dispatch the operations corresponding to the ready file descriptors
+ // Perform the operations corresponding to the ready file descriptors
   // contained in the given descriptor set.
   template <typename Descriptor_Set>
- void dispatch_descriptors(const Descriptor_Set& descriptors,
+ void perform_operations_for_descriptors(const Descriptor_Set& descriptors,
       const boost::system::error_code& result)
   {
     typename operation_map::iterator i = operations_.begin();
@@ -198,9 +205,9 @@
       {
         op_base* this_op = op_iter->second;
         op_iter->second = this_op->next_;
- this_op->next_ = cleanup_operations_;
- cleanup_operations_ = this_op;
- bool done = this_op->invoke(result);
+ this_op->next_ = complete_operations_;
+ complete_operations_ = this_op;
+ bool done = this_op->perform(result);
         if (done)
         {
           if (!op_iter->second)
@@ -209,8 +216,8 @@
         else
         {
           // Operation has not finished yet, so leave at front of queue, and
- // remove from the cleanup list.
- cleanup_operations_ = this_op->next_;
+ // remove from the completed list.
+ complete_operations_ = this_op->next_;
           this_op->next_ = op_iter->second;
           op_iter->second = this_op;
         }
@@ -218,28 +225,28 @@
     }
   }
 
- // Dispatch any pending cancels for operations.
- void dispatch_cancellations()
+ // Perform any pending cancels for operations.
+ void perform_cancellations()
   {
     while (cancelled_operations_)
     {
       op_base* this_op = cancelled_operations_;
       cancelled_operations_ = this_op->next_;
- this_op->next_ = cleanup_operations_;
- cleanup_operations_ = this_op;
- this_op->invoke(boost::asio::error::operation_aborted);
+ this_op->next_ = complete_operations_;
+ complete_operations_ = this_op;
+ this_op->perform(boost::asio::error::operation_aborted);
     }
   }
 
- // Destroy operations that are waiting to be cleaned up.
- void cleanup_operations()
+ // Complete all operations that are waiting to be completed.
+ void complete_operations()
   {
- while (cleanup_operations_)
+ while (complete_operations_)
     {
- op_base* next_op = cleanup_operations_->next_;
- cleanup_operations_->next_ = 0;
- cleanup_operations_->destroy();
- cleanup_operations_ = next_op;
+ op_base* next_op = complete_operations_->next_;
+ complete_operations_->next_ = 0;
+ complete_operations_->complete();
+ complete_operations_ = next_op;
     }
   }
 
@@ -254,12 +261,12 @@
       cancelled_operations_ = next_op;
     }
 
- while (cleanup_operations_)
+ while (complete_operations_)
     {
- op_base* next_op = cleanup_operations_->next_;
- cleanup_operations_->next_ = 0;
- cleanup_operations_->destroy();
- cleanup_operations_ = next_op;
+ op_base* next_op = complete_operations_->next_;
+ complete_operations_->next_ = 0;
+ complete_operations_->destroy();
+ complete_operations_ = next_op;
     }
 
     typename operation_map::iterator i = operations_.begin();
@@ -291,28 +298,40 @@
     }
 
     // Perform the operation.
- bool invoke(const boost::system::error_code& result)
+ bool perform(const boost::system::error_code& result)
+ {
+ result_ = result;
+ return perform_func_(this, result_, bytes_transferred_);
+ }
+
+ // Destroy the operation and post the handler.
+ void complete()
     {
- return invoke_func_(this, result);
+ complete_func_(this, result_, bytes_transferred_);
     }
 
     // Destroy the operation.
     void destroy()
     {
- return destroy_func_(this);
+ destroy_func_(this);
     }
 
   protected:
- typedef bool (*invoke_func_type)(op_base*,
- const boost::system::error_code&);
+ typedef bool (*perform_func_type)(op_base*,
+ boost::system::error_code&, std::size_t&);
+ typedef void (*complete_func_type)(op_base*,
+ const boost::system::error_code&, std::size_t);
     typedef void (*destroy_func_type)(op_base*);
 
     // Construct an operation for the given descriptor.
- op_base(invoke_func_type invoke_func,
+ op_base(perform_func_type perform_func, complete_func_type complete_func,
         destroy_func_type destroy_func, Descriptor descriptor)
- : invoke_func_(invoke_func),
+ : perform_func_(perform_func),
+ complete_func_(complete_func),
         destroy_func_(destroy_func),
         descriptor_(descriptor),
+ result_(),
+ bytes_transferred_(0),
         next_(0)
     {
     }
@@ -325,48 +344,94 @@
   private:
     friend class reactor_op_queue<Descriptor>;
 
- // The function to be called to dispatch the handler.
- invoke_func_type invoke_func_;
+ // The function to be called to perform the operation.
+ perform_func_type perform_func_;
 
- // The function to be called to delete the handler.
+ // The function to be called to delete the operation and post the handler.
+ complete_func_type complete_func_;
+
+ // The function to be called to delete the operation.
     destroy_func_type destroy_func_;
 
     // The descriptor associated with the operation.
     Descriptor descriptor_;
 
+ // The result of the operation.
+ boost::system::error_code result_;
+
+ // The number of bytes transferred in the operation.
+ std::size_t bytes_transferred_;
+
     // The next operation for the same file descriptor.
     op_base* next_;
   };
 
- // Adaptor class template for using handlers in operations.
- template <typename Handler>
+ // Adaptor class template for operations.
+ template <typename Operation>
   class op
     : public op_base
   {
   public:
     // Constructor.
- op(Descriptor descriptor, Handler handler)
- : op_base(&op<Handler>::invoke_handler,
- &op<Handler>::destroy_handler, descriptor),
- handler_(handler)
+ op(Descriptor descriptor, Operation operation)
+ : op_base(&op<Operation>::do_perform, &op<Operation>::do_complete,
+ &op<Operation>::do_destroy, descriptor),
+ operation_(operation)
     {
     }
 
- // Invoke the handler.
- static bool invoke_handler(op_base* base,
- const boost::system::error_code& result)
+ // Perform the operation.
+ static bool do_perform(op_base* base,
+ boost::system::error_code& result, std::size_t& bytes_transferred)
     {
- return static_cast<op<Handler>*>(base)->handler_(result);
+ return static_cast<op<Operation>*>(base)->operation_.perform(
+ result, bytes_transferred);
     }
 
- // Delete the handler.
- static void destroy_handler(op_base* base)
+ // Destroy the operation and post the handler.
+ static void do_complete(op_base* base,
+ const boost::system::error_code& result, std::size_t bytes_transferred)
     {
- delete static_cast<op<Handler>*>(base);
+ // Take ownership of the operation object.
+ typedef op<Operation> this_type;
+ this_type* this_op(static_cast<this_type*>(base));
+ typedef handler_alloc_traits<Operation, this_type> alloc_traits;
+ handler_ptr<alloc_traits> ptr(this_op->operation_, this_op);
+
+ // Make a copy of the error_code and the operation so that the memory can
+ // be deallocated before the upcall is made.
+ boost::system::error_code ec(result);
+ Operation operation(this_op->operation_);
+
+ // Free the memory associated with the operation.
+ ptr.reset();
+
+ // Make the upcall.
+ operation.complete(ec, bytes_transferred);
+ }
+
+ // Destroy the operation.
+ static void do_destroy(op_base* base)
+ {
+ // Take ownership of the operation object.
+ typedef op<Operation> this_type;
+ this_type* this_op(static_cast<this_type*>(base));
+ typedef handler_alloc_traits<Operation, this_type> alloc_traits;
+ handler_ptr<alloc_traits> ptr(this_op->operation_, this_op);
+
+ // A sub-object of the operation may be the true owner of the memory
+ // associated with the operation. Consequently, a local copy of the
+ // operation is required to ensure that any owning sub-object remains
+ // valid until after we have deallocated the memory here.
+ Operation operation(this_op->operation_);
+ (void)operation;
+
+ // Free the memory associated with the operation.
+ ptr.reset();
     }
 
   private:
- Handler handler_;
+ Operation operation_;
   };
 
   // The type for a map of operations.
@@ -378,8 +443,8 @@
   // The list of operations that have been cancelled.
   op_base* cancelled_operations_;
 
- // The list of operations to be destroyed.
- op_base* cleanup_operations_;
+ // The list of operations waiting to be completed.
+ op_base* complete_operations_;
 };
 
 } // namespace detail

Modified: branches/release/boost/asio/detail/select_reactor.hpp
==============================================================================
--- branches/release/boost/asio/detail/select_reactor.hpp (original)
+++ branches/release/boost/asio/detail/select_reactor.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -23,6 +23,7 @@
 #include <cstddef>
 #include <boost/config.hpp>
 #include <boost/date_time/posix_time/posix_time_types.hpp>
+#include <boost/shared_ptr.hpp>
 #include <vector>
 #include <boost/asio/detail/pop_options.hpp>
 
@@ -51,6 +52,11 @@
   : public boost::asio::detail::service_base<select_reactor<Own_Thread> >
 {
 public:
+ // Per-descriptor data.
+ struct per_descriptor_data
+ {
+ };
+
   // Constructor.
   select_reactor(boost::asio::io_service& io_service)
     : boost::asio::detail::service_base<
@@ -107,7 +113,7 @@
 
   // Register a socket with the reactor. Returns 0 on success, system error
   // code on failure.
- int register_descriptor(socket_type descriptor)
+ int register_descriptor(socket_type, per_descriptor_data&)
   {
     return 0;
   }
@@ -115,7 +121,8 @@
   // Start a new read operation. The handler object will be invoked when the
   // given descriptor is ready to be read, or an error has occurred.
   template <typename Handler>
- void start_read_op(socket_type descriptor, Handler handler)
+ void start_read_op(socket_type descriptor, per_descriptor_data&,
+ Handler handler, bool /*allow_speculative_read*/ = true)
   {
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
     if (!shutdown_)
@@ -126,7 +133,8 @@
   // Start a new write operation. The handler object will be invoked when the
   // given descriptor is ready to be written, or an error has occurred.
   template <typename Handler>
- void start_write_op(socket_type descriptor, Handler handler)
+ void start_write_op(socket_type descriptor, per_descriptor_data&,
+ Handler handler, bool /*allow_speculative_write*/ = true)
   {
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
     if (!shutdown_)
@@ -137,7 +145,8 @@
   // Start a new exception operation. The handler object will be invoked when
   // the given descriptor has exception information, or an error has occurred.
   template <typename Handler>
- void start_except_op(socket_type descriptor, Handler handler)
+ void start_except_op(socket_type descriptor,
+ per_descriptor_data&, Handler handler)
   {
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
     if (!shutdown_)
@@ -145,18 +154,74 @@
         interrupter_.interrupt();
   }
 
+ // Wrapper for connect handlers to enable the handler object to be placed
+ // in both the write and the except operation queues, but ensure that only
+ // one of the handlers is called.
+ template <typename Handler>
+ class connect_handler_wrapper
+ {
+ public:
+ connect_handler_wrapper(socket_type descriptor,
+ boost::shared_ptr<bool> completed,
+ select_reactor<Own_Thread>& reactor, Handler handler)
+ : descriptor_(descriptor),
+ completed_(completed),
+ reactor_(reactor),
+ handler_(handler)
+ {
+ }
+
+ bool perform(boost::system::error_code& ec,
+ std::size_t& bytes_transferred)
+ {
+ // Check whether one of the handlers has already been called. If it has,
+ // then we don't want to do anything in this handler.
+ if (*completed_)
+ {
+ completed_.reset(); // Indicate that this handler should not complete.
+ return true;
+ }
+
+ // Cancel the other reactor operation for the connection.
+ *completed_ = true;
+ reactor_.enqueue_cancel_ops_unlocked(descriptor_);
+
+ // Call the contained handler.
+ return handler_.perform(ec, bytes_transferred);
+ }
+
+ void complete(const boost::system::error_code& ec,
+ std::size_t bytes_transferred)
+ {
+ if (completed_.get())
+ handler_.complete(ec, bytes_transferred);
+ }
+
+ private:
+ socket_type descriptor_;
+ boost::shared_ptr<bool> completed_;
+ select_reactor<Own_Thread>& reactor_;
+ Handler handler_;
+ };
+
   // Start new write and exception operations. The handler object will be
   // invoked when the given descriptor is ready for writing or has exception
- // information available, or an error has occurred.
+ // information available, or an error has occurred. The handler will be called
+ // only once.
   template <typename Handler>
- void start_write_and_except_ops(socket_type descriptor, Handler handler)
+ void start_connect_op(socket_type descriptor,
+ per_descriptor_data&, Handler handler)
   {
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
     if (!shutdown_)
     {
- bool interrupt = write_op_queue_.enqueue_operation(descriptor, handler);
- interrupt = except_op_queue_.enqueue_operation(descriptor, handler)
- || interrupt;
+ boost::shared_ptr<bool> completed(new bool(false));
+ connect_handler_wrapper<Handler> wrapped_handler(
+ descriptor, completed, *this, handler);
+ bool interrupt = write_op_queue_.enqueue_operation(
+ descriptor, wrapped_handler);
+ interrupt = except_op_queue_.enqueue_operation(
+ descriptor, wrapped_handler) || interrupt;
       if (interrupt)
         interrupter_.interrupt();
     }
@@ -165,7 +230,7 @@
   // Cancel all operations associated with the given descriptor. The
   // handlers associated with the descriptor will be invoked with the
   // operation_aborted error.
- void cancel_ops(socket_type descriptor)
+ void cancel_ops(socket_type descriptor, per_descriptor_data&)
   {
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
     cancel_ops_unlocked(descriptor);
@@ -174,8 +239,8 @@
   // Enqueue cancellation of all operations associated with the given
   // descriptor. The handlers associated with the descriptor will be invoked
   // with the operation_aborted error. This function does not acquire the
- // select_reactor's mutex, and so should only be used from within a reactor
- // handler.
+ // select_reactor's mutex, and so should only be used when the reactor lock is
+ // already held.
   void enqueue_cancel_ops_unlocked(socket_type descriptor)
   {
     pending_cancellations_.push_back(descriptor);
@@ -183,7 +248,7 @@
 
   // Cancel any operations that are running against the descriptor and remove
   // its registration from the reactor.
- void close_descriptor(socket_type descriptor)
+ void close_descriptor(socket_type descriptor, per_descriptor_data&)
   {
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
     cancel_ops_unlocked(descriptor);
@@ -246,16 +311,16 @@
 
     // Dispatch any operation cancellations that were made while the select
     // loop was not running.
- read_op_queue_.dispatch_cancellations();
- write_op_queue_.dispatch_cancellations();
- except_op_queue_.dispatch_cancellations();
+ read_op_queue_.perform_cancellations();
+ write_op_queue_.perform_cancellations();
+ except_op_queue_.perform_cancellations();
     for (std::size_t i = 0; i < timer_queues_.size(); ++i)
       timer_queues_[i]->dispatch_cancellations();
 
     // Check if the thread is supposed to stop.
     if (stop_thread_)
     {
- cleanup_operations_and_timers(lock);
+ complete_operations_and_timers(lock);
       return;
     }
 
@@ -264,7 +329,7 @@
     if (!block && read_op_queue_.empty() && write_op_queue_.empty()
         && except_op_queue_.empty() && all_timer_queues_are_empty())
     {
- cleanup_operations_and_timers(lock);
+ complete_operations_and_timers(lock);
       return;
     }
 
@@ -306,15 +371,15 @@
     {
       // Exception operations must be processed first to ensure that any
       // out-of-band data is read before normal data.
- except_op_queue_.dispatch_descriptors(except_fds,
- boost::system::error_code());
- read_op_queue_.dispatch_descriptors(read_fds,
- boost::system::error_code());
- write_op_queue_.dispatch_descriptors(write_fds,
- boost::system::error_code());
- except_op_queue_.dispatch_cancellations();
- read_op_queue_.dispatch_cancellations();
- write_op_queue_.dispatch_cancellations();
+ except_op_queue_.perform_operations_for_descriptors(
+ except_fds, boost::system::error_code());
+ read_op_queue_.perform_operations_for_descriptors(
+ read_fds, boost::system::error_code());
+ write_op_queue_.perform_operations_for_descriptors(
+ write_fds, boost::system::error_code());
+ except_op_queue_.perform_cancellations();
+ read_op_queue_.perform_cancellations();
+ write_op_queue_.perform_cancellations();
     }
     for (std::size_t i = 0; i < timer_queues_.size(); ++i)
     {
@@ -327,7 +392,7 @@
       cancel_ops_unlocked(pending_cancellations_[i]);
     pending_cancellations_.clear();
 
- cleanup_operations_and_timers(lock);
+ complete_operations_and_timers(lock);
   }
 
   // Run the select loop in the thread.
@@ -412,16 +477,16 @@
   // destructors may make calls back into this reactor. We make a copy of the
   // vector of timer queues since the original may be modified while the lock
   // is not held.
- void cleanup_operations_and_timers(
+ void complete_operations_and_timers(
       boost::asio::detail::mutex::scoped_lock& lock)
   {
     timer_queues_for_cleanup_ = timer_queues_;
     lock.unlock();
- read_op_queue_.cleanup_operations();
- write_op_queue_.cleanup_operations();
- except_op_queue_.cleanup_operations();
+ read_op_queue_.complete_operations();
+ write_op_queue_.complete_operations();
+ except_op_queue_.complete_operations();
     for (std::size_t i = 0; i < timer_queues_for_cleanup_.size(); ++i)
- timer_queues_for_cleanup_[i]->cleanup_timers();
+ timer_queues_for_cleanup_[i]->complete_timers();
   }
 
   // Mutex to protect access to internal data.

Modified: branches/release/boost/asio/detail/service_registry.hpp
==============================================================================
--- branches/release/boost/asio/detail/service_registry.hpp (original)
+++ branches/release/boost/asio/detail/service_registry.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -27,6 +27,12 @@
 #include <boost/asio/detail/noncopyable.hpp>
 #include <boost/asio/detail/service_id.hpp>
 
+#if defined(BOOST_NO_TYPEID)
+# if !defined(BOOST_ASIO_NO_TYPEID)
+# define BOOST_ASIO_NO_TYPEID
+# endif // !defined(BOOST_ASIO_NO_TYPEID)
+#endif // defined(BOOST_NO_TYPEID)
+
 namespace boost {
 namespace asio {
 namespace detail {
@@ -157,6 +163,7 @@
     service.id_ = &id;
   }
 
+#if !defined(BOOST_ASIO_NO_TYPEID)
   // Set a service's id.
   template <typename Service>
   void init_service_id(boost::asio::io_service::service& service,
@@ -165,6 +172,7 @@
     service.type_info_ = &typeid(Service);
     service.id_ = 0;
   }
+#endif // !defined(BOOST_ASIO_NO_TYPEID)
 
   // Check if a service matches the given id.
   static bool service_id_matches(
@@ -174,6 +182,7 @@
     return service.id_ == &id;
   }
 
+#if !defined(BOOST_ASIO_NO_TYPEID)
   // Check if a service matches the given id.
   template <typename Service>
   static bool service_id_matches(
@@ -182,6 +191,7 @@
   {
     return service.type_info_ != 0 && *service.type_info_ == typeid(Service);
   }
+#endif // !defined(BOOST_ASIO_NO_TYPEID)
 
   // Mutex to protect access to internal data.
   mutable boost::asio::detail::mutex mutex_;

Modified: branches/release/boost/asio/detail/socket_ops.hpp
==============================================================================
--- branches/release/boost/asio/detail/socket_ops.hpp (original)
+++ branches/release/boost/asio/detail/socket_ops.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -176,6 +176,22 @@
   return result;
 }
 
+inline int socketpair(int af, int type, int protocol,
+ socket_type sv[2], boost::system::error_code& ec)
+{
+#if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
+ (void)(af);
+ (void)(type);
+ (void)(protocol);
+ (void)(sv);
+ ec = boost::asio::error::operation_not_supported;
+ return -1;
+#else
+ clear_error(ec);
+ return error_wrapper(::socketpair(af, type, protocol, sv), ec);
+#endif
+}
+
 inline int listen(socket_type s, int backlog, boost::system::error_code& ec)
 {
   clear_error(ec);

Modified: branches/release/boost/asio/detail/socket_types.hpp
==============================================================================
--- branches/release/boost/asio/detail/socket_types.hpp (original)
+++ branches/release/boost/asio/detail/socket_types.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -99,6 +99,7 @@
 # endif
 # include <sys/socket.h>
 # include <sys/uio.h>
+# include <sys/un.h>
 # include <netinet/in.h>
 # include <netinet/tcp.h>
 # include <arpa/inet.h>
@@ -176,6 +177,7 @@
 typedef ipv6_mreq in6_mreq_type;
 typedef sockaddr_in6 sockaddr_in6_type;
 typedef sockaddr_storage sockaddr_storage_type;
+typedef sockaddr_un sockaddr_un_type;
 typedef addrinfo addrinfo_type;
 typedef int ioctl_arg_type;
 typedef uint32_t u_long_type;

Modified: branches/release/boost/asio/detail/strand_service.hpp
==============================================================================
--- branches/release/boost/asio/detail/strand_service.hpp (original)
+++ branches/release/boost/asio/detail/strand_service.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -20,6 +20,7 @@
 #include <boost/asio/detail/push_options.hpp>
 #include <boost/aligned_storage.hpp>
 #include <boost/assert.hpp>
+#include <boost/detail/atomic_count.hpp>
 #include <boost/intrusive_ptr.hpp>
 #include <boost/asio/detail/pop_options.hpp>
 
@@ -55,19 +56,13 @@
 #endif
     void add_ref()
     {
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
       ++ref_count_;
     }
 
     void release()
     {
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- --ref_count_;
- if (ref_count_ == 0)
- {
- lock.unlock();
+ if (--ref_count_ == 0)
         delete this;
- }
     }
 
   private:
@@ -148,7 +143,7 @@
     strand_impl* prev_;
 
     // The reference count on the strand implementation.
- size_t ref_count_;
+ boost::detail::atomic_count ref_count_;
 
 #if !defined(__BORLANDC__)
     friend void intrusive_ptr_add_ref(strand_impl* p)
@@ -346,6 +341,16 @@
       this_type* h(static_cast<this_type*>(base));
       typedef handler_alloc_traits<Handler, this_type> alloc_traits;
       handler_ptr<alloc_traits> ptr(h->handler_, h);
+
+ // A sub-object of the handler may be the true owner of the memory
+ // associated with the handler. Consequently, a local copy of the handler
+ // is required to ensure that any owning sub-object remains valid until
+ // after we have deallocated the memory here.
+ Handler handler(h->handler_);
+ (void)handler;
+
+ // Free the memory associated with the handler.
+ ptr.reset();
     }
 
   private:

Modified: branches/release/boost/asio/detail/task_io_service.hpp
==============================================================================
--- branches/release/boost/asio/detail/task_io_service.hpp (original)
+++ branches/release/boost/asio/detail/task_io_service.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -15,6 +15,10 @@
 # pragma once
 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
+#if defined(BOOST_ASIO_ENABLE_TWO_LOCK_QUEUE)
+#include <boost/asio/detail/task_io_service_2lock.hpp>
+#else // defined(BOOST_ASIO_ENABLE_TWO_LOCK_QUEUE)
+
 #include <boost/asio/detail/push_options.hpp>
 
 #include <boost/asio/io_service.hpp>
@@ -418,4 +422,6 @@
 #include <boost/system/error_code.hpp>
 #include <boost/asio/detail/pop_options.hpp>
 
+#endif // defined(BOOST_ASIO_ENABLE_TWO_LOCK_QUEUE)
+
 #endif // BOOST_ASIO_DETAIL_TASK_IO_SERVICE_HPP

Modified: branches/release/boost/asio/detail/timer_queue.hpp
==============================================================================
--- branches/release/boost/asio/detail/timer_queue.hpp (original)
+++ branches/release/boost/asio/detail/timer_queue.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -27,6 +27,7 @@
 #include <boost/asio/detail/pop_options.hpp>
 
 #include <boost/asio/error.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
 #include <boost/asio/detail/hash_map.hpp>
 #include <boost/asio/detail/noncopyable.hpp>
 #include <boost/asio/detail/timer_queue_base.hpp>
@@ -51,7 +52,7 @@
     : timers_(),
       heap_(),
       cancelled_timers_(0),
- cleanup_timers_(0)
+ complete_timers_(0)
   {
   }
 
@@ -102,6 +103,8 @@
   // Get the time for the timer that is earliest in the queue.
   virtual boost::posix_time::time_duration wait_duration() const
   {
+ if (heap_.empty())
+ return boost::posix_time::pos_infin;
     return Time_Traits::to_posix_duration(
         Time_Traits::subtract(heap_[0]->time_, Time_Traits::now()));
   }
@@ -114,10 +117,10 @@
     {
       timer_base* t = heap_[0];
       remove_timer(t);
+ t->result_ = boost::system::error_code();
       t->prev_ = 0;
- t->next_ = cleanup_timers_;
- cleanup_timers_ = t;
- t->invoke(boost::system::error_code());
+ t->next_ = complete_timers_;
+ complete_timers_ = t;
     }
   }
 
@@ -153,17 +156,23 @@
     while (cancelled_timers_)
     {
       timer_base* this_timer = cancelled_timers_;
+ this_timer->result_ = boost::asio::error::operation_aborted;
       cancelled_timers_ = this_timer->next_;
- this_timer->next_ = cleanup_timers_;
- cleanup_timers_ = this_timer;
- this_timer->invoke(boost::asio::error::operation_aborted);
+ this_timer->next_ = complete_timers_;
+ complete_timers_ = this_timer;
     }
   }
 
- // Destroy timers that are waiting to be cleaned up.
- virtual void cleanup_timers()
+ // Complete any timers that are waiting to be completed.
+ virtual void complete_timers()
   {
- destroy_timer_list(cleanup_timers_);
+ while (complete_timers_)
+ {
+ timer_base* this_timer = complete_timers_;
+ complete_timers_ = this_timer->next_;
+ this_timer->next_ = 0;
+ this_timer->complete();
+ }
   }
 
   // Destroy all timers.
@@ -181,7 +190,7 @@
     heap_.clear();
     timers_.clear();
     destroy_timer_list(cancelled_timers_);
- destroy_timer_list(cleanup_timers_);
+ destroy_timer_list(complete_timers_);
   }
 
 private:
@@ -190,27 +199,27 @@
   class timer_base
   {
   public:
- // Perform the timer operation and then destroy.
- void invoke(const boost::system::error_code& result)
+ // Delete the timer and post the handler.
+ void complete()
     {
- invoke_func_(this, result);
+ complete_func_(this, result_);
     }
 
- // Destroy the timer operation.
+ // Delete the timer.
     void destroy()
     {
       destroy_func_(this);
     }
 
   protected:
- typedef void (*invoke_func_type)(timer_base*,
+ typedef void (*complete_func_type)(timer_base*,
         const boost::system::error_code&);
     typedef void (*destroy_func_type)(timer_base*);
 
     // Constructor.
- timer_base(invoke_func_type invoke_func, destroy_func_type destroy_func,
+ timer_base(complete_func_type complete_func, destroy_func_type destroy_func,
         const time_type& time, void* token)
- : invoke_func_(invoke_func),
+ : complete_func_(complete_func),
         destroy_func_(destroy_func),
         time_(time),
         token_(token),
@@ -229,13 +238,16 @@
   private:
     friend class timer_queue<Time_Traits>;
 
- // The function to be called to dispatch the handler.
- invoke_func_type invoke_func_;
+ // The function to be called to delete the timer and post the handler.
+ complete_func_type complete_func_;
 
- // The function to be called to destroy the handler.
+ // The function to be called to delete the timer.
     destroy_func_type destroy_func_;
 
- // The time when the operation should fire.
+ // The result of the timer operation.
+ boost::system::error_code result_;
+
+ // The time when the timer should fire.
     time_type time_;
 
     // The token associated with the timer.
@@ -259,23 +271,52 @@
   public:
     // Constructor.
     timer(const time_type& time, Handler handler, void* token)
- : timer_base(&timer<Handler>::invoke_handler,
+ : timer_base(&timer<Handler>::complete_handler,
           &timer<Handler>::destroy_handler, time, token),
         handler_(handler)
     {
     }
 
- // Invoke the handler and then destroy it.
- static void invoke_handler(timer_base* base,
+ // Delete the timer and post the handler.
+ static void complete_handler(timer_base* base,
         const boost::system::error_code& result)
     {
- static_cast<timer<Handler>*>(base)->handler_(result);
+ // Take ownership of the timer object.
+ typedef timer<Handler> this_type;
+ this_type* this_timer(static_cast<this_type*>(base));
+ typedef handler_alloc_traits<Handler, this_type> alloc_traits;
+ handler_ptr<alloc_traits> ptr(this_timer->handler_, this_timer);
+
+ // Make a copy of the error_code and the handler so that the memory can
+ // be deallocated before the upcall is made.
+ boost::system::error_code ec(result);
+ Handler handler(this_timer->handler_);
+
+ // Free the memory associated with the handler.
+ ptr.reset();
+
+ // Make the upcall.
+ handler(ec);
     }
 
- // Destroy the handler.
+ // Delete the timer.
     static void destroy_handler(timer_base* base)
     {
- delete static_cast<timer<Handler>*>(base);
+ // Take ownership of the timer object.
+ typedef timer<Handler> this_type;
+ this_type* this_timer(static_cast<this_type*>(base));
+ typedef handler_alloc_traits<Handler, this_type> alloc_traits;
+ handler_ptr<alloc_traits> ptr(this_timer->handler_, this_timer);
+
+ // A sub-object of the handler may be the true owner of the memory
+ // associated with the handler. Consequently, a local copy of the handler
+ // is required to ensure that any owning sub-object remains valid until
+ // after we have deallocated the memory here.
+ Handler handler(this_timer->handler_);
+ (void)handler;
+
+ // Free the memory associated with the handler.
+ ptr.reset();
     }
 
   private:
@@ -384,8 +425,8 @@
   // The list of timers to be cancelled.
   timer_base* cancelled_timers_;
 
- // The list of timers to be destroyed.
- timer_base* cleanup_timers_;
+ // The list of timers waiting to be completed.
+ timer_base* complete_timers_;
 };
 
 } // namespace detail

Modified: branches/release/boost/asio/detail/timer_queue_base.hpp
==============================================================================
--- branches/release/boost/asio/detail/timer_queue_base.hpp (original)
+++ branches/release/boost/asio/detail/timer_queue_base.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -48,8 +48,8 @@
   // Dispatch any pending cancels for timers.
   virtual void dispatch_cancellations() = 0;
 
- // Destroy timers that are waiting to be cleaned up.
- virtual void cleanup_timers() = 0;
+ // Complete all timers that are waiting to be completed.
+ virtual void complete_timers() = 0;
 
   // Destroy all timers.
   virtual void destroy_timers() = 0;

Copied: branches/release/boost/asio/detail/win_iocp_handle_service.hpp (from r44685, /trunk/boost/asio/detail/win_iocp_handle_service.hpp)
==============================================================================
--- /trunk/boost/asio/detail/win_iocp_handle_service.hpp (original)
+++ branches/release/boost/asio/detail/win_iocp_handle_service.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -22,6 +22,10 @@
 
 #if defined(BOOST_ASIO_HAS_IOCP)
 
+#include <boost/asio/detail/push_options.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/asio/detail/pop_options.hpp>
+
 #include <boost/asio/buffer.hpp>
 #include <boost/asio/error.hpp>
 #include <boost/asio/io_service.hpp>
@@ -155,7 +159,7 @@
 
   // Destroy a handle implementation.
   boost::system::error_code close(implementation_type& impl,
- boost::system::error_code& ec)
+ boost::system::error_code& ec)
   {
     if (is_open(impl))
     {
@@ -176,7 +180,7 @@
   }
 
   // Get the native handle representation.
- native_type native(implementation_type& impl)
+ native_type native(const implementation_type& impl) const
   {
     return impl.handle_;
   }
@@ -283,11 +287,20 @@
     }
   };
 
- // Write the given data. Returns the number of bytes sent.
+ // Write the given data. Returns the number of bytes written.
   template <typename ConstBufferSequence>
   size_t write_some(implementation_type& impl,
       const ConstBufferSequence& buffers, boost::system::error_code& ec)
   {
+ return write_some_at(impl, 0, buffers, ec);
+ }
+
+ // Write the given data at the specified offset. Returns the number of bytes
+ // written.
+ template <typename ConstBufferSequence>
+ size_t write_some_at(implementation_type& impl, boost::uint64_t offset,
+ const ConstBufferSequence& buffers, boost::system::error_code& ec)
+ {
     if (!is_open(impl))
     {
       ec = boost::asio::error::bad_descriptor;
@@ -305,7 +318,7 @@
         break;
     }
 
- // A request to write 0 bytes on a stream handle is a no-op.
+ // A request to write 0 bytes on a handle is a no-op.
     if (boost::asio::buffer_size(buffer) == 0)
     {
       ec = boost::system::error_code();
@@ -319,6 +332,8 @@
     }
 
     // Write the data.
+ overlapped.Offset = offset & 0xFFFFFFFF;
+ overlapped.OffsetHigh = (offset >> 32) & 0xFFFFFFFF;
     BOOL ok = ::WriteFile(impl.handle_,
         boost::asio::buffer_cast<LPCVOID>(buffer),
         static_cast<DWORD>(boost::asio::buffer_size(buffer)), 0, &overlapped);
@@ -409,6 +424,16 @@
       op_type* handler_op(static_cast<op_type*>(op));
       typedef handler_alloc_traits<Handler, op_type> alloc_traits;
       handler_ptr<alloc_traits> ptr(handler_op->handler_, handler_op);
+
+ // A sub-object of the handler may be the true owner of the memory
+ // associated with the handler. Consequently, a local copy of the handler
+ // is required to ensure that any owning sub-object remains valid until
+ // after we have deallocated the memory here.
+ Handler handler(handler_op->handler_);
+ (void)handler;
+
+ // Free the memory associated with the handler.
+ ptr.reset();
     }
 
     boost::asio::io_service::work work_;
@@ -422,6 +447,15 @@
   void async_write_some(implementation_type& impl,
       const ConstBufferSequence& buffers, Handler handler)
   {
+ async_write_some_at(impl, 0, buffers, handler);
+ }
+
+ // Start an asynchronous write at a specified offset. The data being written
+ // must be valid for the lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler>
+ void async_write_some_at(implementation_type& impl, boost::uint64_t offset,
+ const ConstBufferSequence& buffers, Handler handler)
+ {
     if (!is_open(impl))
     {
       this->get_io_service().post(bind_handler(handler,
@@ -452,7 +486,7 @@
         break;
     }
 
- // A request to write 0 bytes on a stream handle is a no-op.
+ // A request to write 0 bytes on a handle is a no-op.
     if (boost::asio::buffer_size(buffer) == 0)
     {
       boost::asio::io_service::work work(this->get_io_service());
@@ -464,6 +498,8 @@
 
     // Write the data.
     DWORD bytes_transferred = 0;
+ ptr.get()->Offset = offset & 0xFFFFFFFF;
+ ptr.get()->OffsetHigh = (offset >> 32) & 0xFFFFFFFF;
     BOOL ok = ::WriteFile(impl.handle_,
         boost::asio::buffer_cast<LPCVOID>(buffer),
         static_cast<DWORD>(boost::asio::buffer_size(buffer)),
@@ -490,6 +526,14 @@
   size_t read_some(implementation_type& impl,
       const MutableBufferSequence& buffers, boost::system::error_code& ec)
   {
+ return read_some_at(impl, 0, buffers, ec);
+ }
+
+ // Read some data at a specified offset. Returns the number of bytes received.
+ template <typename MutableBufferSequence>
+ size_t read_some_at(implementation_type& impl, boost::uint64_t offset,
+ const MutableBufferSequence& buffers, boost::system::error_code& ec)
+ {
     if (!is_open(impl))
     {
       ec = boost::asio::error::bad_descriptor;
@@ -520,7 +564,9 @@
       return 0;
     }
 
- // Write the data.
+ // Read some data.
+ overlapped.Offset = offset & 0xFFFFFFFF;
+ overlapped.OffsetHigh = (offset >> 32) & 0xFFFFFFFF;
     BOOL ok = ::ReadFile(impl.handle_,
         boost::asio::buffer_cast<LPVOID>(buffer),
         static_cast<DWORD>(boost::asio::buffer_size(buffer)), 0, &overlapped);
@@ -635,6 +681,16 @@
         Handler, op_type> alloc_traits;
       boost::asio::detail::handler_ptr<alloc_traits> ptr(
         handler_op->handler_, handler_op);
+
+ // A sub-object of the handler may be the true owner of the memory
+ // associated with the handler. Consequently, a local copy of the handler
+ // is required to ensure that any owning sub-object remains valid until
+ // after we have deallocated the memory here.
+ Handler handler(handler_op->handler_);
+ (void)handler;
+
+ // Free the memory associated with the handler.
+ ptr.reset();
     }
 
     boost::asio::io_service::work work_;
@@ -648,6 +704,16 @@
   void async_read_some(implementation_type& impl,
       const MutableBufferSequence& buffers, Handler handler)
   {
+ async_read_some_at(impl, 0, buffers, handler);
+ }
+
+ // Start an asynchronous read at a specified offset. The buffer for the data
+ // being received must be valid for the lifetime of the asynchronous
+ // operation.
+ template <typename MutableBufferSequence, typename Handler>
+ void async_read_some_at(implementation_type& impl, boost::uint64_t offset,
+ const MutableBufferSequence& buffers, Handler handler)
+ {
     if (!is_open(impl))
     {
       this->get_io_service().post(bind_handler(handler,
@@ -690,6 +756,8 @@
 
     // Read some data.
     DWORD bytes_transferred = 0;
+ ptr.get()->Offset = offset & 0xFFFFFFFF;
+ ptr.get()->OffsetHigh = (offset >> 32) & 0xFFFFFFFF;
     BOOL ok = ::ReadFile(impl.handle_,
         boost::asio::buffer_cast<LPVOID>(buffer),
         static_cast<DWORD>(boost::asio::buffer_size(buffer)),
@@ -713,14 +781,24 @@
   // Prevent the use of the null_buffers type with this service.
   size_t write_some(implementation_type& impl,
       const null_buffers& buffers, boost::system::error_code& ec);
+ size_t write_some_at(implementation_type& impl, boost::uint64_t offset,
+ const null_buffers& buffers, boost::system::error_code& ec);
   template <typename Handler>
   void async_write_some(implementation_type& impl,
       const null_buffers& buffers, Handler handler);
+ template <typename Handler>
+ void async_write_some_at(implementation_type& impl, boost::uint64_t offset,
+ const null_buffers& buffers, Handler handler);
   size_t read_some(implementation_type& impl,
       const null_buffers& buffers, boost::system::error_code& ec);
+ size_t read_some_at(implementation_type& impl, boost::uint64_t offset,
+ const null_buffers& buffers, boost::system::error_code& ec);
   template <typename Handler>
   void async_read_some(implementation_type& impl,
       const null_buffers& buffers, Handler handler);
+ template <typename Handler>
+ void async_read_some_at(implementation_type& impl, boost::uint64_t offset,
+ const null_buffers& buffers, Handler handler);
 
   // Helper function to close a handle when the associated object is being
   // destroyed.

Modified: branches/release/boost/asio/detail/win_iocp_io_service.hpp
==============================================================================
--- branches/release/boost/asio/detail/win_iocp_io_service.hpp (original)
+++ branches/release/boost/asio/detail/win_iocp_io_service.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -150,9 +150,20 @@
   }
 
   // Register a handle with the IO completion port.
- void register_handle(HANDLE handle)
+ boost::system::error_code register_handle(
+ HANDLE handle, boost::system::error_code& ec)
   {
- ::CreateIoCompletionPort(handle, iocp_.handle, 0, 0);
+ if (::CreateIoCompletionPort(handle, iocp_.handle, 0, 0) == 0)
+ {
+ DWORD last_error = ::GetLastError();
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::get_system_category());
+ }
+ else
+ {
+ ec = boost::system::error_code();
+ }
+ return ec;
   }
 
   // Run the event loop until stopped or no more work.
@@ -425,7 +436,7 @@
           {
             timer_queues_copy_[i]->dispatch_timers();
             timer_queues_copy_[i]->dispatch_cancellations();
- timer_queues_copy_[i]->cleanup_timers();
+ timer_queues_copy_[i]->complete_timers();
           }
         }
         catch (...)
@@ -505,16 +516,18 @@
       }
       else
       {
+ // Relinquish responsibility for dispatching timers. If the io_service
+ // is not being stopped then the thread will get an opportunity to
+ // reacquire timer responsibility on the next loop iteration.
+ if (dispatching_timers)
+ {
+ ::InterlockedCompareExchange(&timer_thread_, 0, this_thread_id);
+ }
+
         // The stopped_ flag is always checked to ensure that any leftover
         // interrupts from a previous run invocation are ignored.
         if (::InterlockedExchangeAdd(&stopped_, 0) != 0)
         {
- // Relinquish responsibility for dispatching timers.
- if (dispatching_timers)
- {
- ::InterlockedCompareExchange(&timer_thread_, 0, this_thread_id);
- }
-
           // Wake up next thread that is blocked on GetQueuedCompletionStatus.
           if (!::PostQueuedCompletionStatus(iocp_.handle, 0, 0, 0))
           {
@@ -637,6 +650,16 @@
       op_type* handler_op(static_cast<op_type*>(op));
       typedef handler_alloc_traits<Handler, op_type> alloc_traits;
       handler_ptr<alloc_traits> ptr(handler_op->handler_, handler_op);
+
+ // A sub-object of the handler may be the true owner of the memory
+ // associated with the handler. Consequently, a local copy of the handler
+ // is required to ensure that any owning sub-object remains valid until
+ // after we have deallocated the memory here.
+ Handler handler(handler_op->handler_);
+ (void)handler;
+
+ // Free the memory associated with the handler.
+ ptr.reset();
     }
 
     win_iocp_io_service& io_service_;

Copied: branches/release/boost/asio/detail/win_iocp_serial_port_service.hpp (from r46272, /trunk/boost/asio/detail/win_iocp_serial_port_service.hpp)
==============================================================================
--- /trunk/boost/asio/detail/win_iocp_serial_port_service.hpp (original)
+++ branches/release/boost/asio/detail/win_iocp_serial_port_service.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -85,7 +85,7 @@
     std::string name = (device[0] == '\\') ? device : "\\\\.\\" + device;
 
     // Open a handle to the serial port.
- ::HANDLE handle = ::CreateFile(name.c_str(),
+ ::HANDLE handle = ::CreateFileA(name.c_str(),
         GENERIC_READ | GENERIC_WRITE, 0, 0,
         OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0);
     if (handle == INVALID_HANDLE_VALUE)

Modified: branches/release/boost/asio/detail/win_iocp_socket_service.hpp
==============================================================================
--- branches/release/boost/asio/detail/win_iocp_socket_service.hpp (original)
+++ branches/release/boost/asio/detail/win_iocp_socket_service.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -24,6 +24,7 @@
 #include <boost/asio/detail/push_options.hpp>
 #include <cstring>
 #include <boost/shared_ptr.hpp>
+#include <boost/type_traits/is_same.hpp>
 #include <boost/weak_ptr.hpp>
 #include <boost/asio/detail/pop_options.hpp>
 
@@ -113,6 +114,9 @@
     endpoint_type remote_endpoint_;
   };
 
+ // The type of the reactor used for connect operations.
+ typedef detail::select_reactor<true> reactor_type;
+
   // The implementation type of the socket.
   class implementation_type
   {
@@ -156,6 +160,9 @@
     // The protocol associated with the socket.
     protocol_type protocol_;
 
+ // Per-descriptor data used by the reactor.
+ reactor_type::per_descriptor_data reactor_data_;
+
 #if defined(BOOST_ASIO_ENABLE_CANCELIO)
     // The ID of the thread from which it is safe to cancel asynchronous
     // operations. 0 means no asynchronous operations have been started yet.
@@ -169,9 +176,6 @@
     implementation_type* prev_;
   };
 
- // The type of the reactor used for connect operations.
- typedef detail::select_reactor<true> reactor_type;
-
   // The maximum number of buffers to support in a single operation.
   enum { max_buffers = 64 < max_iov_len ? 64 : max_iov_len };
 
@@ -252,7 +256,8 @@
       return ec;
 
     HANDLE sock_as_handle = reinterpret_cast<HANDLE>(sock.get());
- iocp_service_.register_handle(sock_as_handle);
+ if (iocp_service_.register_handle(sock_as_handle, ec))
+ return ec;
 
     impl.socket_ = sock.release();
     impl.flags_ = 0;
@@ -273,7 +278,8 @@
       return ec;
     }
 
- iocp_service_.register_handle(native_socket.as_handle());
+ if (iocp_service_.register_handle(native_socket.as_handle(), ec))
+ return ec;
 
     impl.socket_ = native_socket;
     impl.flags_ = 0;
@@ -302,7 +308,7 @@
             interlocked_compare_exchange_pointer(
               reinterpret_cast<void**>(&reactor_), 0, 0));
       if (reactor)
- reactor->close_descriptor(impl.socket_);
+ reactor->close_descriptor(impl.socket_, impl.reactor_data_);
 
       if (socket_ops::close(impl.socket_, ec) == socket_error_retval)
         return ec;
@@ -332,6 +338,7 @@
     if (!is_open(impl))
     {
       ec = boost::asio::error::bad_descriptor;
+ return ec;
     }
     else if (FARPROC cancel_io_ex_ptr = ::GetProcAddress(
           ::GetModuleHandleA("KERNEL32"), "CancelIoEx"))
@@ -700,6 +707,22 @@
     return bytes_transferred;
   }
 
+ // Wait until data can be sent without blocking.
+ size_t send(implementation_type& impl, const null_buffers&,
+ socket_base::message_flags, boost::system::error_code& ec)
+ {
+ if (!is_open(impl))
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // Wait for socket to become ready.
+ socket_ops::poll_write(impl.socket_, ec);
+
+ return 0;
+ }
+
   template <typename ConstBufferSequence, typename Handler>
   class send_operation
     : public operation
@@ -776,6 +799,16 @@
       op_type* handler_op(static_cast<op_type*>(op));
       typedef handler_alloc_traits<Handler, op_type> alloc_traits;
       handler_ptr<alloc_traits> ptr(handler_op->handler_, handler_op);
+
+ // A sub-object of the handler may be the true owner of the memory
+ // associated with the handler. Consequently, a local copy of the handler
+ // is required to ensure that any owning sub-object remains valid until
+ // after we have deallocated the memory here.
+ Handler handler(handler_op->handler_);
+ (void)handler;
+
+ // Free the memory associated with the handler.
+ ptr.reset();
     }
 
     boost::asio::io_service::work work_;
@@ -858,6 +891,65 @@
     }
   }
 
+ template <typename Handler>
+ class null_buffers_operation
+ {
+ public:
+ null_buffers_operation(boost::asio::io_service& io_service, Handler handler)
+ : work_(io_service),
+ handler_(handler)
+ {
+ }
+
+ bool perform(boost::system::error_code&,
+ std::size_t& bytes_transferred)
+ {
+ bytes_transferred = 0;
+ return true;
+ }
+
+ void complete(const boost::system::error_code& ec,
+ std::size_t bytes_transferred)
+ {
+ work_.get_io_service().post(bind_handler(
+ handler_, ec, bytes_transferred));
+ }
+
+ private:
+ boost::asio::io_service::work work_;
+ Handler handler_;
+ };
+
+ // Start an asynchronous wait until data can be sent without blocking.
+ template <typename Handler>
+ void async_send(implementation_type& impl, const null_buffers&,
+ socket_base::message_flags, Handler handler)
+ {
+ if (!is_open(impl))
+ {
+ this->get_io_service().post(bind_handler(handler,
+ boost::asio::error::bad_descriptor, 0));
+ }
+ else
+ {
+ // Check if the reactor was already obtained from the io_service.
+ reactor_type* reactor = static_cast<reactor_type*>(
+ interlocked_compare_exchange_pointer(
+ reinterpret_cast<void**>(&reactor_), 0, 0));
+ if (!reactor)
+ {
+ reactor = &(boost::asio::use_service<reactor_type>(
+ this->get_io_service()));
+ interlocked_exchange_pointer(
+ reinterpret_cast<void**>(&reactor_), reactor);
+ }
+
+ reactor->start_write_op(impl.socket_, impl.reactor_data_,
+ null_buffers_operation<Handler>(this->get_io_service(), handler),
+ false);
+ }
+ }
+
   // Send a datagram to the specified endpoint. Returns the number of bytes
   // sent.
   template <typename ConstBufferSequence>
@@ -902,6 +994,23 @@
     return bytes_transferred;
   }
 
+ // Wait until data can be sent without blocking.
+ size_t send_to(implementation_type& impl, const null_buffers&,
+ socket_base::message_flags, const endpoint_type&,
+ boost::system::error_code& ec)
+ {
+ if (!is_open(impl))
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // Wait for socket to become ready.
+ socket_ops::poll_write(impl.socket_, ec);
+
+ return 0;
+ }
+
   template <typename ConstBufferSequence, typename Handler>
   class send_to_operation
     : public operation
@@ -969,6 +1078,16 @@
       op_type* handler_op(static_cast<op_type*>(op));
       typedef handler_alloc_traits<Handler, op_type> alloc_traits;
       handler_ptr<alloc_traits> ptr(handler_op->handler_, handler_op);
+
+ // A sub-object of the handler may be the true owner of the memory
+ // associated with the handler. Consequently, a local copy of the handler
+ // is required to ensure that any owning sub-object remains valid until
+ // after we have deallocated the memory here.
+ Handler handler(handler_op->handler_);
+ (void)handler;
+
+ // Free the memory associated with the handler.
+ ptr.reset();
     }
 
     boost::asio::io_service::work work_;
@@ -1038,6 +1157,36 @@
     }
   }
 
+ // Start an asynchronous wait until data can be sent without blocking.
+ template <typename Handler>
+ void async_send_to(implementation_type& impl, const null_buffers&,
+ socket_base::message_flags, const endpoint_type&, Handler handler)
+ {
+ if (!is_open(impl))
+ {
+ this->get_io_service().post(bind_handler(handler,
+ boost::asio::error::bad_descriptor, 0));
+ }
+ else
+ {
+ // Check if the reactor was already obtained from the io_service.
+ reactor_type* reactor = static_cast<reactor_type*>(
+ interlocked_compare_exchange_pointer(
+ reinterpret_cast<void**>(&reactor_), 0, 0));
+ if (!reactor)
+ {
+ reactor = &(boost::asio::use_service<reactor_type>(
+ this->get_io_service()));
+ interlocked_exchange_pointer(
+ reinterpret_cast<void**>(&reactor_), reactor);
+ }
+
+ reactor->start_write_op(impl.socket_, impl.reactor_data_,
+ null_buffers_operation<Handler>(this->get_io_service(), handler),
+ false);
+ }
+ }
+
   // Receive some data from the peer. Returns the number of bytes received.
   template <typename MutableBufferSequence>
   size_t receive(implementation_type& impl,
@@ -1087,7 +1236,7 @@
           boost::asio::error::get_system_category());
       return 0;
     }
- if (bytes_transferred == 0)
+ if (bytes_transferred == 0 && impl.protocol_.type() == SOCK_STREAM)
     {
       ec = boost::asio::error::eof;
       return 0;
@@ -1097,12 +1246,28 @@
     return bytes_transferred;
   }
 
+ // Wait until data can be received without blocking.
+ size_t receive(implementation_type& impl, const null_buffers&,
+ socket_base::message_flags, boost::system::error_code& ec)
+ {
+ if (!is_open(impl))
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // Wait for socket to become ready.
+ socket_ops::poll_read(impl.socket_, ec);
+
+ return 0;
+ }
+
   template <typename MutableBufferSequence, typename Handler>
   class receive_operation
     : public operation
   {
   public:
- receive_operation(win_iocp_io_service& io_service,
+ receive_operation(int protocol_type, win_iocp_io_service& io_service,
         weak_cancel_token_type cancel_token,
         const MutableBufferSequence& buffers, Handler handler)
       : operation(io_service,
@@ -1110,6 +1275,7 @@
             MutableBufferSequence, Handler>::do_completion_impl,
           &receive_operation<
             MutableBufferSequence, Handler>::destroy_impl),
+ protocol_type_(protocol_type),
         work_(io_service.get_io_service()),
         cancel_token_(cancel_token),
         buffers_(buffers),
@@ -1157,7 +1323,9 @@
       }
 
       // Check for connection closed.
- else if (!ec && bytes_transferred == 0)
+ else if (!ec && bytes_transferred == 0
+ && handler_op->protocol_type_ == SOCK_STREAM
+ && !boost::is_same<MutableBufferSequence, null_buffers>::value)
       {
         ec = boost::asio::error::eof;
       }
@@ -1181,8 +1349,19 @@
       op_type* handler_op(static_cast<op_type*>(op));
       typedef handler_alloc_traits<Handler, op_type> alloc_traits;
       handler_ptr<alloc_traits> ptr(handler_op->handler_, handler_op);
+
+ // A sub-object of the handler may be the true owner of the memory
+ // associated with the handler. Consequently, a local copy of the handler
+ // is required to ensure that any owning sub-object remains valid until
+ // after we have deallocated the memory here.
+ Handler handler(handler_op->handler_);
+ (void)handler;
+
+ // Free the memory associated with the handler.
+ ptr.reset();
     }
 
+ int protocol_type_;
     boost::asio::io_service::work work_;
     weak_cancel_token_type cancel_token_;
     MutableBufferSequence buffers_;
@@ -1215,8 +1394,9 @@
     typedef receive_operation<MutableBufferSequence, Handler> value_type;
     typedef handler_alloc_traits<Handler, value_type> alloc_traits;
     raw_handler_ptr<alloc_traits> raw_ptr(handler);
- handler_ptr<alloc_traits> ptr(raw_ptr, iocp_service_,
- impl.cancel_token_, buffers, handler);
+ int protocol_type = impl.protocol_.type();
+ handler_ptr<alloc_traits> ptr(raw_ptr, protocol_type,
+ iocp_service_, impl.cancel_token_, buffers, handler);
 
     // Copy buffers into WSABUF array.
     ::WSABUF bufs[max_buffers];
@@ -1262,6 +1442,85 @@
     }
   }
 
+ // Wait until data can be received without blocking.
+ template <typename Handler>
+ void async_receive(implementation_type& impl, const null_buffers& buffers,
+ socket_base::message_flags flags, Handler handler)
+ {
+ if (!is_open(impl))
+ {
+ this->get_io_service().post(bind_handler(handler,
+ boost::asio::error::bad_descriptor, 0));
+ }
+ else if (impl.protocol_.type() == SOCK_STREAM)
+ {
+ // For stream sockets on Windows, we may issue a 0-byte overlapped
+ // WSARecv to wait until there is data available on the socket.
+
+#if defined(BOOST_ASIO_ENABLE_CANCELIO)
+ // Update the ID of the thread from which cancellation is safe.
+ if (impl.safe_cancellation_thread_id_ == 0)
+ impl.safe_cancellation_thread_id_ = ::GetCurrentThreadId();
+ else if (impl.safe_cancellation_thread_id_ != ::GetCurrentThreadId())
+ impl.safe_cancellation_thread_id_ = ~DWORD(0);
+#endif // defined(BOOST_ASIO_ENABLE_CANCELIO)
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef receive_operation<null_buffers, Handler> value_type;
+ typedef handler_alloc_traits<Handler, value_type> alloc_traits;
+ raw_handler_ptr<alloc_traits> raw_ptr(handler);
+ int protocol_type = impl.protocol_.type();
+ handler_ptr<alloc_traits> ptr(raw_ptr, protocol_type,
+ iocp_service_, impl.cancel_token_, buffers, handler);
+
+ // Issue a receive operation with an empty buffer.
+ ::WSABUF buf = { 0, 0 };
+ DWORD bytes_transferred = 0;
+ DWORD recv_flags = flags;
+ int result = ::WSARecv(impl.socket_, &buf, 1,
+ &bytes_transferred, &recv_flags, ptr.get(), 0);
+ DWORD last_error = ::WSAGetLastError();
+ if (result != 0 && last_error != WSA_IO_PENDING)
+ {
+ boost::asio::io_service::work work(this->get_io_service());
+ ptr.reset();
+ boost::system::error_code ec(last_error,
+ boost::asio::error::get_system_category());
+ iocp_service_.post(bind_handler(handler, ec, bytes_transferred));
+ }
+ else
+ {
+ ptr.release();
+ }
+ }
+ else
+ {
+ // Check if the reactor was already obtained from the io_service.
+ reactor_type* reactor = static_cast<reactor_type*>(
+ interlocked_compare_exchange_pointer(
+ reinterpret_cast<void**>(&reactor_), 0, 0));
+ if (!reactor)
+ {
+ reactor = &(boost::asio::use_service<reactor_type>(
+ this->get_io_service()));
+ interlocked_exchange_pointer(
+ reinterpret_cast<void**>(&reactor_), reactor);
+ }
+
+ if (flags & socket_base::message_out_of_band)
+ {
+ reactor->start_except_op(impl.socket_, impl.reactor_data_,
+ null_buffers_operation<Handler>(this->get_io_service(), handler));
+ }
+ else
+ {
+ reactor->start_read_op(impl.socket_, impl.reactor_data_,
+ null_buffers_operation<Handler>(this->get_io_service(), handler),
+ false);
+ }
+ }
+ }
+
   // Receive a datagram with the endpoint of the sender. Returns the number of
   // bytes received.
   template <typename MutableBufferSequence>
@@ -1303,7 +1562,7 @@
           boost::asio::error::get_system_category());
       return 0;
     }
- if (bytes_transferred == 0)
+ if (bytes_transferred == 0 && impl.protocol_.type() == SOCK_STREAM)
     {
       ec = boost::asio::error::eof;
       return 0;
@@ -1315,12 +1574,32 @@
     return bytes_transferred;
   }
 
+ // Wait until data can be received without blocking.
+ size_t receive_from(implementation_type& impl,
+ const null_buffers&, endpoint_type& sender_endpoint,
+ socket_base::message_flags, boost::system::error_code& ec)
+ {
+ if (!is_open(impl))
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // Wait for socket to become ready.
+ socket_ops::poll_read(impl.socket_, ec);
+
+ // Reset endpoint since it can be given no sensible value at this time.
+ sender_endpoint = endpoint_type();
+
+ return 0;
+ }
+
   template <typename MutableBufferSequence, typename Handler>
   class receive_from_operation
     : public operation
   {
   public:
- receive_from_operation(win_iocp_io_service& io_service,
+ receive_from_operation(int protocol_type, win_iocp_io_service& io_service,
         endpoint_type& endpoint, const MutableBufferSequence& buffers,
         Handler handler)
       : operation(io_service,
@@ -1328,6 +1607,7 @@
             MutableBufferSequence, Handler>::do_completion_impl,
           &receive_from_operation<
             MutableBufferSequence, Handler>::destroy_impl),
+ protocol_type_(protocol_type),
         endpoint_(endpoint),
         endpoint_size_(static_cast<int>(endpoint.capacity())),
         work_(io_service.get_io_service()),
@@ -1374,7 +1654,8 @@
       }
 
       // Check for connection closed.
- if (!ec && bytes_transferred == 0)
+ if (!ec && bytes_transferred == 0
+ && handler_op->protocol_type_ == SOCK_STREAM)
       {
         ec = boost::asio::error::eof;
       }
@@ -1401,8 +1682,19 @@
       op_type* handler_op(static_cast<op_type*>(op));
       typedef handler_alloc_traits<Handler, op_type> alloc_traits;
       handler_ptr<alloc_traits> ptr(handler_op->handler_, handler_op);
+
+ // A sub-object of the handler may be the true owner of the memory
+ // associated with the handler. Consequently, a local copy of the handler
+ // is required to ensure that any owning sub-object remains valid until
+ // after we have deallocated the memory here.
+ Handler handler(handler_op->handler_);
+ (void)handler;
+
+ // Free the memory associated with the handler.
+ ptr.reset();
     }
 
+ int protocol_type_;
     endpoint_type& endpoint_;
     int endpoint_size_;
     boost::asio::io_service::work work_;
@@ -1437,8 +1729,9 @@
     typedef receive_from_operation<MutableBufferSequence, Handler> value_type;
     typedef handler_alloc_traits<Handler, value_type> alloc_traits;
     raw_handler_ptr<alloc_traits> raw_ptr(handler);
- handler_ptr<alloc_traits> ptr(raw_ptr, iocp_service_,
- sender_endp, buffers, handler);
+ int protocol_type = impl.protocol_.type();
+ handler_ptr<alloc_traits> ptr(raw_ptr, protocol_type,
+ iocp_service_, sender_endp, buffers, handler);
 
     // Copy buffers into WSABUF array.
     ::WSABUF bufs[max_buffers];
@@ -1473,6 +1766,48 @@
     }
   }
 
+ // Wait until data can be received without blocking.
+ template <typename Handler>
+ void async_receive_from(implementation_type& impl,
+ const null_buffers&, endpoint_type& sender_endpoint,
+ socket_base::message_flags flags, Handler handler)
+ {
+ if (!is_open(impl))
+ {
+ this->get_io_service().post(bind_handler(handler,
+ boost::asio::error::bad_descriptor, 0));
+ }
+ else
+ {
+ // Check if the reactor was already obtained from the io_service.
+ reactor_type* reactor = static_cast<reactor_type*>(
+ interlocked_compare_exchange_pointer(
+ reinterpret_cast<void**>(&reactor_), 0, 0));
+ if (!reactor)
+ {
+ reactor = &(boost::asio::use_service<reactor_type>(
+ this->get_io_service()));
+ interlocked_exchange_pointer(
+ reinterpret_cast<void**>(&reactor_), reactor);
+ }
+
+ // Reset endpoint since it can be given no sensible value at this time.
+ sender_endpoint = endpoint_type();
+
+ if (flags & socket_base::message_out_of_band)
+ {
+ reactor->start_except_op(impl.socket_, impl.reactor_data_,
+ null_buffers_operation<Handler>(this->get_io_service(), handler));
+ }
+ else
+ {
+ reactor->start_read_op(impl.socket_, impl.reactor_data_,
+ null_buffers_operation<Handler>(this->get_io_service(), handler),
+ false);
+ }
+ }
+ }
+
   // Accept a new connection.
   template <typename Socket>
   boost::system::error_code accept(implementation_type& impl, Socket& peer,
@@ -1493,7 +1828,6 @@
 
     for (;;)
     {
- boost::system::error_code ec;
       socket_holder new_socket;
       std::size_t addr_len = 0;
       if (peer_endpoint)
@@ -1571,8 +1905,7 @@
     }
 
   private:
- static void do_completion_impl(operation* op,
- DWORD last_error, size_t bytes_transferred)
+ static void do_completion_impl(operation* op, DWORD last_error, size_t)
     {
       // Take ownership of the operation object.
       typedef accept_operation<Socket, Handler> op_type;
@@ -1715,6 +2048,16 @@
       op_type* handler_op(static_cast<op_type*>(op));
       typedef handler_alloc_traits<Handler, op_type> alloc_traits;
       handler_ptr<alloc_traits> ptr(handler_op->handler_, handler_op);
+
+ // A sub-object of the handler may be the true owner of the memory
+ // associated with the handler. Consequently, a local copy of the handler
+ // is required to ensure that any owning sub-object remains valid until
+ // after we have deallocated the memory here.
+ Handler handler(handler_op->handler_);
+ (void)handler;
+
+ // Free the memory associated with the handler.
+ ptr.reset();
     }
 
     win_iocp_io_service& io_service_;
@@ -1833,58 +2176,38 @@
   }
 
   template <typename Handler>
- class connect_handler
+ class connect_operation
   {
   public:
- connect_handler(socket_type socket, bool user_set_non_blocking,
- boost::shared_ptr<bool> completed,
- boost::asio::io_service& io_service,
- reactor_type& reactor, Handler handler)
+ connect_operation(socket_type socket, bool user_set_non_blocking,
+ boost::asio::io_service& io_service, Handler handler)
       : socket_(socket),
         user_set_non_blocking_(user_set_non_blocking),
- completed_(completed),
         io_service_(io_service),
- reactor_(reactor),
         work_(io_service),
         handler_(handler)
     {
     }
 
- bool operator()(const boost::system::error_code& result)
+ bool perform(boost::system::error_code& ec,
+ std::size_t& bytes_transferred)
     {
- // Check whether a handler has already been called for the connection.
- // If it has, then we don't want to do anything in this handler.
- if (*completed_)
- return true;
-
- // Cancel the other reactor operation for the connection.
- *completed_ = true;
- reactor_.enqueue_cancel_ops_unlocked(socket_);
-
       // Check whether the operation was successful.
- if (result)
- {
- io_service_.post(bind_handler(handler_, result));
+ if (ec)
         return true;
- }
 
       // Get the error code from the connect operation.
       int connect_error = 0;
       size_t connect_error_len = sizeof(connect_error);
- boost::system::error_code ec;
       if (socket_ops::getsockopt(socket_, SOL_SOCKET, SO_ERROR,
             &connect_error, &connect_error_len, ec) == socket_error_retval)
- {
- io_service_.post(bind_handler(handler_, ec));
         return true;
- }
 
       // If connection failed then post the handler with the error code.
       if (connect_error)
       {
         ec = boost::system::error_code(connect_error,
             boost::asio::error::get_system_category());
- io_service_.post(bind_handler(handler_, ec));
         return true;
       }
 
@@ -1893,24 +2216,23 @@
       {
         ioctl_arg_type non_blocking = 0;
         if (socket_ops::ioctl(socket_, FIONBIO, &non_blocking, ec))
- {
- io_service_.post(bind_handler(handler_, ec));
           return true;
- }
       }
 
       // Post the result of the successful connection operation.
       ec = boost::system::error_code();
- io_service_.post(bind_handler(handler_, ec));
       return true;
     }
 
+ void complete(const boost::system::error_code& ec, std::size_t)
+ {
+ io_service_.post(bind_handler(handler_, ec));
+ }
+
   private:
     socket_type socket_;
     bool user_set_non_blocking_;
- boost::shared_ptr<bool> completed_;
     boost::asio::io_service& io_service_;
- reactor_type& reactor_;
     boost::asio::io_service::work work_;
     Handler handler_;
   };
@@ -1978,11 +2300,11 @@
       // The connection is happening in the background, and we need to wait
       // until the socket becomes writeable.
       boost::shared_ptr<bool> completed(new bool(false));
- reactor->start_write_and_except_ops(impl.socket_,
- connect_handler<Handler>(
+ reactor->start_connect_op(impl.socket_, impl.reactor_data_,
+ connect_operation<Handler>(
             impl.socket_,
             (impl.flags_ & implementation_type::user_set_non_blocking) != 0,
- completed, this->get_io_service(), *reactor, handler));
+ this->get_io_service(), handler));
     }
     else
     {
@@ -2013,7 +2335,7 @@
             interlocked_compare_exchange_pointer(
               reinterpret_cast<void**>(&reactor_), 0, 0));
       if (reactor)
- reactor->close_descriptor(impl.socket_);
+ reactor->close_descriptor(impl.socket_, impl.reactor_data_);
 
       // The socket destructor must not block. If the user has changed the
       // linger option to block in the foreground, we will change it back to the

Modified: branches/release/boost/asio/detail/win_thread.hpp
==============================================================================
--- branches/release/boost/asio/detail/win_thread.hpp (original)
+++ branches/release/boost/asio/detail/win_thread.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -44,17 +44,53 @@
   : private noncopyable
 {
 public:
+ // The purpose of the thread.
+ enum purpose { internal, external };
+
   // Constructor.
   template <typename Function>
- win_thread(Function f)
+ win_thread(Function f, purpose p = internal)
+ : exit_event_(0)
   {
     std::auto_ptr<func_base> arg(new func<Function>(f));
+
+ ::HANDLE entry_event = 0;
+ if (p == internal)
+ {
+ arg->entry_event_ = entry_event = ::CreateEvent(0, true, false, 0);
+ if (!entry_event)
+ {
+ DWORD last_error = ::GetLastError();
+ boost::system::system_error e(
+ boost::system::error_code(last_error,
+ boost::asio::error::get_system_category()),
+ "thread.entry_event");
+ boost::throw_exception(e);
+ }
+
+ arg->exit_event_ = exit_event_ = ::CreateEvent(0, true, false, 0);
+ if (!exit_event_)
+ {
+ DWORD last_error = ::GetLastError();
+ ::CloseHandle(entry_event);
+ boost::system::system_error e(
+ boost::system::error_code(last_error,
+ boost::asio::error::get_system_category()),
+ "thread.exit_event");
+ boost::throw_exception(e);
+ }
+ }
+
     unsigned int thread_id = 0;
     thread_ = reinterpret_cast<HANDLE>(::_beginthreadex(0, 0,
           win_thread_function, arg.get(), 0, &thread_id));
     if (!thread_)
     {
       DWORD last_error = ::GetLastError();
+ if (entry_event)
+ ::CloseHandle(entry_event);
+ if (exit_event_)
+ ::CloseHandle(exit_event_);
       boost::system::system_error e(
           boost::system::error_code(last_error,
             boost::asio::error::get_system_category()),
@@ -62,18 +98,36 @@
       boost::throw_exception(e);
     }
     arg.release();
+
+ if (entry_event)
+ {
+ ::WaitForSingleObject(entry_event, INFINITE);
+ ::CloseHandle(entry_event);
+ }
   }
 
   // Destructor.
   ~win_thread()
   {
     ::CloseHandle(thread_);
+
+ // The exit_event_ handle is deliberately allowed to leak here since it
+ // is an error for the owner of an internal thread not to join() it.
   }
 
   // Wait for the thread to exit.
   void join()
   {
- ::WaitForSingleObject(thread_, INFINITE);
+ if (exit_event_)
+ {
+ ::WaitForSingleObject(exit_event_, INFINITE);
+ ::CloseHandle(exit_event_);
+ ::TerminateThread(thread_, 0);
+ }
+ else
+ {
+ ::WaitForSingleObject(thread_, INFINITE);
+ }
   }
 
 private:
@@ -84,6 +138,8 @@
   public:
     virtual ~func_base() {}
     virtual void run() = 0;
+ ::HANDLE entry_event_;
+ ::HANDLE exit_event_;
   };
 
   template <typename Function>
@@ -106,13 +162,26 @@
   };
 
   ::HANDLE thread_;
+ ::HANDLE exit_event_;
 };
 
 inline unsigned int __stdcall win_thread_function(void* arg)
 {
   std::auto_ptr<win_thread::func_base> func(
       static_cast<win_thread::func_base*>(arg));
+
+ if (func->entry_event_)
+ ::SetEvent(func->entry_event_);
+
   func->run();
+
+ if (HANDLE exit_event = func->exit_event_)
+ {
+ func.reset();
+ ::SetEvent(exit_event);
+ ::Sleep(INFINITE);
+ }
+
   return 0;
 }
 

Modified: branches/release/boost/asio/detail/wince_thread.hpp
==============================================================================
--- branches/release/boost/asio/detail/wince_thread.hpp (original)
+++ branches/release/boost/asio/detail/wince_thread.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -43,9 +43,12 @@
   : private noncopyable
 {
 public:
+ // The purpose of the thread.
+ enum purpose { internal, external };
+
   // Constructor.
   template <typename Function>
- wince_thread(Function f)
+ wince_thread(Function f, purpose = internal)
   {
     std::auto_ptr<func_base> arg(new func<Function>(f));
     DWORD thread_id = 0;

Modified: branches/release/boost/asio/detail/wrapped_handler.hpp
==============================================================================
--- branches/release/boost/asio/detail/wrapped_handler.hpp (original)
+++ branches/release/boost/asio/detail/wrapped_handler.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -128,22 +128,6 @@
   Handler handler_;
 };
 
-template <typename Dispatcher, typename Handler>
-inline void* asio_handler_allocate(std::size_t size,
- wrapped_handler<Dispatcher, Handler>* this_handler)
-{
- return boost_asio_handler_alloc_helpers::allocate(
- size, &this_handler->handler_);
-}
-
-template <typename Dispatcher, typename Handler>
-inline void asio_handler_deallocate(void* pointer, std::size_t size,
- wrapped_handler<Dispatcher, Handler>* this_handler)
-{
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, &this_handler->handler_);
-}
-
 template <typename Handler, typename Context>
 class rewrapped_handler
 {
@@ -169,6 +153,22 @@
   Context context_;
 };
 
+template <typename Dispatcher, typename Handler>
+inline void* asio_handler_allocate(std::size_t size,
+ wrapped_handler<Dispatcher, Handler>* this_handler)
+{
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, &this_handler->handler_);
+}
+
+template <typename Dispatcher, typename Handler>
+inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ wrapped_handler<Dispatcher, Handler>* this_handler)
+{
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, &this_handler->handler_);
+}
+
 template <typename Function, typename Dispatcher, typename Handler>
 inline void asio_handler_invoke(const Function& function,
     wrapped_handler<Dispatcher, Handler>* this_handler)
@@ -178,6 +178,22 @@
         function, this_handler->handler_));
 }
 
+template <typename Handler, typename Context>
+inline void* asio_handler_allocate(std::size_t size,
+ rewrapped_handler<Handler, Context>* this_handler)
+{
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, &this_handler->context_);
+}
+
+template <typename Handler, typename Context>
+inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ rewrapped_handler<Handler, Context>* this_handler)
+{
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, &this_handler->context_);
+}
+
 template <typename Function, typename Handler, typename Context>
 inline void asio_handler_invoke(const Function& function,
     rewrapped_handler<Handler, Context>* this_handler)

Modified: branches/release/boost/asio/error.hpp
==============================================================================
--- branches/release/boost/asio/error.hpp (original)
+++ branches/release/boost/asio/error.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -106,6 +106,9 @@
   /// Message too long.
   message_size = BOOST_ASIO_SOCKET_ERROR(EMSGSIZE),
 
+ /// The name was too long.
+ name_too_long = BOOST_ASIO_SOCKET_ERROR(ENAMETOOLONG),
+
   /// Network is down.
   network_down = BOOST_ASIO_SOCKET_ERROR(ENETDOWN),
 

Modified: branches/release/boost/asio/impl/read_until.ipp
==============================================================================
--- branches/release/boost/asio/impl/read_until.ipp (original)
+++ branches/release/boost/asio/impl/read_until.ipp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -25,8 +25,8 @@
 #include <boost/asio/detail/pop_options.hpp>
 
 #include <boost/asio/buffer.hpp>
+#include <boost/asio/buffers_iterator.hpp>
 #include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/const_buffers_iterator.hpp>
 #include <boost/asio/detail/handler_alloc_helpers.hpp>
 #include <boost/asio/detail/handler_invoke_helpers.hpp>
 #include <boost/asio/detail/throw_error.hpp>
@@ -55,24 +55,24 @@
     // Determine the range of the data to be searched.
     typedef typename boost::asio::basic_streambuf<
       Allocator>::const_buffers_type const_buffers_type;
- typedef boost::asio::detail::const_buffers_iterator<
- const_buffers_type> iterator;
+ typedef boost::asio::buffers_iterator<const_buffers_type> iterator;
     const_buffers_type buffers = b.data();
- iterator begin(buffers, next_search_start);
- iterator end(buffers, (std::numeric_limits<std::size_t>::max)());
+ iterator begin = iterator::begin(buffers);
+ iterator start = begin + next_search_start;
+ iterator end = iterator::end(buffers);
 
     // Look for a match.
- iterator iter = std::find(begin, end, delim);
+ iterator iter = std::find(start, end, delim);
     if (iter != end)
     {
       // Found a match. We're done.
       ec = boost::system::error_code();
- return iter.position() + 1;
+ return iter - begin + 1;
     }
     else
     {
       // No match. Next search can start with the new data.
- next_search_start = end.position();
+ next_search_start = end - begin;
     }
 
     // Check if buffer is full.
@@ -147,33 +147,33 @@
     // Determine the range of the data to be searched.
     typedef typename boost::asio::basic_streambuf<
       Allocator>::const_buffers_type const_buffers_type;
- typedef boost::asio::detail::const_buffers_iterator<
- const_buffers_type> iterator;
+ typedef boost::asio::buffers_iterator<const_buffers_type> iterator;
     const_buffers_type buffers = b.data();
- iterator begin(buffers, next_search_start);
- iterator end(buffers, (std::numeric_limits<std::size_t>::max)());
+ iterator begin = iterator::begin(buffers);
+ iterator start = begin + next_search_start;
+ iterator end = iterator::end(buffers);
 
     // Look for a match.
     std::pair<iterator, bool> result = boost::asio::detail::partial_search(
- begin, end, delim.begin(), delim.end());
+ start, end, delim.begin(), delim.end());
     if (result.first != end)
     {
       if (result.second)
       {
         // Full match. We're done.
         ec = boost::system::error_code();
- return result.first.position() + delim.length();
+ return result.first - begin + delim.length();
       }
       else
       {
         // Partial match. Next search needs to start from beginning of match.
- next_search_start = result.first.position();
+ next_search_start = result.first - begin;
       }
     }
     else
     {
       // No match. Next search can start with the new data.
- next_search_start = end.position();
+ next_search_start = end - begin;
     }
 
     // Check if buffer is full.
@@ -213,33 +213,33 @@
     // Determine the range of the data to be searched.
     typedef typename boost::asio::basic_streambuf<
       Allocator>::const_buffers_type const_buffers_type;
- typedef boost::asio::detail::const_buffers_iterator<
- const_buffers_type> iterator;
+ typedef boost::asio::buffers_iterator<const_buffers_type> iterator;
     const_buffers_type buffers = b.data();
- iterator begin(buffers, next_search_start);
- iterator end(buffers, (std::numeric_limits<std::size_t>::max)());
+ iterator begin = iterator::begin(buffers);
+ iterator start = begin + next_search_start;
+ iterator end = iterator::end(buffers);
 
     // Look for a match.
     boost::match_results<iterator> match_results;
- if (boost::regex_search(begin, end, match_results, expr,
+ if (boost::regex_search(start, end, match_results, expr,
           boost::match_default | boost::match_partial))
     {
       if (match_results[0].matched)
       {
         // Full match. We're done.
         ec = boost::system::error_code();
- return match_results[0].second.position();
+ return match_results[0].second - begin;
       }
       else
       {
         // Partial match. Next search needs to start from beginning of match.
- next_search_start = match_results[0].first.position();
+ next_search_start = match_results[0].first - begin;
       }
     }
     else
     {
       // No match. Next search can start with the new data.
- next_search_start = end.position();
+ next_search_start = end - begin;
     }
 
     // Check if buffer is full.
@@ -258,6 +258,73 @@
   }
 }
 
+template <typename SyncReadStream, typename Allocator, typename MatchCondition>
+std::size_t read_until(SyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ MatchCondition match_condition, boost::system::error_code& ec,
+ typename boost::enable_if<is_match_condition<MatchCondition> >::type*)
+{
+ std::size_t next_search_start = 0;
+ for (;;)
+ {
+ // Determine the range of the data to be searched.
+ typedef typename boost::asio::basic_streambuf<
+ Allocator>::const_buffers_type const_buffers_type;
+ typedef boost::asio::buffers_iterator<const_buffers_type> iterator;
+ const_buffers_type buffers = b.data();
+ iterator begin = iterator::begin(buffers);
+ iterator start = begin + next_search_start;
+ iterator end = iterator::end(buffers);
+
+ // Look for a match.
+ std::pair<iterator, bool> result = match_condition(start, end);
+ if (result.first != end)
+ {
+ if (result.second)
+ {
+ // Full match. We're done.
+ ec = boost::system::error_code();
+ return result.first - begin;
+ }
+ else
+ {
+ // Partial match. Next search needs to start from beginning of match.
+ next_search_start = result.first - begin;
+ }
+ }
+ else
+ {
+ // No match. Next search can start with the new data.
+ next_search_start = end - begin;
+ }
+
+ // Check if buffer is full.
+ if (b.size() == b.max_size())
+ {
+ ec = error::not_found;
+ return 0;
+ }
+
+ // Need more data.
+ std::size_t bytes_available =
+ std::min<std::size_t>(512, b.max_size() - b.size());
+ b.commit(s.read_some(b.prepare(bytes_available), ec));
+ if (ec)
+ return 0;
+ }
+}
+
+template <typename SyncReadStream, typename Allocator, typename MatchCondition>
+inline std::size_t read_until(SyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b, MatchCondition match_condition,
+ typename boost::enable_if<is_match_condition<MatchCondition> >::type*)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = read_until(s, b, match_condition, ec);
+ boost::asio::detail::throw_error(ec);
+ return bytes_transferred;
+}
+
 namespace detail
 {
   template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
@@ -292,18 +359,18 @@
       // Determine the range of the data to be searched.
       typedef typename boost::asio::basic_streambuf<
         Allocator>::const_buffers_type const_buffers_type;
- typedef boost::asio::detail::const_buffers_iterator<
- const_buffers_type> iterator;
+ typedef boost::asio::buffers_iterator<const_buffers_type> iterator;
       const_buffers_type buffers = streambuf_.data();
- iterator begin(buffers, next_search_start_);
- iterator end(buffers, (std::numeric_limits<std::size_t>::max)());
+ iterator begin = iterator::begin(buffers);
+ iterator start = begin + next_search_start_;
+ iterator end = iterator::end(buffers);
 
       // Look for a match.
- iterator iter = std::find(begin, end, delim_);
+ iterator iter = std::find(start, end, delim_);
       if (iter != end)
       {
         // Found a match. We're done.
- std::size_t bytes = iter.position() + 1;
+ std::size_t bytes = iter - begin + 1;
         handler_(ec, bytes);
         return;
       }
@@ -318,7 +385,7 @@
       }
 
       // Next search can start with the new data.
- next_search_start_ = end.position();
+ next_search_start_ = end - begin;
 
       // Start a new asynchronous read operation to obtain more data.
       std::size_t bytes_available =
@@ -370,11 +437,10 @@
   // Determine the range of the data to be searched.
   typedef typename boost::asio::basic_streambuf<
     Allocator>::const_buffers_type const_buffers_type;
- typedef boost::asio::detail::const_buffers_iterator<
- const_buffers_type> iterator;
+ typedef boost::asio::buffers_iterator<const_buffers_type> iterator;
   const_buffers_type buffers = b.data();
- iterator begin(buffers, 0);
- iterator end(buffers, (std::numeric_limits<std::size_t>::max)());
+ iterator begin = iterator::begin(buffers);
+ iterator end = iterator::end(buffers);
 
   // Look for a match.
   iterator iter = std::find(begin, end, delim);
@@ -382,7 +448,7 @@
   {
     // Found a match. We're done.
     boost::system::error_code ec;
- std::size_t bytes = iter.position() + 1;
+ std::size_t bytes = iter - begin + 1;
     s.io_service().post(detail::bind_handler(handler, ec, bytes));
     return;
   }
@@ -400,7 +466,7 @@
     std::min<std::size_t>(512, b.max_size() - b.size());
   s.async_read_some(b.prepare(bytes_available),
       detail::read_until_delim_handler<AsyncReadStream, Allocator, ReadHandler>(
- s, b, delim, end.position(), handler));
+ s, b, delim, end - begin, handler));
 }
 
 namespace detail
@@ -438,34 +504,34 @@
       // Determine the range of the data to be searched.
       typedef typename boost::asio::basic_streambuf<
         Allocator>::const_buffers_type const_buffers_type;
- typedef boost::asio::detail::const_buffers_iterator<
- const_buffers_type> iterator;
+ typedef boost::asio::buffers_iterator<const_buffers_type> iterator;
       const_buffers_type buffers = streambuf_.data();
- iterator begin(buffers, next_search_start_);
- iterator end(buffers, (std::numeric_limits<std::size_t>::max)());
+ iterator begin = iterator::begin(buffers);
+ iterator start = begin + next_search_start_;
+ iterator end = iterator::end(buffers);
 
       // Look for a match.
       std::pair<iterator, bool> result = boost::asio::detail::partial_search(
- begin, end, delim_.begin(), delim_.end());
+ start, end, delim_.begin(), delim_.end());
       if (result.first != end)
       {
         if (result.second)
         {
           // Full match. We're done.
- std::size_t bytes = result.first.position() + delim_.length();
+ std::size_t bytes = result.first - begin + delim_.length();
           handler_(ec, bytes);
           return;
         }
         else
         {
           // Partial match. Next search needs to start from beginning of match.
- next_search_start_ = result.first.position();
+ next_search_start_ = result.first - begin;
         }
       }
       else
       {
         // No match. Next search can start with the new data.
- next_search_start_ = end.position();
+ next_search_start_ = end - begin;
       }
 
       // Check if buffer is full.
@@ -528,11 +594,10 @@
   // Determine the range of the data to be searched.
   typedef typename boost::asio::basic_streambuf<
     Allocator>::const_buffers_type const_buffers_type;
- typedef boost::asio::detail::const_buffers_iterator<
- const_buffers_type> iterator;
+ typedef boost::asio::buffers_iterator<const_buffers_type> iterator;
   const_buffers_type buffers = b.data();
- iterator begin(buffers, 0);
- iterator end(buffers, (std::numeric_limits<std::size_t>::max)());
+ iterator begin = iterator::begin(buffers);
+ iterator end = iterator::end(buffers);
 
   // Look for a match.
   std::size_t next_search_start;
@@ -544,20 +609,20 @@
     {
       // Full match. We're done.
       boost::system::error_code ec;
- std::size_t bytes = result.first.position() + delim.length();
+ std::size_t bytes = result.first - begin + delim.length();
       s.io_service().post(detail::bind_handler(handler, ec, bytes));
       return;
     }
     else
     {
       // Partial match. Next search needs to start from beginning of match.
- next_search_start = result.first.position();
+ next_search_start = result.first - begin;
     }
   }
   else
   {
     // No match. Next search can start with the new data.
- next_search_start = end.position();
+ next_search_start = end - begin;
   }
 
   // Check if buffer is full.
@@ -612,34 +677,34 @@
       // Determine the range of the data to be searched.
       typedef typename boost::asio::basic_streambuf<
         Allocator>::const_buffers_type const_buffers_type;
- typedef boost::asio::detail::const_buffers_iterator<
- const_buffers_type> iterator;
+ typedef boost::asio::buffers_iterator<const_buffers_type> iterator;
       const_buffers_type buffers = streambuf_.data();
- iterator begin(buffers, next_search_start_);
- iterator end(buffers, (std::numeric_limits<std::size_t>::max)());
+ iterator begin = iterator::begin(buffers);
+ iterator start = begin + next_search_start_;
+ iterator end = iterator::end(buffers);
 
       // Look for a match.
       boost::match_results<iterator> match_results;
- if (boost::regex_search(begin, end, match_results, expr_,
+ if (boost::regex_search(start, end, match_results, expr_,
             boost::match_default | boost::match_partial))
       {
         if (match_results[0].matched)
         {
           // Full match. We're done.
- std::size_t bytes = match_results[0].second.position();
+ std::size_t bytes = match_results[0].second - begin;
           handler_(ec, bytes);
           return;
         }
         else
         {
           // Partial match. Next search needs to start from beginning of match.
- next_search_start_ = match_results[0].first.position();
+ next_search_start_ = match_results[0].first - begin;
         }
       }
       else
       {
         // No match. Next search can start with the new data.
- next_search_start_ = end.position();
+ next_search_start_ = end - begin;
       }
 
       // Check if buffer is full.
@@ -702,11 +767,10 @@
   // Determine the range of the data to be searched.
   typedef typename boost::asio::basic_streambuf<
     Allocator>::const_buffers_type const_buffers_type;
- typedef boost::asio::detail::const_buffers_iterator<
- const_buffers_type> iterator;
+ typedef boost::asio::buffers_iterator<const_buffers_type> iterator;
   const_buffers_type buffers = b.data();
- iterator begin(buffers, 0);
- iterator end(buffers, (std::numeric_limits<std::size_t>::max)());
+ iterator begin = iterator::begin(buffers);
+ iterator end = iterator::end(buffers);
 
   // Look for a match.
   std::size_t next_search_start;
@@ -718,20 +782,20 @@
     {
       // Full match. We're done.
       boost::system::error_code ec;
- std::size_t bytes = match_results[0].second.position();
+ std::size_t bytes = match_results[0].second - begin;
       s.io_service().post(detail::bind_handler(handler, ec, bytes));
       return;
     }
     else
     {
       // Partial match. Next search needs to start from beginning of match.
- next_search_start = match_results[0].first.position();
+ next_search_start = match_results[0].first - begin;
     }
   }
   else
   {
     // No match. Next search can start with the new data.
- next_search_start = end.position();
+ next_search_start = end - begin;
   }
 
   // Check if buffer is full.
@@ -750,6 +814,182 @@
         s, b, expr, next_search_start, handler));
 }
 
+namespace detail
+{
+ template <typename AsyncReadStream, typename Allocator,
+ typename MatchCondition, typename ReadHandler>
+ class read_until_match_handler
+ {
+ public:
+ read_until_match_handler(AsyncReadStream& stream,
+ boost::asio::basic_streambuf<Allocator>& streambuf,
+ MatchCondition match_condition, std::size_t next_search_start,
+ ReadHandler handler)
+ : stream_(stream),
+ streambuf_(streambuf),
+ match_condition_(match_condition),
+ next_search_start_(next_search_start),
+ handler_(handler)
+ {
+ }
+
+ void operator()(const boost::system::error_code& ec,
+ std::size_t bytes_transferred)
+ {
+ // Check for errors.
+ if (ec)
+ {
+ std::size_t bytes = 0;
+ handler_(ec, bytes);
+ return;
+ }
+
+ // Commit received data to streambuf's get area.
+ streambuf_.commit(bytes_transferred);
+
+ // Determine the range of the data to be searched.
+ typedef typename boost::asio::basic_streambuf<
+ Allocator>::const_buffers_type const_buffers_type;
+ typedef boost::asio::buffers_iterator<const_buffers_type> iterator;
+ const_buffers_type buffers = streambuf_.data();
+ iterator begin = iterator::begin(buffers);
+ iterator start = begin + next_search_start_;
+ iterator end = iterator::end(buffers);
+
+ // Look for a match.
+ std::pair<iterator, bool> result = match_condition_(start, end);
+ if (result.first != end)
+ {
+ if (result.second)
+ {
+ // Full match. We're done.
+ std::size_t bytes = result.first - begin;
+ handler_(ec, bytes);
+ return;
+ }
+ else
+ {
+ // Partial match. Next search needs to start from beginning of match.
+ next_search_start_ = result.first - begin;
+ }
+ }
+ else
+ {
+ // No match. Next search can start with the new data.
+ next_search_start_ = end - begin;
+ }
+
+ // Check if buffer is full.
+ if (streambuf_.size() == streambuf_.max_size())
+ {
+ std::size_t bytes = 0;
+ boost::system::error_code ec(error::not_found);
+ handler_(ec, bytes);
+ return;
+ }
+
+ // Start a new asynchronous read operation to obtain more data.
+ std::size_t bytes_available =
+ std::min<std::size_t>(512, streambuf_.max_size() - streambuf_.size());
+ stream_.async_read_some(streambuf_.prepare(bytes_available), *this);
+ }
+
+ //private:
+ AsyncReadStream& stream_;
+ boost::asio::basic_streambuf<Allocator>& streambuf_;
+ MatchCondition match_condition_;
+ std::size_t next_search_start_;
+ ReadHandler handler_;
+ };
+
+ template <typename AsyncReadStream, typename Allocator,
+ typename MatchCondition, typename ReadHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ read_until_match_handler<AsyncReadStream,
+ Allocator, MatchCondition, ReadHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, &this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream, typename Allocator,
+ typename MatchCondition, typename ReadHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ read_until_match_handler<AsyncReadStream,
+ Allocator, MatchCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, &this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncReadStream, typename Allocator,
+ typename MatchCondition, typename ReadHandler>
+ inline void asio_handler_invoke(const Function& function,
+ read_until_match_handler<AsyncReadStream,
+ Allocator, MatchCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, &this_handler->handler_);
+ }
+} // namespace detail
+
+template <typename AsyncReadStream, typename Allocator,
+ typename MatchCondition, typename ReadHandler>
+void async_read_until(AsyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ MatchCondition match_condition, ReadHandler handler,
+ typename boost::enable_if<is_match_condition<MatchCondition> >::type*)
+{
+ // Determine the range of the data to be searched.
+ typedef typename boost::asio::basic_streambuf<
+ Allocator>::const_buffers_type const_buffers_type;
+ typedef boost::asio::buffers_iterator<const_buffers_type> iterator;
+ const_buffers_type buffers = b.data();
+ iterator begin = iterator::begin(buffers);
+ iterator end = iterator::end(buffers);
+
+ // Look for a match.
+ std::size_t next_search_start;
+ std::pair<iterator, bool> result = match_condition(begin, end);
+ if (result.first != end)
+ {
+ if (result.second)
+ {
+ // Full match. We're done.
+ boost::system::error_code ec;
+ std::size_t bytes = result.first - begin;
+ s.io_service().post(detail::bind_handler(handler, ec, bytes));
+ return;
+ }
+ else
+ {
+ // Partial match. Next search needs to start from beginning of match.
+ next_search_start = result.first - begin;
+ }
+ }
+ else
+ {
+ // No match. Next search can start with the new data.
+ next_search_start = end - begin;
+ }
+
+ // Check if buffer is full.
+ if (b.size() == b.max_size())
+ {
+ boost::system::error_code ec(error::not_found);
+ s.io_service().post(detail::bind_handler(handler, ec, 0));
+ return;
+ }
+
+ // Start a new asynchronous read operation to obtain more data.
+ std::size_t bytes_available =
+ std::min<std::size_t>(512, b.max_size() - b.size());
+ s.async_read_some(b.prepare(bytes_available),
+ detail::read_until_match_handler<
+ AsyncReadStream, Allocator, MatchCondition, ReadHandler>(
+ s, b, match_condition, next_search_start, handler));
+}
+
 } // namespace asio
 } // namespace boost
 

Copied: branches/release/boost/asio/impl/serial_port_base.ipp (from r46272, /trunk/boost/asio/impl/serial_port_base.ipp)
==============================================================================
--- /trunk/boost/asio/impl/serial_port_base.ipp (original)
+++ branches/release/boost/asio/impl/serial_port_base.ipp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -108,7 +108,12 @@
     ec = boost::asio::error::invalid_argument;
     return ec;
   }
+# if defined(_BSD_SOURCE)
   ::cfsetspeed(&storage, baud);
+# else
+ ::cfsetispeed(&storage, baud);
+ ::cfsetospeed(&storage, baud);
+# endif
 #endif
   ec = boost::system::error_code();
   return ec;
@@ -242,16 +247,25 @@
   {
   case none:
     storage.c_iflag &= ~(IXOFF | IXON);
+# if defined(_BSD_SOURCE)
     storage.c_cflag &= ~CRTSCTS;
+# endif
     break;
   case software:
     storage.c_iflag |= IXOFF | IXON;
+# if defined(_BSD_SOURCE)
     storage.c_cflag &= ~CRTSCTS;
+# endif
     break;
   case hardware:
+# if defined(_BSD_SOURCE)
     storage.c_iflag &= ~(IXOFF | IXON);
     storage.c_cflag |= CRTSCTS;
     break;
+# else
+ ec = boost::asio::error::operation_not_supported;
+ return ec;
+# endif
   default:
     break;
   }

Modified: branches/release/boost/asio/read_until.hpp
==============================================================================
--- branches/release/boost/asio/read_until.hpp (original)
+++ branches/release/boost/asio/read_until.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -21,6 +21,9 @@
 #include <cstddef>
 #include <boost/config.hpp>
 #include <boost/regex.hpp>
+#include <boost/type_traits/is_function.hpp>
+#include <boost/type_traits/remove_pointer.hpp>
+#include <boost/utility/enable_if.hpp>
 #include <string>
 #include <boost/asio/detail/pop_options.hpp>
 
@@ -30,6 +33,36 @@
 namespace boost {
 namespace asio {
 
+namespace detail
+{
+ template <typename T>
+ struct has_result_type
+ {
+ struct big { char a[100]; };
+ template <typename U> static big helper(U, ...);
+ template <typename U> static char helper(U, typename U::result_type* = 0);
+ static const T& ref();
+ enum { value = (sizeof((helper)((ref)())) == 1) };
+ };
+} // namespace detail
+
+/// Type trait used to determine whether a type can be used as a match condition
+/// function with read_until and async_read_until.
+template <typename T>
+struct is_match_condition
+{
+#if defined(GENERATING_DOCUMENTATION)
+ /// The value member is true if the type may be used as a match condition.
+ static const bool value;
+#else
+ enum
+ {
+ value = boost::is_function<typename boost::remove_pointer<T>::type>::value
+ || detail::has_result_type<T>::value
+ };
+#endif
+};
+
 /**
  * @defgroup read_until boost::asio::read_until
  */
@@ -243,6 +276,158 @@
     boost::asio::basic_streambuf<Allocator>& b, const boost::regex& expr,
     boost::system::error_code& ec);
 
+/// Read data into a streambuf until a function object indicates a match.
+/**
+ * This function is used to read data into the specified streambuf until a
+ * user-defined match condition function object, when applied to the data
+ * contained in the streambuf, indicates a successful match. The call will
+ * block until one of the following conditions is true:
+ *
+ * @li The match condition function object returns a std::pair where the second
+ * element evaluates to true.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the match condition function object already indicates
+ * a match, the function returns immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param b A streambuf object into which the data will be read.
+ *
+ * @param match_condition The function object to be called to determine whether
+ * a match exists. The signature of the function object must be:
+ * @code pair<iterator, bool> match_condition(iterator begin, iterator end);
+ * @endcode
+ * where @c iterator represents the type:
+ * @code buffers_iterator<basic_streambuf<Allocator>::const_buffers_type>
+ * @endcode
+ * The iterator parameters @c begin and @c end define the range of bytes to be
+ * scanned to determine whether there is a match. The @c first member of the
+ * return value is an iterator marking one-past-the-end of the bytes that have
+ * been consumed by the match function. This iterator is used to calculate the
+ * @c begin parameter for any subsequent invocation of the match condition. The
+ * @c second member of the return value is true if a match has been found, false
+ * otherwise.
+ *
+ * @returns The number of bytes in the streambuf's get area that have been fully
+ * consumed by the match function.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note The default implementation of the @c is_match_condition type trait
+ * evaluates to true for function pointers and function objects with a
+ * @c result_type typedef. It must be specialised for other user-defined
+ * function objects.
+ *
+ * @par Examples
+ * To read data into a streambuf until whitespace is encountered:
+ * @code typedef boost::asio::buffers_iterator<
+ * boost::asio::streambuf::const_buffers_type> iterator;
+ *
+ * std::pair<iterator, bool>
+ * match_whitespace(iterator begin, iterator end)
+ * {
+ * iterator i = begin;
+ * while (i != end)
+ * if (std::isspace(*i++))
+ * return std::make_pair(i, true);
+ * return std::make_pair(i, false);
+ * }
+ * ...
+ * boost::asio::streambuf b;
+ * boost::asio::read_until(s, b, match_whitespace);
+ * @endcode
+ *
+ * To read data into a streambuf until a matching character is found:
+ * @code class match_char
+ * {
+ * public:
+ * explicit match_char(char c) : c_(c) {}
+ *
+ * template <typename Iterator>
+ * std::pair<Iterator, bool> operator()(
+ * Iterator begin, Iterator end) const
+ * {
+ * Iterator i = begin;
+ * while (i != end)
+ * if (c_ == *i++)
+ * return std::make_pair(i, true);
+ * return std::make_pair(i, false);
+ * }
+ *
+ * private:
+ * char c_;
+ * };
+ *
+ * namespace asio {
+ * template <> struct is_match_condition<match_char>
+ * : public boost::true_type {};
+ * } // namespace asio
+ * ...
+ * boost::asio::streambuf b;
+ * boost::asio::read_until(s, b, match_char('a'));
+ * @endcode
+ */
+template <typename SyncReadStream, typename Allocator, typename MatchCondition>
+std::size_t read_until(SyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b, MatchCondition match_condition,
+ typename boost::enable_if<is_match_condition<MatchCondition> >::type* = 0);
+
+/// Read data into a streambuf until a function object indicates a match.
+/**
+ * This function is used to read data into the specified streambuf until a
+ * user-defined match condition function object, when applied to the data
+ * contained in the streambuf, indicates a successful match. The call will
+ * block until one of the following conditions is true:
+ *
+ * @li The match condition function object returns a std::pair where the second
+ * element evaluates to true.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the match condition function object already indicates
+ * a match, the function returns immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param b A streambuf object into which the data will be read.
+ *
+ * @param match_condition The function object to be called to determine whether
+ * a match exists. The signature of the function object must be:
+ * @code pair<iterator, bool> match_condition(iterator begin, iterator end);
+ * @endcode
+ * where @c iterator represents the type:
+ * @code buffers_iterator<basic_streambuf<Allocator>::const_buffers_type>
+ * @endcode
+ * The iterator parameters @c begin and @c end define the range of bytes to be
+ * scanned to determine whether there is a match. The @c first member of the
+ * return value is an iterator marking one-past-the-end of the bytes that have
+ * been consumed by the match function. This iterator is used to calculate the
+ * @c begin parameter for any subsequent invocation of the match condition. The
+ * @c second member of the return value is true if a match has been found, false
+ * otherwise.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes in the streambuf's get area that have been fully
+ * consumed by the match function. Returns 0 if an error occurred.
+ *
+ * @note The default implementation of the @c is_match_condition type trait
+ * evaluates to true for function pointers and function objects with a
+ * @c result_type typedef. It must be specialised for other user-defined
+ * function objects.
+ */
+template <typename SyncReadStream, typename Allocator, typename MatchCondition>
+std::size_t read_until(SyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ MatchCondition match_condition, boost::system::error_code& ec,
+ typename boost::enable_if<is_match_condition<MatchCondition> >::type* = 0);
+
 /*@}*/
 /**
 * @defgroup async_read_until boost::asio::async_read_until
@@ -442,6 +627,127 @@
     boost::asio::basic_streambuf<Allocator>& b, const boost::regex& expr,
     ReadHandler handler);
 
+/// Start an asynchronous operation to read data into a streambuf until a
+/// function object indicates a match.
+/**
+ * This function is used to asynchronously read data into the specified
+ * streambuf until a user-defined match condition function object, when applied
+ * to the data contained in the streambuf, indicates a successful match. The
+ * function call always returns immediately. The asynchronous operation will
+ * continue until one of the following conditions is true:
+ *
+ * @li The match condition function object returns a std::pair where the second
+ * element evaluates to true.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_read_some function. If the match condition function object already
+ * indicates a match, the operation completes immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the AsyncReadStream concept.
+ *
+ * @param b A streambuf object into which the data will be read.
+ *
+ * @param match_condition The function object to be called to determine whether
+ * a match exists. The signature of the function object must be:
+ * @code pair<iterator, bool> match_condition(iterator begin, iterator end);
+ * @endcode
+ * where @c iterator represents the type:
+ * @code buffers_iterator<basic_streambuf<Allocator>::const_buffers_type>
+ * @endcode
+ * The iterator parameters @c begin and @c end define the range of bytes to be
+ * scanned to determine whether there is a match. The @c first member of the
+ * return value is an iterator marking one-past-the-end of the bytes that have
+ * been consumed by the match function. This iterator is used to calculate the
+ * @c begin parameter for any subsequent invocation of the match condition. The
+ * @c second member of the return value is true if a match has been found, false
+ * otherwise.
+ *
+ * @param handler The handler to be called when the read operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const boost::system::error_code& error,
+ *
+ * // The number of bytes in the streambuf's get
+ * // area that have been fully consumed by the
+ * // match function. O if an error occurred.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_service::post().
+ *
+ * @note The default implementation of the @c is_match_condition type trait
+ * evaluates to true for function pointers and function objects with a
+ * @c result_type typedef. It must be specialised for other user-defined
+ * function objects.
+ *
+ * @par Examples
+ * To asynchronously read data into a streambuf until whitespace is encountered:
+ * @code typedef boost::asio::buffers_iterator<
+ * boost::asio::streambuf::const_buffers_type> iterator;
+ *
+ * std::pair<iterator, bool>
+ * match_whitespace(iterator begin, iterator end)
+ * {
+ * iterator i = begin;
+ * while (i != end)
+ * if (std::isspace(*i++))
+ * return std::make_pair(i, true);
+ * return std::make_pair(i, false);
+ * }
+ * ...
+ * void handler(const boost::system::error_code& e, std::size_t size);
+ * ...
+ * boost::asio::streambuf b;
+ * boost::asio::async_read_until(s, b, match_whitespace, handler);
+ * @endcode
+ *
+ * To asynchronously read data into a streambuf until a matching character is
+ * found:
+ * @code class match_char
+ * {
+ * public:
+ * explicit match_char(char c) : c_(c) {}
+ *
+ * template <typename Iterator>
+ * std::pair<Iterator, bool> operator()(
+ * Iterator begin, Iterator end) const
+ * {
+ * Iterator i = begin;
+ * while (i != end)
+ * if (c_ == *i++)
+ * return std::make_pair(i, true);
+ * return std::make_pair(i, false);
+ * }
+ *
+ * private:
+ * char c_;
+ * };
+ *
+ * namespace asio {
+ * template <> struct is_match_condition<match_char>
+ * : public boost::true_type {};
+ * } // namespace asio
+ * ...
+ * void handler(const boost::system::error_code& e, std::size_t size);
+ * ...
+ * boost::asio::streambuf b;
+ * boost::asio::async_read_until(s, b, match_char('a'), handler);
+ * @endcode
+ */
+template <typename AsyncReadStream, typename Allocator,
+ typename MatchCondition, typename ReadHandler>
+void async_read_until(AsyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ MatchCondition match_condition, ReadHandler handler,
+ typename boost::enable_if<is_match_condition<MatchCondition> >::type* = 0);
+
 /*@}*/
 
 } // namespace asio

Modified: branches/release/boost/asio/ssl/detail/openssl_operation.hpp
==============================================================================
--- branches/release/boost/asio/ssl/detail/openssl_operation.hpp (original)
+++ branches/release/boost/asio/ssl/detail/openssl_operation.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -169,14 +169,11 @@
       ((::SSL_get_shutdown( session_ ) & SSL_SENT_SHUTDOWN) ==
             SSL_SENT_SHUTDOWN);
 
- if (is_shut_down_sent && is_shut_down_received && is_operation_done)
+ if (is_shut_down_sent && is_shut_down_received && is_operation_done && !is_write_needed)
       // SSL connection is shut down cleanly
       return handler_(boost::system::error_code(), 1);
 
- if (is_shut_down_received && !is_write_needed)
- return handler_(boost::asio::error::eof, 0);
-
- if (is_shut_down_received)
+ if (is_shut_down_received && !is_operation_done)
       // Shutdown has been requested, while we were reading or writing...
       // abort our action...
       return handler_(boost::asio::error::shut_down, 0);
@@ -226,7 +223,7 @@
 
         return start();
       }
- else if (is_read_needed)
+ else if (is_read_needed || (is_shut_down_sent && !is_shut_down_received))
       {
         return read_();
       }

Modified: branches/release/boost/asio/version.hpp
==============================================================================
--- branches/release/boost/asio/version.hpp (original)
+++ branches/release/boost/asio/version.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,6 +18,6 @@
 // BOOST_ASIO_VERSION % 100 is the sub-minor version
 // BOOST_ASIO_VERSION / 100 % 1000 is the minor version
 // BOOST_ASIO_VERSION / 100000 is the major version
-#define BOOST_ASIO_VERSION 100000 // 1.0.0
+#define BOOST_ASIO_VERSION 100100 // 1.1.0
 
 #endif // BOOST_ASIO_VERSION_HPP

Modified: branches/release/boost/asio/write.hpp
==============================================================================
--- branches/release/boost/asio/write.hpp (original)
+++ branches/release/boost/asio/write.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -167,7 +167,7 @@
 std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
     CompletionCondition completion_condition, boost::system::error_code& ec);
 
-/// Write a certain amount of data to a stream before returning.
+/// Write all of the supplied data to a stream before returning.
 /**
  * This function is used to write a certain number of bytes of data to a stream.
  * The call will block until one of the following conditions is true:
@@ -283,7 +283,7 @@
  */
 /*@{*/
 
-/// Start an asynchronous operation to write of all of the supplied data to a
+/// Start an asynchronous operation to write all of the supplied data to a
 /// stream.
 /**
  * This function is used to asynchronously write a certain number of bytes of
@@ -406,7 +406,7 @@
 void async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
     CompletionCondition completion_condition, WriteHandler handler);
 
-/// Start an asynchronous operation to write a certain amount of data to a
+/// Start an asynchronous operation to write all of the supplied data to a
 /// stream.
 /**
  * This function is used to asynchronously write a certain number of bytes of

Copied: branches/release/boost/asio/write_at.hpp (from r46319, /trunk/boost/asio/write_at.hpp)
==============================================================================
--- /trunk/boost/asio/write_at.hpp (original)
+++ branches/release/boost/asio/write_at.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -176,7 +176,7 @@
  */
 template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence,
     typename CompletionCondition>
-std::size_t write(SyncRandomAccessWriteDevice& d,
+std::size_t write_at(SyncRandomAccessWriteDevice& d,
     boost::uint64_t offset, const ConstBufferSequence& buffers,
     CompletionCondition completion_condition, boost::system::error_code& ec);
 
@@ -382,6 +382,8 @@
  * @param d The device to which the data is to be written. The type must support
  * the AsyncRandomAccessWriteDevice concept.
  *
+ * @param offset The offset at which the data will be written.
+ *
  * @param buffers One or more buffers containing the data to be written.
  * Although the buffers object may be copied as necessary, ownership of the
  * underlying memory blocks is retained by the caller, which must guarantee
@@ -451,6 +453,8 @@
  * @param d The device to which the data is to be written. The type must support
  * the AsyncRandomAccessWriteDevice concept.
  *
+ * @param offset The offset at which the data will be written.
+ *
  * @param b A basic_streambuf object from which data will be written. Ownership
  * of the streambuf is retained by the caller, which must guarantee that it
  * remains valid until the handler is called.
@@ -494,6 +498,8 @@
  * @param d The device to which the data is to be written. The type must support
  * the AsyncRandomAccessWriteDevice concept.
  *
+ * @param offset The offset at which the data will be written.
+ *
  * @param b A basic_streambuf object from which data will be written. Ownership
  * of the streambuf is retained by the caller, which must guarantee that it
  * remains valid until the handler is called.

Modified: branches/release/libs/asio/doc/design/implementation.qbk
==============================================================================
--- branches/release/libs/asio/doc/design/implementation.qbk (original)
+++ branches/release/libs/asio/doc/design/implementation.qbk 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -29,6 +29,9 @@
 resolution. This thread is created on the first call to either
 `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
 
+Scatter-Gather:
+
+* At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
 
 [heading Linux Kernel 2.6]
 
@@ -46,6 +49,10 @@
 resolution. This thread is created on the first call to either
 `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
 
+Scatter-Gather:
+
+* At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
+
 
 [heading Solaris]
 
@@ -63,6 +70,10 @@
 resolution. This thread is created on the first call to either
 `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
 
+Scatter-Gather:
+
+* At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
+
 
 [heading QNX Neutrino]
 
@@ -81,6 +92,10 @@
 resolution. This thread is created on the first call to either
 `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
 
+Scatter-Gather:
+
+* At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
+
 
 [heading Mac OS X]
 
@@ -98,6 +113,10 @@
 resolution. This thread is created on the first call to either
 `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
 
+Scatter-Gather:
+
+* At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
+
 
 [heading FreeBSD]
 
@@ -115,6 +134,10 @@
 resolution. This thread is created on the first call to either
 `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
 
+Scatter-Gather:
+
+* At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
+
 
 [heading AIX]
 
@@ -133,6 +156,10 @@
 resolution. This thread is created on the first call to either
 `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
 
+Scatter-Gather:
+
+* At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
+
 
 [heading HP-UX]
 
@@ -151,6 +178,10 @@
 resolution. This thread is created on the first call to either
 `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
 
+Scatter-Gather:
+
+* At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
+
 
 [heading Tru64]
 
@@ -169,6 +200,10 @@
 resolution. This thread is created on the first call to either
 `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
 
+Scatter-Gather:
+
+* At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
+
 
 [heading Windows 95, 98 and Me]
 
@@ -186,6 +221,10 @@
 resolution. This thread is created on the first call to either
 `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
 
+Scatter-Gather:
+
+* For sockets, at most 16 buffers may be transferred in a single operation.
+
 
 [heading Windows NT, 2000, XP, 2003 and Vista]
 
@@ -209,5 +248,12 @@
 resolution. This thread is created on the first call to either
 `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
 
+Scatter-Gather:
+
+* For sockets, at most 64 buffers may be transferred in a single operation.
+
+* For stream-oriented handles, only one buffer may be transferred in a single
+operation.
+
 
 [endsect]

Modified: branches/release/libs/asio/doc/quickref.xml
==============================================================================
--- branches/release/libs/asio/doc/quickref.xml (original)
+++ branches/release/libs/asio/doc/quickref.xml 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -37,13 +37,24 @@
             <listitem><link linkend="boost_asio.reference.ip__udp.endpoint">ip::udp::endpoint</link></listitem>
             <listitem><link linkend="boost_asio.reference.ip__udp.resolver">ip::udp::resolver</link></listitem>
             <listitem><link linkend="boost_asio.reference.ip__udp.socket">ip::udp::socket</link></listitem>
+ <listitem><link linkend="boost_asio.reference.local__stream_protocol">local::stream_protocol</link></listitem>
+ <listitem><link linkend="boost_asio.reference.local__stream_protocol.acceptor">local::stream_protocol::acceptor</link></listitem>
+ <listitem><link linkend="boost_asio.reference.local__stream_protocol.endpoint">local::stream_protocol::endpoint</link></listitem>
+ <listitem><link linkend="boost_asio.reference.local__stream_protocol.iostream">local::stream_protocol::iostream</link></listitem>
+ <listitem><link linkend="boost_asio.reference.local__stream_protocol.socket">local::stream_protocol::socket</link></listitem>
+ <listitem><link linkend="boost_asio.reference.local__datagram_protocol">local::datagram_protocol</link></listitem>
+ <listitem><link linkend="boost_asio.reference.local__datagram_protocol.endpoint">local::datagram_protocol::endpoint</link></listitem>
+ <listitem><link linkend="boost_asio.reference.local__datagram_protocol.socket">local::datagram_protocol::socket</link></listitem>
             <listitem><link linkend="boost_asio.reference.mutable_buffer">mutable_buffer</link></listitem>
             <listitem><link linkend="boost_asio.reference.mutable_buffers_1">mutable_buffers_1</link></listitem>
+ <listitem><link linkend="boost_asio.reference.posix__descriptor_base">posix::descriptor_base</link></listitem>
+ <listitem><link linkend="boost_asio.reference.posix__stream_descriptor">posix::stream_descriptor</link></listitem>
             <listitem><link linkend="boost_asio.reference.socket_base">socket_base</link></listitem>
             <listitem><link linkend="boost_asio.reference.ssl__context">ssl::context</link></listitem>
             <listitem><link linkend="boost_asio.reference.ssl__context_base">ssl::context_base</link></listitem>
             <listitem><link linkend="boost_asio.reference.ssl__stream_base">ssl::stream_base</link></listitem>
             <listitem><link linkend="boost_asio.reference.streambuf">streambuf</link></listitem>
+ <listitem><link linkend="boost_asio.reference.windows__stream_handle">windows::stream_handle</link></listitem>
           </itemizedlist>
         </entry>
         <entry valign="top">
@@ -66,18 +77,25 @@
             <listitem><link linkend="boost_asio.reference.ip__basic_resolver_entry">ip::basic_resolver_entry</link></listitem>
             <listitem><link linkend="boost_asio.reference.ip__basic_resolver_iterator">ip::basic_resolver_iterator</link></listitem>
             <listitem><link linkend="boost_asio.reference.ip__basic_resolver_query">ip::basic_resolver_query</link></listitem>
+ <listitem><link linkend="boost_asio.reference.local__basic_endpoint">local::basic_endpoint</link></listitem>
+ <listitem><link linkend="boost_asio.reference.posix__basic_descriptor">posix::basic_descriptor</link></listitem>
+ <listitem><link linkend="boost_asio.reference.posix__basic_stream_descriptor">posix::basic_stream_descriptor</link></listitem>
             <listitem><link linkend="boost_asio.reference.ssl__basic_context">ssl::basic_context</link></listitem>
             <listitem><link linkend="boost_asio.reference.ssl__stream">ssl::stream</link></listitem>
+ <listitem><link linkend="boost_asio.reference.windows__basic_handle">windows::basic_handle</link></listitem>
+ <listitem><link linkend="boost_asio.reference.windows__basic_stream_handle">windows::basic_stream_handle</link></listitem>
           </itemizedlist>
           <bridgehead renderas="sect3">Services</bridgehead>
           <itemizedlist>
             <listitem><link linkend="boost_asio.reference.datagram_socket_service">datagram_socket_service</link></listitem>
             <listitem><link linkend="boost_asio.reference.deadline_timer_service">deadline_timer_service</link></listitem>
             <listitem><link linkend="boost_asio.reference.ip__resolver_service">ip::resolver_service</link></listitem>
+ <listitem><link linkend="boost_asio.reference.posix__stream_descriptor_service">posix::stream_descriptor_service</link></listitem>
             <listitem><link linkend="boost_asio.reference.socket_acceptor_service">socket_acceptor_service</link></listitem>
             <listitem><link linkend="boost_asio.reference.ssl__context_service">ssl::context_service</link></listitem>
             <listitem><link linkend="boost_asio.reference.ssl__stream_service">ssl::stream_service</link></listitem>
             <listitem><link linkend="boost_asio.reference.stream_socket_service">stream_socket_service</link></listitem>
+ <listitem><link linkend="boost_asio.reference.windows__stream_handle_service">windows::stream_handle_service</link></listitem>
           </itemizedlist>
           <bridgehead renderas="sect3">Placeholders</bridgehead>
           <itemizedlist>
@@ -99,6 +117,7 @@
             <listitem><link linkend="boost_asio.reference.buffer">buffer</link></listitem>
             <listitem><link linkend="boost_asio.reference.has_service">has_service</link></listitem>
             <listitem><link linkend="boost_asio.reference.ip__host_name">ip::host_name</link></listitem>
+ <listitem><link linkend="boost_asio.reference.local__connect_pair">local::connect_pair</link></listitem>
             <listitem><link linkend="boost_asio.reference.read">read</link></listitem>
             <listitem><link linkend="boost_asio.reference.read_until">read_until</link></listitem>
             <listitem><link linkend="boost_asio.reference.transfer_all">transfer_all</link></listitem>
@@ -132,9 +151,11 @@
             <listitem><link linkend="boost_asio.reference.ConvertibleToConstBuffer">ConvertibleToConstBuffer</link></listitem>
             <listitem><link linkend="boost_asio.reference.ConvertibleToMutableBuffer">ConvertibleToMutableBuffer</link></listitem>
             <listitem><link linkend="boost_asio.reference.DatagramSocketService">DatagramSocketService</link></listitem>
+ <listitem><link linkend="boost_asio.reference.DescriptorService">DescriptorService</link></listitem>
             <listitem><link linkend="boost_asio.reference.Endpoint">Endpoint</link></listitem>
             <listitem><link linkend="boost_asio.reference.GettableSocketOption">GettableSocketOption</link></listitem>
             <listitem><link linkend="boost_asio.reference.Handler">Handler</link></listitem>
+ <listitem><link linkend="boost_asio.reference.HandleService">HandleService</link></listitem>
             <listitem><link linkend="boost_asio.reference.InternetProtocol">InternetProtocol</link></listitem>
             <listitem><link linkend="boost_asio.reference.IoControlCommand">IoControlCommand</link></listitem>
             <listitem><link linkend="boost_asio.reference.IoObjectService">IoObjectService</link></listitem>
@@ -147,6 +168,8 @@
             <listitem><link linkend="boost_asio.reference.SettableSocketOption">SettableSocketOption</link></listitem>
             <listitem><link linkend="boost_asio.reference.SocketAcceptorService">SocketAcceptorService</link></listitem>
             <listitem><link linkend="boost_asio.reference.SocketService">SocketService</link></listitem>
+ <listitem><link linkend="boost_asio.reference.StreamDescriptorService">StreamDescriptorService</link></listitem>
+ <listitem><link linkend="boost_asio.reference.StreamHandleService">StreamHandleService</link></listitem>
             <listitem><link linkend="boost_asio.reference.StreamSocketService">StreamSocketService</link></listitem>
             <listitem><link linkend="boost_asio.reference.SyncReadStream">SyncReadStream</link></listitem>
             <listitem><link linkend="boost_asio.reference.SyncWriteStream">SyncWriteStream</link></listitem>

Modified: branches/release/libs/asio/doc/reference.dox
==============================================================================
--- branches/release/libs/asio/doc/reference.dox (original)
+++ branches/release/libs/asio/doc/reference.dox 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -76,7 +76,10 @@
                          ./../../../boost/asio \
                          ./../../../boost/asio/impl \
                          ./../../../boost/asio/ip \
+ ./../../../boost/asio/local \
+ ./../../../boost/asio/posix \
                          ./../../../boost/asio/ssl \
+ ./../../../boost/asio/windows \
                          ./noncopyable_dox.txt \
                          ./std_exception_dox.txt
 FILE_PATTERNS =

Modified: branches/release/libs/asio/doc/reference.qbk
==============================================================================
--- branches/release/libs/asio/doc/reference.qbk (original)
+++ branches/release/libs/asio/doc/reference.qbk 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -19,9 +19,11 @@
 [include requirements/ConvertibleToConstBuffer.qbk]
 [include requirements/ConvertibleToMutableBuffer.qbk]
 [include requirements/DatagramSocketService.qbk]
+[include requirements/DescriptorService.qbk]
 [include requirements/Endpoint.qbk]
 [include requirements/GettableSocketOption.qbk]
 [include requirements/Handler.qbk]
+[include requirements/HandleService.qbk]
 [include requirements/InternetProtocol.qbk]
 [include requirements/IoControlCommand.qbk]
 [include requirements/IoObjectService.qbk]
@@ -34,6 +36,8 @@
 [include requirements/SettableSocketOption.qbk]
 [include requirements/SocketAcceptorService.qbk]
 [include requirements/SocketService.qbk]
+[include requirements/StreamDescriptorService.qbk]
+[include requirements/StreamHandleService.qbk]
 [include requirements/StreamSocketService.qbk]
 [include requirements/SyncReadStream.qbk]
 [include requirements/SyncWriteStream.qbk]
@@ -555,6 +559,364 @@
 
 [endsect]
 
+[section:async_read_at async_read_at]
+
+Start an asynchronous operation to read a certain amount of data at the specified offset.
+
+ template<
+ typename ``[link boost_asio.reference.AsyncRandomAccessReadDevice AsyncRandomAccessReadDevice]``,
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void ``[link boost_asio.reference.async_read_at.overload1 async_read_at]``(
+ AsyncRandomAccessReadDevice & d,
+ boost::uint64_t offset,
+ const MutableBufferSequence & buffers,
+ ReadHandler handler);
+
+ template<
+ typename ``[link boost_asio.reference.AsyncRandomAccessReadDevice AsyncRandomAccessReadDevice]``,
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename CompletionCondition,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void ``[link boost_asio.reference.async_read_at.overload2 async_read_at]``(
+ AsyncRandomAccessReadDevice & d,
+ boost::uint64_t offset,
+ const MutableBufferSequence & buffers,
+ CompletionCondition completion_condition,
+ ReadHandler handler);
+
+ template<
+ typename ``[link boost_asio.reference.AsyncRandomAccessReadDevice AsyncRandomAccessReadDevice]``,
+ typename Allocator,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void ``[link boost_asio.reference.async_read_at.overload3 async_read_at]``(
+ AsyncRandomAccessReadDevice & d,
+ boost::uint64_t offset,
+ basic_streambuf< Allocator > & b,
+ ReadHandler handler);
+
+ template<
+ typename ``[link boost_asio.reference.AsyncRandomAccessReadDevice AsyncRandomAccessReadDevice]``,
+ typename Allocator,
+ typename CompletionCondition,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void ``[link boost_asio.reference.async_read_at.overload4 async_read_at]``(
+ AsyncRandomAccessReadDevice & d,
+ boost::uint64_t offset,
+ basic_streambuf< Allocator > & b,
+ CompletionCondition completion_condition,
+ ReadHandler handler);
+
+
+[section:overload1 async_read_at (1 of 4 overloads)]
+
+Start an asynchronous operation to read a certain amount of data at the specified offset.
+
+ template<
+ typename ``[link boost_asio.reference.AsyncRandomAccessReadDevice AsyncRandomAccessReadDevice]``,
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_read_at(
+ AsyncRandomAccessReadDevice & d,
+ boost::uint64_t offset,
+ const MutableBufferSequence & buffers,
+ ReadHandler handler);
+
+
+This function is used to asynchronously read a certain number of bytes of data from a random access device at the specified offset. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
+
+
+* The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
+
+* An error occurred.
+
+This operation is implemented in terms of one or more calls to the device's async\_read\_some\_at function.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[d][The device from which the data is to be read. The type must support the AsyncRandomAccessReadDevice concept.]]
+
+[[offset][The offset at which the data will be read.]]
+
+[[buffers][One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the device. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+
+[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ // Result of operation.
+ const boost::system::error_code& error,
+
+ // Number of bytes copied into the buffers. If an error
+ // occurred, this will be the number of bytes successfully
+ // transferred prior to the error.
+ std::size_t bytes_transferred
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
+
+]
+
+[heading Example]
+
+To read into a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ boost::asio::async_read_at(d, 42, boost::asio::buffer(data, size), handler);
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+
+[heading Remarks]
+
+This overload is equivalent to calling:
+
+ boost::asio::async_read_at(
+ d, 42, buffers,
+ boost::asio::transfer_all(),
+ handler);
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 async_read_at (2 of 4 overloads)]
+
+Start an asynchronous operation to read a certain amount of data at the specified offset.
+
+ template<
+ typename ``[link boost_asio.reference.AsyncRandomAccessReadDevice AsyncRandomAccessReadDevice]``,
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename CompletionCondition,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_read_at(
+ AsyncRandomAccessReadDevice & d,
+ boost::uint64_t offset,
+ const MutableBufferSequence & buffers,
+ CompletionCondition completion_condition,
+ ReadHandler handler);
+
+
+This function is used to asynchronously read a certain number of bytes of data from a random access device at the specified offset. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
+
+
+* The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
+
+* The completion_condition function object returns true.
+
+[heading Parameters]
+
+
+[variablelist
+
+[[d][The device from which the data is to be read. The type must support the AsyncRandomAccessReadDevice concept.]]
+
+[[offset][The offset at which the data will be read.]]
+
+[[buffers][One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the device. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+
+[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
+``
+ bool completion_condition(
+ // Result of latest read_some_at operation.
+ const boost::system::error_code& error,
+
+ // Number of bytes transferred so far.
+ std::size_t bytes_transferred
+ );
+
+``
+A return value of true indicates that the read operation is complete. False indicates that further calls to the device's async\_read\_some\_at function are required.]]
+
+[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ // Result of operation.
+ const boost::system::error_code& error,
+
+ // Number of bytes copied into the buffers. If an error
+ // occurred, this will be the number of bytes successfully
+ // transferred prior to the error.
+ std::size_t bytes_transferred
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
+
+]
+
+[heading Example]
+
+To read into a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ boost::asio::async_read_at(d, 42,
+ boost::asio::buffer(data, size),
+ boost::asio::transfer_at_least(32),
+ handler);
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+
+
+
+[endsect]
+
+
+
+[section:overload3 async_read_at (3 of 4 overloads)]
+
+Start an asynchronous operation to read a certain amount of data at the specified offset.
+
+ template<
+ typename ``[link boost_asio.reference.AsyncRandomAccessReadDevice AsyncRandomAccessReadDevice]``,
+ typename Allocator,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_read_at(
+ AsyncRandomAccessReadDevice & d,
+ boost::uint64_t offset,
+ basic_streambuf< Allocator > & b,
+ ReadHandler handler);
+
+
+This function is used to asynchronously read a certain number of bytes of data from a random access device at the specified offset. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
+
+
+* An error occurred.
+
+This operation is implemented in terms of one or more calls to the device's async\_read\_some\_at function.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[d][The device from which the data is to be read. The type must support the AsyncRandomAccessReadDevice concept.]]
+
+[[offset][The offset at which the data will be read.]]
+
+[[b][A basic\_streambuf object into which the data will be read. Ownership of the streambuf is retained by the caller, which must guarantee that it remains valid until the handler is called.]]
+
+[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ // Result of operation.
+ const boost::system::error_code& error,
+
+ // Number of bytes copied into the buffers. If an error
+ // occurred, this will be the number of bytes successfully
+ // transferred prior to the error.
+ std::size_t bytes_transferred
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
+
+]
+
+[heading Remarks]
+
+This overload is equivalent to calling:
+
+ boost::asio::async_read_at(
+ d, 42, b,
+ boost::asio::transfer_all(),
+ handler);
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:overload4 async_read_at (4 of 4 overloads)]
+
+Start an asynchronous operation to read a certain amount of data at the specified offset.
+
+ template<
+ typename ``[link boost_asio.reference.AsyncRandomAccessReadDevice AsyncRandomAccessReadDevice]``,
+ typename Allocator,
+ typename CompletionCondition,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_read_at(
+ AsyncRandomAccessReadDevice & d,
+ boost::uint64_t offset,
+ basic_streambuf< Allocator > & b,
+ CompletionCondition completion_condition,
+ ReadHandler handler);
+
+
+This function is used to asynchronously read a certain number of bytes of data from a random access device at the specified offset. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
+
+
+* The completion_condition function object returns true.
+
+This operation is implemented in terms of one or more calls to the device's async\_read\_some\_at function.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[d][The device from which the data is to be read. The type must support the AsyncRandomAccessReadDevice concept.]]
+
+[[offset][The offset at which the data will be read.]]
+
+[[b][A basic\_streambuf object into which the data will be read. Ownership of the streambuf is retained by the caller, which must guarantee that it remains valid until the handler is called.]]
+
+[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
+``
+ bool completion_condition(
+ // Result of latest read_some_at operation.
+ const boost::system::error_code& error,
+
+ // Number of bytes transferred so far.
+ std::size_t bytes_transferred
+ );
+
+``
+A return value of true indicates that the read operation is complete. False indicates that further calls to the device's async\_read\_some\_at function are required.]]
+
+[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ // Result of operation.
+ const boost::system::error_code& error,
+
+ // Number of bytes copied into the buffers. If an error
+ // occurred, this will be the number of bytes successfully
+ // transferred prior to the error.
+ std::size_t bytes_transferred
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post(). ]]
+
+]
+
+
+
+[endsect]
+
+
+[endsect]
+
 [section:async_read_until async_read_until]
 
 Start an asynchronous operation to read data into a streambuf until a delimiter is encountered.
@@ -589,8 +951,20 @@
       const boost::regex & expr,
       ReadHandler handler);
 
+ template<
+ typename ``[link boost_asio.reference.AsyncReadStream AsyncReadStream]``,
+ typename Allocator,
+ typename ``[link boost_asio.reference.MatchCondition MatchCondition]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void ``[link boost_asio.reference.async_read_until.overload4 async_read_until]``(
+ AsyncReadStream & s,
+ boost::asio::basic_streambuf< Allocator > & b,
+ MatchCondition match_condition,
+ ReadHandler handler,
+ typename boost::enable_if< is_match_condition< MatchCondition > >::type * = 0);
+
 
-[section:overload1 async_read_until (1 of 3 overloads)]
+[section:overload1 async_read_until (1 of 4 overloads)]
 
 Start an asynchronous operation to read data into a streambuf until a delimiter is encountered.
 
@@ -670,7 +1044,7 @@
 
 
 
-[section:overload2 async_read_until (2 of 3 overloads)]
+[section:overload2 async_read_until (2 of 4 overloads)]
 
 Start an asynchronous operation to read data into a streambuf until a delimiter is encountered.
 
@@ -750,7 +1124,7 @@
 
 
 
-[section:overload3 async_read_until (3 of 3 overloads)]
+[section:overload3 async_read_until (3 of 4 overloads)]
 
 Start an asynchronous operation to read data into a streambuf until a regular expression is located.
 
@@ -831,11 +1205,145 @@
 [endsect]
 
 
+
+[section:overload4 async_read_until (4 of 4 overloads)]
+
+Start an asynchronous operation to read data into a streambuf until a function object indicates a match.
+
+ template<
+ typename ``[link boost_asio.reference.AsyncReadStream AsyncReadStream]``,
+ typename Allocator,
+ typename ``[link boost_asio.reference.MatchCondition MatchCondition]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_read_until(
+ AsyncReadStream & s,
+ boost::asio::basic_streambuf< Allocator > & b,
+ MatchCondition match_condition,
+ ReadHandler handler,
+ typename boost::enable_if< is_match_condition< MatchCondition > >::type * = 0);
+
+
+This function is used to asynchronously read data into the specified streambuf until a user-defined match condition function object, when applied to the data contained in the streambuf, indicates a successful match. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
+
+
+* The match condition function object returns a std::pair where the second element evaluates to true.
+
+* An error occurred.
+
+This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function. If the match condition function object already indicates a match, the operation completes immediately.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[s][The stream from which the data is to be read. The type must support the AsyncReadStream concept.]]
+
+[[b][A streambuf object into which the data will be read.]]
+
+[[match_condition][The function object to be called to determine whether a match exists. The signature of the function object must be:
+``
+ pair<iterator, bool> match_condition(iterator begin, iterator end);
+
+``
+where iterator represents the type:
+``
+ buffers_iterator<basic_streambuf<Allocator>::const_buffers_type>
+
+``
+The iterator parameters begin and end define the range of bytes to be scanned to determine whether there is a match. The first member of the return value is an iterator marking one-past-the-end of the bytes that have been consumed by the match function. This iterator is used to calculate the begin parameter for any subsequent invocation of the match condition. The second member of the return value is true if a match has been found, false otherwise.]]
+
+[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ // Result of operation.
+ const boost::system::error_code& error,
+
+ // The number of bytes in the streambuf's get
+ // area that have been fully consumed by the
+ // match function. O if an error occurred.
+ std::size_t bytes_transferred
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
+
+]
+
+[heading Remarks]
+
+The default implementation of the is_match_condition type trait evaluates to true for function pointers and function objects with a result\_type typedef. It must be specialised for other user-defined function objects.
+
+[heading Examples]
+
+To asynchronously read data into a streambuf until whitespace is encountered:
+
+ typedef boost::asio::buffers_iterator<
+ boost::asio::streambuf::const_buffers_type> iterator;
+
+ std::pair<iterator, bool>
+ match_whitespace(iterator begin, iterator end)
+ {
+ iterator i = begin;
+ while (i != end)
+ if (std::isspace(*i++))
+ return std::make_pair(i, true);
+ return std::make_pair(i, false);
+ }
+ ...
+ void handler(const boost::system::error_code& e, std::size_t size);
+ ...
+ boost::asio::streambuf b;
+ boost::asio::async_read_until(s, b, match_whitespace, handler);
+
+
+
+
+To asynchronously read data into a streambuf until a matching character is found:
+
+ class match_char
+ {
+ public:
+ explicit match_char(char c) : c_(c) {}
+
+ template <typename Iterator>
+ std::pair<Iterator, bool> operator()(
+ Iterator begin, Iterator end) const
+ {
+ Iterator i = begin;
+ while (i != end)
+ if (c_ == *i++)
+ return std::make_pair(i, true);
+ return std::make_pair(i, false);
+ }
+
+ private:
+ char c_;
+ };
+
+ namespace asio {
+ template <> struct is_match_condition<match_char>
+ : public boost::true_type {};
+ } // namespace asio
+ ...
+ void handler(const boost::system::error_code& e, std::size_t size);
+ ...
+ boost::asio::streambuf b;
+ boost::asio::async_read_until(s, b, match_char('a'), handler);
+
+
+
+
+
+[endsect]
+
+
 [endsect]
 
 [section:async_write async_write]
 
-Start an asynchronous operation to write of all of the supplied data to a stream.
+Start an asynchronous operation to write all of the supplied data to a stream.
 
   template<
       typename ``[link boost_asio.reference.AsyncWriteStream AsyncWriteStream]``,
@@ -880,7 +1388,7 @@
 
 [section:overload1 async_write (1 of 4 overloads)]
 
-Start an asynchronous operation to write of all of the supplied data to a stream.
+Start an asynchronous operation to write all of the supplied data to a stream.
 
   template<
       typename ``[link boost_asio.reference.AsyncWriteStream AsyncWriteStream]``,
@@ -1030,7 +1538,7 @@
 
 [section:overload3 async_write (3 of 4 overloads)]
 
-Start an asynchronous operation to write a certain amount of data to a stream.
+Start an asynchronous operation to write all of the supplied data to a stream.
 
   template<
       typename ``[link boost_asio.reference.AsyncWriteStream AsyncWriteStream]``,
@@ -1154,160 +1662,497 @@
 
 [endsect]
 
-[section:basic_datagram_socket basic_datagram_socket]
+[section:async_write_at async_write_at]
 
-Provides datagram-oriented socket functionality.
+Start an asynchronous operation to write all of the supplied data at the specified offset.
 
   template<
- typename ``[link boost_asio.reference.Protocol Protocol]``,
- typename ``[link boost_asio.reference.DatagramSocketService DatagramSocketService]`` = datagram_socket_service<Protocol>>
- class basic_datagram_socket :
- public basic_socket< Protocol, DatagramSocketService >
+ typename ``[link boost_asio.reference.AsyncRandomAccessWriteDevice AsyncRandomAccessWriteDevice]``,
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void ``[link boost_asio.reference.async_write_at.overload1 async_write_at]``(
+ AsyncRandomAccessWriteDevice & d,
+ boost::uint64_t offset,
+ const ConstBufferSequence & buffers,
+ WriteHandler handler);
 
+ template<
+ typename ``[link boost_asio.reference.AsyncRandomAccessWriteDevice AsyncRandomAccessWriteDevice]``,
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename CompletionCondition,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void ``[link boost_asio.reference.async_write_at.overload2 async_write_at]``(
+ AsyncRandomAccessWriteDevice & d,
+ boost::uint64_t offset,
+ const ConstBufferSequence & buffers,
+ CompletionCondition completion_condition,
+ WriteHandler handler);
 
-[heading Types]
-[table
- [[Name][Description]]
+ template<
+ typename ``[link boost_asio.reference.AsyncRandomAccessWriteDevice AsyncRandomAccessWriteDevice]``,
+ typename Allocator,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void ``[link boost_asio.reference.async_write_at.overload3 async_write_at]``(
+ AsyncRandomAccessWriteDevice & d,
+ boost::uint64_t offset,
+ basic_streambuf< Allocator > & b,
+ WriteHandler handler);
 
- [
+ template<
+ typename ``[link boost_asio.reference.AsyncRandomAccessWriteDevice AsyncRandomAccessWriteDevice]``,
+ typename Allocator,
+ typename CompletionCondition,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void ``[link boost_asio.reference.async_write_at.overload4 async_write_at]``(
+ AsyncRandomAccessWriteDevice & d,
+ boost::uint64_t offset,
+ basic_streambuf< Allocator > & b,
+ CompletionCondition completion_condition,
+ WriteHandler handler);
 
- [[link boost_asio.reference.basic_datagram_socket.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
 
- [
+[section:overload1 async_write_at (1 of 4 overloads)]
 
- [[link boost_asio.reference.basic_datagram_socket.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
+Start an asynchronous operation to write all of the supplied data at the specified offset.
 
- [
+ template<
+ typename ``[link boost_asio.reference.AsyncRandomAccessWriteDevice AsyncRandomAccessWriteDevice]``,
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_write_at(
+ AsyncRandomAccessWriteDevice & d,
+ boost::uint64_t offset,
+ const ConstBufferSequence & buffers,
+ WriteHandler handler);
 
- [[link boost_asio.reference.basic_datagram_socket.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
 
- [
+This function is used to asynchronously write a certain number of bytes of data to a random access device at a specified offset. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
 
- [[link boost_asio.reference.basic_datagram_socket.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
 
- [
+* All of the data in the supplied buffers has been written. That is, the bytes transferred is equal to the sum of the buffer sizes.
 
- [[link boost_asio.reference.basic_datagram_socket.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
+* An error occurred.
 
- [
+This operation is implemented in terms of one or more calls to the device's async\_write\_some\_at function.
 
- [[link boost_asio.reference.basic_datagram_socket.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
 
- [
+[heading Parameters]
+
 
- [[link boost_asio.reference.basic_datagram_socket.implementation_type [*implementation_type]]]
- [The underlying implementation type of I/O object. ]
+[variablelist
   
- ]
+[[d][The device to which the data is to be written. The type must support the AsyncRandomAccessWriteDevice concept.]]
 
- [
+[[offset][The offset at which the data will be written.]]
 
- [[link boost_asio.reference.basic_datagram_socket.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
+[[buffers][One or more buffers containing the data to be written. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
 
- [
+[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ // Result of operation.
+ const boost::system::error_code& error,
 
- [[link boost_asio.reference.basic_datagram_socket.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
+ // Number of bytes written from the buffers. If an error
+ // occurred, this will be less than the sum of the buffer sizes.
+ std::size_t bytes_transferred
+ );
 
- [
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
 
- [[link boost_asio.reference.basic_datagram_socket.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
+]
+
+[heading Example]
   
- ]
+To write a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
 
- [
+ boost::asio::async_write_at(d, 42, boost::asio::buffer(data, size), handler);
 
- [[link boost_asio.reference.basic_datagram_socket.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
 
- [
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
- [[link boost_asio.reference.basic_datagram_socket.native_type [*native_type]]]
- [The native representation of a socket. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.basic_datagram_socket.non_blocking_io [*non_blocking_io]]]
- [IO control command to set the blocking mode of the socket. ]
-
- ]
+[endsect]
 
- [
 
- [[link boost_asio.reference.basic_datagram_socket.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
 
- [
+[section:overload2 async_write_at (2 of 4 overloads)]
 
- [[link boost_asio.reference.basic_datagram_socket.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
+Start an asynchronous operation to write a certain amount of data at the specified offset.
 
- [
+ template<
+ typename ``[link boost_asio.reference.AsyncRandomAccessWriteDevice AsyncRandomAccessWriteDevice]``,
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename CompletionCondition,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_write_at(
+ AsyncRandomAccessWriteDevice & d,
+ boost::uint64_t offset,
+ const ConstBufferSequence & buffers,
+ CompletionCondition completion_condition,
+ WriteHandler handler);
 
- [[link boost_asio.reference.basic_datagram_socket.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
 
- [
+This function is used to asynchronously write a certain number of bytes of data to a random access device at a specified offset. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
 
- [[link boost_asio.reference.basic_datagram_socket.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
 
- [
+* All of the data in the supplied buffers has been written. That is, the bytes transferred is equal to the sum of the buffer sizes.
 
- [[link boost_asio.reference.basic_datagram_socket.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
+* The completion_condition function object returns true.
 
- [
+This operation is implemented in terms of one or more calls to the device's async\_write\_some\_at function.
 
- [[link boost_asio.reference.basic_datagram_socket.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
 
- [
+[heading Parameters]
+
 
- [[link boost_asio.reference.basic_datagram_socket.service_type [*service_type]]]
- [The type of the service that will be used to provide I/O operations. ]
+[variablelist
   
- ]
+[[d][The device to which the data is to be written. The type must support the AsyncRandomAccessWriteDevice concept.]]
+
+[[offset][The offset at which the data will be written.]]
+
+[[buffers][One or more buffers containing the data to be written. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+
+[[completion_condition][The function object to be called to determine whether the write operation is complete. The signature of the function object must be:
+``
+ bool completion_condition(
+ // Result of latest write_some_at operation.
+ const boost::system::error_code& error,
+
+ // Number of bytes transferred so far.
+ std::size_t bytes_transferred
+ );
+
+``
+A return value of true indicates that the write operation is complete. False indicates that further calls to the device's async\_write\_some\_at function are required.]]
+
+[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ // Result of operation.
+ const boost::system::error_code& error,
+
+ // Number of bytes written from the buffers. If an error
+ // occurred, this will be less than the sum of the buffer sizes.
+ std::size_t bytes_transferred
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
+
+]
+
+[heading Example]
+
+To write a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ boost::asio::async_write_at(d, 42,
+ boost::asio::buffer(data, size),
+ boost::asio::transfer_at_least(32),
+ handler);
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+
+
+
+[endsect]
+
+
+
+[section:overload3 async_write_at (3 of 4 overloads)]
+
+Start an asynchronous operation to write all of the supplied data at the specified offset.
+
+ template<
+ typename ``[link boost_asio.reference.AsyncRandomAccessWriteDevice AsyncRandomAccessWriteDevice]``,
+ typename Allocator,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_write_at(
+ AsyncRandomAccessWriteDevice & d,
+ boost::uint64_t offset,
+ basic_streambuf< Allocator > & b,
+ WriteHandler handler);
+
+
+This function is used to asynchronously write a certain number of bytes of data to a random access device at a specified offset. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
+
+
+* All of the data in the supplied basic_streambuf has been written.
+
+* An error occurred.
+
+This operation is implemented in terms of one or more calls to the device's async\_write\_some\_at function.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[d][The device to which the data is to be written. The type must support the AsyncRandomAccessWriteDevice concept.]]
+
+[[offset][The offset at which the data will be written.]]
+
+[[b][A basic\_streambuf object from which data will be written. Ownership of the streambuf is retained by the caller, which must guarantee that it remains valid until the handler is called.]]
+
+[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ // Result of operation.
+ const boost::system::error_code& error,
+
+ // Number of bytes written from the buffers. If an error
+ // occurred, this will be less than the sum of the buffer sizes.
+ std::size_t bytes_transferred
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post(). ]]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:overload4 async_write_at (4 of 4 overloads)]
+
+Start an asynchronous operation to write a certain amount of data at the specified offset.
+
+ template<
+ typename ``[link boost_asio.reference.AsyncRandomAccessWriteDevice AsyncRandomAccessWriteDevice]``,
+ typename Allocator,
+ typename CompletionCondition,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_write_at(
+ AsyncRandomAccessWriteDevice & d,
+ boost::uint64_t offset,
+ basic_streambuf< Allocator > & b,
+ CompletionCondition completion_condition,
+ WriteHandler handler);
+
+
+This function is used to asynchronously write a certain number of bytes of data to a random access device at a specified offset. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
+
+
+* All of the data in the supplied basic_streambuf has been written.
+
+* The completion_condition function object returns true.
+
+This operation is implemented in terms of one or more calls to the device's async\_write\_some\_at function.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[d][The device to which the data is to be written. The type must support the AsyncRandomAccessWriteDevice concept.]]
+
+[[offset][The offset at which the data will be written.]]
+
+[[b][A basic\_streambuf object from which data will be written. Ownership of the streambuf is retained by the caller, which must guarantee that it remains valid until the handler is called.]]
+
+[[completion_condition][The function object to be called to determine whether the write operation is complete. The signature of the function object must be:
+``
+ bool completion_condition(
+ // Result of latest async_write_some_at operation.
+ const boost::system::error_code& error,
+
+ // Number of bytes transferred so far.
+ std::size_t bytes_transferred
+ );
+
+``
+A return value of true indicates that the write operation is complete. False indicates that further calls to the device's async\_write\_some\_at function are required.]]
+
+[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ // Result of operation.
+ const boost::system::error_code& error,
+
+ // Number of bytes written from the buffers. If an error
+ // occurred, this will be less than the sum of the buffer sizes.
+ std::size_t bytes_transferred
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post(). ]]
+
+]
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:basic_datagram_socket basic_datagram_socket]
+
+Provides datagram-oriented socket functionality.
+
+ template<
+ typename ``[link boost_asio.reference.Protocol Protocol]``,
+ typename ``[link boost_asio.reference.DatagramSocketService DatagramSocketService]`` = datagram_socket_service<Protocol>>
+ class basic_datagram_socket :
+ public basic_socket< Protocol, DatagramSocketService >
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.broadcast [*broadcast]]]
+ [Socket option to permit sending of broadcast messages. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.bytes_readable [*bytes_readable]]]
+ [IO control command to get the amount of data that can be read without blocking. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.debug [*debug]]]
+ [Socket option to enable socket-level debugging. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.do_not_route [*do_not_route]]]
+ [Socket option to prevent routing, use local interfaces only. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.enable_connection_aborted [*enable_connection_aborted]]]
+ [Socket option to report aborted connections on accept. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.endpoint_type [*endpoint_type]]]
+ [The endpoint type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.keep_alive [*keep_alive]]]
+ [Socket option to send keep-alives. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.linger [*linger]]]
+ [Socket option to specify whether the socket lingers on close if unsent data is present. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_socket is always the lowest layer. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.message_flags [*message_flags]]]
+ [Bitmask type for flags that can be passed to send and receive operations. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.native_type [*native_type]]]
+ [The native representation of a socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.non_blocking_io [*non_blocking_io]]]
+ [IO control command to set the blocking mode of the socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.protocol_type [*protocol_type]]]
+ [The protocol type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.receive_buffer_size [*receive_buffer_size]]]
+ [Socket option for the receive buffer size of a socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.receive_low_watermark [*receive_low_watermark]]]
+ [Socket option for the receive low watermark. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.reuse_address [*reuse_address]]]
+ [Socket option to allow the socket to be bound to an address that is already in use. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.send_buffer_size [*send_buffer_size]]]
+ [Socket option for the send buffer size of a socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.send_low_watermark [*send_low_watermark]]]
+ [Socket option for the send low watermark. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
+
+ ]
 
   [
 
@@ -1495,6 +2340,22 @@
 
 ]
 
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_datagram_socket.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_datagram_socket.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
+
+]
+
 The basic_datagram_socket class template provides asynchronous and blocking datagram-oriented socket functionality.
 
 
@@ -3207,6 +4068,21 @@
 [endsect]
 
 
+[section:implementation basic_datagram_socket::implementation]
+
+
+['Inherited from basic_io_object.]
+
+The underlying implementation of the I/O object.
+
+ implementation_type implementation;
+
+
+
+[endsect]
+
+
+
 [section:implementation_type basic_datagram_socket::implementation_type]
 
 
@@ -3862,6 +4738,17 @@
   
 ]
 
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_socket._basic_socket [*~basic_socket]]]
+ [Protected destructor to prevent deletion through this type. ]
+ ]
+
+]
+
 [heading Data Members]
 [table
   [[Name][Description]]
@@ -3888,6 +4775,22 @@
 
 ]
 
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_socket.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
+
+]
+
 The basic_socket class template provides functionality that is common to both stream-oriented and datagram-oriented sockets.
 
 
@@ -5165,6 +6068,21 @@
 [endsect]
 
 
+[section:service basic_datagram_socket::service]
+
+
+['Inherited from basic_io_object.]
+
+The service associated with the I/O object.
+
+ service_type & service;
+
+
+
+[endsect]
+
+
+
 [section:service_type basic_datagram_socket::service_type]
 
 
@@ -5539,6 +6457,22 @@
   
 ]
 
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_deadline_timer.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_deadline_timer.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
+
+]
+
 The basic_deadline_timer class template provides the ability to perform a blocking or asynchronous wait for a timer to expire.
 
 Most applications will use the boost::asio::deadline\_timer typedef.
@@ -6081,6 +7015,21 @@
 
 
 
+[section:implementation basic_deadline_timer::implementation]
+
+
+['Inherited from basic_io_object.]
+
+The underlying implementation of the I/O object.
+
+ implementation_type implementation;
+
+
+
+[endsect]
+
+
+
 [section:implementation_type basic_deadline_timer::implementation_type]
 
 
@@ -6120,6 +7069,21 @@
 
 
 
+[section:service basic_deadline_timer::service]
+
+
+['Inherited from basic_io_object.]
+
+The service associated with the I/O object.
+
+ service_type & service;
+
+
+
+[endsect]
+
+
+
 [section:service_type basic_deadline_timer::service_type]
 
 
@@ -6272,6 +7236,58 @@
   
 ]
 
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_io_object.basic_io_object [*basic_io_object]]]
+ [Construct a basic_io_object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_io_object._basic_io_object [*~basic_io_object]]]
+ [Protected destructor to prevent deletion through this type. ]
+ ]
+
+]
+
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_io_object.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_io_object.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
+
+]
+
+
+[section:basic_io_object basic_io_object::basic_io_object]
+
+Construct a basic_io_object.
+
+ basic_io_object(
+ boost::asio::io_service & io_service);
+
+
+Performs:
+
+ service.construct(implementation);
+
+
+
+
+
+[endsect]
+
+
 
 [section:get_io_service basic_io_object::get_io_service]
 
@@ -6293,6 +7309,18 @@
 
 
 
+[section:implementation basic_io_object::implementation]
+
+The underlying implementation of the I/O object.
+
+ implementation_type implementation;
+
+
+
+[endsect]
+
+
+
 [section:implementation_type basic_io_object::implementation_type]
 
 The underlying implementation type of I/O object.
@@ -6326,6 +7354,18 @@
 
 
 
+[section:service basic_io_object::service]
+
+The service associated with the I/O object.
+
+ service_type & service;
+
+
+
+[endsect]
+
+
+
 [section:service_type basic_io_object::service_type]
 
 The type of the service that will be used to provide I/O operations.
@@ -6339,18 +7379,36 @@
 
 
 
+[section:_basic_io_object basic_io_object::~basic_io_object]
+
+Protected destructor to prevent deletion through this type.
+
+ ~basic_io_object();
+
+
+Performs:
+
+ service.destroy(implementation);
+
+
+
+
+
 [endsect]
 
-[section:basic_socket basic_socket]
 
-Provides socket functionality.
+
+[endsect]
+
+[section:basic_raw_socket basic_raw_socket]
+
+Provides raw-oriented socket functionality.
 
   template<
       typename ``[link boost_asio.reference.Protocol Protocol]``,
- typename ``[link boost_asio.reference.SocketService SocketService]``>
- class basic_socket :
- public basic_io_object< SocketService >,
- public socket_base
+ typename ``[link boost_asio.reference.RawSocketService RawSocketService]`` = raw_socket_service<Protocol>>
+ class basic_raw_socket :
+ public basic_socket< Protocol, RawSocketService >
 
 
 [heading Types]
@@ -6359,147 +7417,147 @@
 
   [
 
- [[link boost_asio.reference.basic_socket.broadcast [*broadcast]]]
+ [[link boost_asio.reference.basic_raw_socket.broadcast [*broadcast]]]
     [Socket option to permit sending of broadcast messages. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket.bytes_readable [*bytes_readable]]]
+ [[link boost_asio.reference.basic_raw_socket.bytes_readable [*bytes_readable]]]
     [IO control command to get the amount of data that can be read without blocking. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket.debug [*debug]]]
+ [[link boost_asio.reference.basic_raw_socket.debug [*debug]]]
     [Socket option to enable socket-level debugging. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket.do_not_route [*do_not_route]]]
+ [[link boost_asio.reference.basic_raw_socket.do_not_route [*do_not_route]]]
     [Socket option to prevent routing, use local interfaces only. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket.enable_connection_aborted [*enable_connection_aborted]]]
+ [[link boost_asio.reference.basic_raw_socket.enable_connection_aborted [*enable_connection_aborted]]]
     [Socket option to report aborted connections on accept. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket.endpoint_type [*endpoint_type]]]
+ [[link boost_asio.reference.basic_raw_socket.endpoint_type [*endpoint_type]]]
     [The endpoint type. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket.implementation_type [*implementation_type]]]
+ [[link boost_asio.reference.basic_raw_socket.implementation_type [*implementation_type]]]
     [The underlying implementation type of I/O object. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket.keep_alive [*keep_alive]]]
+ [[link boost_asio.reference.basic_raw_socket.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket.linger [*linger]]]
+ [[link boost_asio.reference.basic_raw_socket.linger [*linger]]]
     [Socket option to specify whether the socket lingers on close if unsent data is present. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket.lowest_layer_type [*lowest_layer_type]]]
+ [[link boost_asio.reference.basic_raw_socket.lowest_layer_type [*lowest_layer_type]]]
     [A basic_socket is always the lowest layer. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket.message_flags [*message_flags]]]
+ [[link boost_asio.reference.basic_raw_socket.message_flags [*message_flags]]]
     [Bitmask type for flags that can be passed to send and receive operations. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket.native_type [*native_type]]]
+ [[link boost_asio.reference.basic_raw_socket.native_type [*native_type]]]
     [The native representation of a socket. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket.non_blocking_io [*non_blocking_io]]]
+ [[link boost_asio.reference.basic_raw_socket.non_blocking_io [*non_blocking_io]]]
     [IO control command to set the blocking mode of the socket. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket.protocol_type [*protocol_type]]]
+ [[link boost_asio.reference.basic_raw_socket.protocol_type [*protocol_type]]]
     [The protocol type. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket.receive_buffer_size [*receive_buffer_size]]]
+ [[link boost_asio.reference.basic_raw_socket.receive_buffer_size [*receive_buffer_size]]]
     [Socket option for the receive buffer size of a socket. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket.receive_low_watermark [*receive_low_watermark]]]
+ [[link boost_asio.reference.basic_raw_socket.receive_low_watermark [*receive_low_watermark]]]
     [Socket option for the receive low watermark. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket.reuse_address [*reuse_address]]]
+ [[link boost_asio.reference.basic_raw_socket.reuse_address [*reuse_address]]]
     [Socket option to allow the socket to be bound to an address that is already in use. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket.send_buffer_size [*send_buffer_size]]]
+ [[link boost_asio.reference.basic_raw_socket.send_buffer_size [*send_buffer_size]]]
     [Socket option for the send buffer size of a socket. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket.send_low_watermark [*send_low_watermark]]]
+ [[link boost_asio.reference.basic_raw_socket.send_low_watermark [*send_low_watermark]]]
     [Socket option for the send low watermark. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket.service_type [*service_type]]]
+ [[link boost_asio.reference.basic_raw_socket.service_type [*service_type]]]
     [The type of the service that will be used to provide I/O operations. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket.shutdown_type [*shutdown_type]]]
+ [[link boost_asio.reference.basic_raw_socket.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
   ]
@@ -6511,107 +7569,147 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.basic_socket.assign [*assign]]]
+ [[link boost_asio.reference.basic_raw_socket.assign [*assign]]]
     [Assign an existing native socket to the socket. ]
   ]
   
   [
- [[link boost_asio.reference.basic_socket.async_connect [*async_connect]]]
+ [[link boost_asio.reference.basic_raw_socket.async_connect [*async_connect]]]
     [Start an asynchronous connect. ]
   ]
   
   [
- [[link boost_asio.reference.basic_socket.at_mark [*at_mark]]]
+ [[link boost_asio.reference.basic_raw_socket.async_receive [*async_receive]]]
+ [Start an asynchronous receive on a connected socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.async_receive_from [*async_receive_from]]]
+ [Start an asynchronous receive. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.async_send [*async_send]]]
+ [Start an asynchronous send on a connected socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.async_send_to [*async_send_to]]]
+ [Start an asynchronous send. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.at_mark [*at_mark]]]
     [Determine whether the socket is at the out-of-band data mark. ]
   ]
   
   [
- [[link boost_asio.reference.basic_socket.available [*available]]]
+ [[link boost_asio.reference.basic_raw_socket.available [*available]]]
     [Determine the number of bytes available for reading. ]
   ]
   
   [
- [[link boost_asio.reference.basic_socket.basic_socket [*basic_socket]]]
- [Construct a basic_socket without opening it. ]
+ [[link boost_asio.reference.basic_raw_socket.basic_raw_socket [*basic_raw_socket]]]
+ [Construct a basic_raw_socket without opening it. ]
   ]
   
   [
- [[link boost_asio.reference.basic_socket.bind [*bind]]]
+ [[link boost_asio.reference.basic_raw_socket.bind [*bind]]]
     [Bind the socket to the given local endpoint. ]
   ]
   
   [
- [[link boost_asio.reference.basic_socket.cancel [*cancel]]]
+ [[link boost_asio.reference.basic_raw_socket.cancel [*cancel]]]
     [Cancel all asynchronous operations associated with the socket. ]
   ]
   
   [
- [[link boost_asio.reference.basic_socket.close [*close]]]
+ [[link boost_asio.reference.basic_raw_socket.close [*close]]]
     [Close the socket. ]
   ]
   
   [
- [[link boost_asio.reference.basic_socket.connect [*connect]]]
+ [[link boost_asio.reference.basic_raw_socket.connect [*connect]]]
     [Connect the socket to the specified endpoint. ]
   ]
   
   [
- [[link boost_asio.reference.basic_socket.get_io_service [*get_io_service]]]
+ [[link boost_asio.reference.basic_raw_socket.get_io_service [*get_io_service]]]
     [Get the io_service associated with the object. ]
   ]
   
   [
- [[link boost_asio.reference.basic_socket.get_option [*get_option]]]
+ [[link boost_asio.reference.basic_raw_socket.get_option [*get_option]]]
     [Get an option from the socket. ]
   ]
   
   [
- [[link boost_asio.reference.basic_socket.io_control [*io_control]]]
+ [[link boost_asio.reference.basic_raw_socket.io_control [*io_control]]]
     [Perform an IO control command on the socket. ]
   ]
   
   [
- [[link boost_asio.reference.basic_socket.io_service [*io_service]]]
+ [[link boost_asio.reference.basic_raw_socket.io_service [*io_service]]]
     [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
   ]
   
   [
- [[link boost_asio.reference.basic_socket.is_open [*is_open]]]
+ [[link boost_asio.reference.basic_raw_socket.is_open [*is_open]]]
     [Determine whether the socket is open. ]
   ]
   
   [
- [[link boost_asio.reference.basic_socket.local_endpoint [*local_endpoint]]]
+ [[link boost_asio.reference.basic_raw_socket.local_endpoint [*local_endpoint]]]
     [Get the local endpoint of the socket. ]
   ]
   
   [
- [[link boost_asio.reference.basic_socket.lowest_layer [*lowest_layer]]]
+ [[link boost_asio.reference.basic_raw_socket.lowest_layer [*lowest_layer]]]
     [Get a reference to the lowest layer. ]
   ]
   
   [
- [[link boost_asio.reference.basic_socket.native [*native]]]
+ [[link boost_asio.reference.basic_raw_socket.native [*native]]]
     [Get the native socket representation. ]
   ]
   
   [
- [[link boost_asio.reference.basic_socket.open [*open]]]
+ [[link boost_asio.reference.basic_raw_socket.open [*open]]]
     [Open the socket using the specified protocol. ]
   ]
   
   [
- [[link boost_asio.reference.basic_socket.remote_endpoint [*remote_endpoint]]]
+ [[link boost_asio.reference.basic_raw_socket.receive [*receive]]]
+ [Receive some data on a connected socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.receive_from [*receive_from]]]
+ [Receive raw data with the endpoint of the sender. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.remote_endpoint [*remote_endpoint]]]
     [Get the remote endpoint of the socket. ]
   ]
   
   [
- [[link boost_asio.reference.basic_socket.set_option [*set_option]]]
+ [[link boost_asio.reference.basic_raw_socket.send [*send]]]
+ [Send some data on a connected socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.send_to [*send_to]]]
+ [Send raw data to the specified endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.set_option [*set_option]]]
     [Set an option on the socket. ]
   ]
   
   [
- [[link boost_asio.reference.basic_socket.shutdown [*shutdown]]]
+ [[link boost_asio.reference.basic_raw_socket.shutdown [*shutdown]]]
     [Disable sends or receives on the socket. ]
   ]
   
@@ -6622,28 +7720,44 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.basic_socket.max_connections [*max_connections]]]
+ [[link boost_asio.reference.basic_raw_socket.max_connections [*max_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
   [
- [[link boost_asio.reference.basic_socket.message_do_not_route [*message_do_not_route]]]
+ [[link boost_asio.reference.basic_raw_socket.message_do_not_route [*message_do_not_route]]]
     [Specify that the data should not be subject to routing. ]
   ]
 
   [
- [[link boost_asio.reference.basic_socket.message_out_of_band [*message_out_of_band]]]
+ [[link boost_asio.reference.basic_raw_socket.message_out_of_band [*message_out_of_band]]]
     [Process out-of-band data. ]
   ]
 
   [
- [[link boost_asio.reference.basic_socket.message_peek [*message_peek]]]
+ [[link boost_asio.reference.basic_raw_socket.message_peek [*message_peek]]]
     [Peek at incoming data without removing it from the input queue. ]
   ]
 
 ]
 
-The basic_socket class template provides functionality that is common to both stream-oriented and datagram-oriented sockets.
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
+
+]
+
+The basic_raw_socket class template provides asynchronous and blocking raw-oriented socket functionality.
 
 
 [heading Thread Safety]
@@ -6653,21 +7767,24 @@
 [*Shared] [*objects:] Unsafe.
 
 
-[section:assign basic_socket::assign]
+[section:assign basic_raw_socket::assign]
 
 Assign an existing native socket to the socket.
 
- void ``[link boost_asio.reference.basic_socket.assign.overload1 assign]``(
+ void ``[link boost_asio.reference.basic_raw_socket.assign.overload1 assign]``(
       const protocol_type & protocol,
       const native_type & native_socket);
 
- boost::system::error_code ``[link boost_asio.reference.basic_socket.assign.overload2 assign]``(
+ boost::system::error_code ``[link boost_asio.reference.basic_raw_socket.assign.overload2 assign]``(
       const protocol_type & protocol,
       const native_type & native_socket,
       boost::system::error_code & ec);
 
 
-[section:overload1 basic_socket::assign (1 of 2 overloads)]
+[section:overload1 basic_raw_socket::assign (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
 
 Assign an existing native socket to the socket.
 
@@ -6681,7 +7798,10 @@
 
 
 
-[section:overload2 basic_socket::assign (2 of 2 overloads)]
+[section:overload2 basic_raw_socket::assign (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
 
 Assign an existing native socket to the socket.
 
@@ -6698,12 +7818,13 @@
 [endsect]
 
 
-[section:async_connect basic_socket::async_connect]
+[section:async_connect basic_raw_socket::async_connect]
+
+
+['Inherited from basic_socket.]
 
 Start an asynchronous connect.
 
- template<
- typename ``[link boost_asio.reference.ConnectHandler ConnectHandler]``>
   void async_connect(
       const endpoint_type & peer_endpoint,
       ConnectHandler handler);
@@ -6759,54 +7880,95 @@
 [endsect]
 
 
-[section:at_mark basic_socket::at_mark]
-
-Determine whether the socket is at the out-of-band data mark.
+[section:async_receive basic_raw_socket::async_receive]
 
- bool ``[link boost_asio.reference.basic_socket.at_mark.overload1 at_mark]``() const;
+Start an asynchronous receive on a connected socket.
 
- bool ``[link boost_asio.reference.basic_socket.at_mark.overload2 at_mark]``(
- boost::system::error_code & ec) const;
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void ``[link boost_asio.reference.basic_raw_socket.async_receive.overload1 async_receive]``(
+ const MutableBufferSequence & buffers,
+ ReadHandler handler);
 
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void ``[link boost_asio.reference.basic_raw_socket.async_receive.overload2 async_receive]``(
+ const MutableBufferSequence & buffers,
+ socket_base::message_flags flags,
+ ReadHandler handler);
 
-[section:overload1 basic_socket::at_mark (1 of 2 overloads)]
 
-Determine whether the socket is at the out-of-band data mark.
+[section:overload1 basic_raw_socket::async_receive (1 of 2 overloads)]
 
- bool at_mark() const;
+Start an asynchronous receive on a connected socket.
 
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_receive(
+ const MutableBufferSequence & buffers,
+ ReadHandler handler);
 
-This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
 
+This function is used to asynchronously receive data from the raw socket. The function call always returns immediately.
 
-[heading Return Value]
-
-A bool indicating whether the socket is at the out-of-band data mark.
 
-[heading Exceptions]
+[heading Parameters]
     
 
 [variablelist
   
-[[boost::system::system_error][Thrown on failure. ]]
+[[buffers][One or more buffers into which the data will be received. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+
+[[handler][The handler to be called when the receive operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ std::size_t bytes_transferred // Number of bytes received.
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
 
 ]
 
+[heading Remarks]
+
+The async\_receive operation can only be used with a connected socket. Use the async\_receive\_from function to receive data on an unconnected raw socket.
+
+[heading Example]
+
+To receive into a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ socket.async_receive(boost::asio::buffer(data, size), handler);
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+
 
 
 [endsect]
 
 
 
-[section:overload2 basic_socket::at_mark (2 of 2 overloads)]
+[section:overload2 basic_raw_socket::async_receive (2 of 2 overloads)]
 
-Determine whether the socket is at the out-of-band data mark.
+Start an asynchronous receive on a connected socket.
 
- bool at_mark(
- boost::system::error_code & ec) const;
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_receive(
+ const MutableBufferSequence & buffers,
+ socket_base::message_flags flags,
+ ReadHandler handler);
 
 
-This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
+This function is used to asynchronously receive data from the raw socket. The function call always returns immediately.
 
 
 [heading Parameters]
@@ -6814,13 +7976,25 @@
 
 [variablelist
   
-[[ec][Set to indicate what error occurred, if any.]]
+[[buffers][One or more buffers into which the data will be received. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+
+[[flags][Flags specifying how the receive call is to be made.]]
+
+[[handler][The handler to be called when the receive operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ std::size_t bytes_transferred // Number of bytes received.
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
 
 ]
 
-[heading Return Value]
+[heading Remarks]
       
-A bool indicating whether the socket is at the out-of-band data mark.
+The async\_receive operation can only be used with a connected socket. Use the async\_receive\_from function to receive data on an unconnected raw socket.
 
 
 
@@ -6829,54 +8003,98 @@
 
 [endsect]
 
-[section:available basic_socket::available]
-
-Determine the number of bytes available for reading.
+[section:async_receive_from basic_raw_socket::async_receive_from]
 
- std::size_t ``[link boost_asio.reference.basic_socket.available.overload1 available]``() const;
+Start an asynchronous receive.
 
- std::size_t ``[link boost_asio.reference.basic_socket.available.overload2 available]``(
- boost::system::error_code & ec) const;
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void ``[link boost_asio.reference.basic_raw_socket.async_receive_from.overload1 async_receive_from]``(
+ const MutableBufferSequence & buffers,
+ endpoint_type & sender_endpoint,
+ ReadHandler handler);
 
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void ``[link boost_asio.reference.basic_raw_socket.async_receive_from.overload2 async_receive_from]``(
+ const MutableBufferSequence & buffers,
+ endpoint_type & sender_endpoint,
+ socket_base::message_flags flags,
+ ReadHandler handler);
 
-[section:overload1 basic_socket::available (1 of 2 overloads)]
 
-Determine the number of bytes available for reading.
+[section:overload1 basic_raw_socket::async_receive_from (1 of 2 overloads)]
 
- std::size_t available() const;
+Start an asynchronous receive.
 
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_receive_from(
+ const MutableBufferSequence & buffers,
+ endpoint_type & sender_endpoint,
+ ReadHandler handler);
 
-This function is used to determine the number of bytes that may be read without blocking.
 
+This function is used to asynchronously receive raw data. The function call always returns immediately.
 
-[heading Return Value]
-
-The number of bytes that may be read without blocking, or 0 if an error occurs.
 
-[heading Exceptions]
+[heading Parameters]
     
 
 [variablelist
   
-[[boost::system::system_error][Thrown on failure. ]]
+[[buffers][One or more buffers into which the data will be received. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+
+[[sender_endpoint][An endpoint object that receives the endpoint of the remote sender of the data. Ownership of the sender\_endpoint object is retained by the caller, which must guarantee that it is valid until the handler is called.]]
+
+[[handler][The handler to be called when the receive operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ std::size_t bytes_transferred // Number of bytes received.
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
 
 ]
 
+[heading Example]
+
+To receive into a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ socket.async_receive_from(
+ boost::asio::buffer(data, size), 0, sender_endpoint, handler);
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+
 
 
 [endsect]
 
 
 
-[section:overload2 basic_socket::available (2 of 2 overloads)]
+[section:overload2 basic_raw_socket::async_receive_from (2 of 2 overloads)]
 
-Determine the number of bytes available for reading.
+Start an asynchronous receive.
 
- std::size_t available(
- boost::system::error_code & ec) const;
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_receive_from(
+ const MutableBufferSequence & buffers,
+ endpoint_type & sender_endpoint,
+ socket_base::message_flags flags,
+ ReadHandler handler);
 
 
-This function is used to determine the number of bytes that may be read without blocking.
+This function is used to asynchronously receive raw data. The function call always returns immediately.
 
 
 [heading Parameters]
@@ -6884,51 +8102,64 @@
 
 [variablelist
   
-[[ec][Set to indicate what error occurred, if any.]]
+[[buffers][One or more buffers into which the data will be received. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
 
-]
+[[sender_endpoint][An endpoint object that receives the endpoint of the remote sender of the data. Ownership of the sender\_endpoint object is retained by the caller, which must guarantee that it is valid until the handler is called.]]
 
-[heading Return Value]
-
-The number of bytes that may be read without blocking, or 0 if an error occurs.
+[[flags][Flags specifying how the receive call is to be made.]]
 
+[[handler][The handler to be called when the receive operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ std::size_t bytes_transferred // Number of bytes received.
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post(). ]]
 
+]
 
-[endsect]
 
 
 [endsect]
 
-[section:basic_socket basic_socket::basic_socket]
 
-Construct a basic_socket without opening it.
+[endsect]
 
- ``[link boost_asio.reference.basic_socket.basic_socket.overload1 basic_socket]``(
- boost::asio::io_service & io_service);
+[section:async_send basic_raw_socket::async_send]
 
- ``[link boost_asio.reference.basic_socket.basic_socket.overload2 basic_socket]``(
- boost::asio::io_service & io_service,
- const protocol_type & protocol);
+Start an asynchronous send on a connected socket.
 
- ``[link boost_asio.reference.basic_socket.basic_socket.overload3 basic_socket]``(
- boost::asio::io_service & io_service,
- const endpoint_type & endpoint);
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void ``[link boost_asio.reference.basic_raw_socket.async_send.overload1 async_send]``(
+ const ConstBufferSequence & buffers,
+ WriteHandler handler);
 
- ``[link boost_asio.reference.basic_socket.basic_socket.overload4 basic_socket]``(
- boost::asio::io_service & io_service,
- const protocol_type & protocol,
- const native_type & native_socket);
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void ``[link boost_asio.reference.basic_raw_socket.async_send.overload2 async_send]``(
+ const ConstBufferSequence & buffers,
+ socket_base::message_flags flags,
+ WriteHandler handler);
 
 
-[section:overload1 basic_socket::basic_socket (1 of 4 overloads)]
+[section:overload1 basic_raw_socket::async_send (1 of 2 overloads)]
 
-Construct a basic_socket without opening it.
+Start an asynchronous send on a connected socket.
 
- basic_socket(
- boost::asio::io_service & io_service);
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_send(
+ const ConstBufferSequence & buffers,
+ WriteHandler handler);
 
 
-This constructor creates a socket without opening it.
+This function is used to send data on the raw socket. The function call will block until the data has been sent successfully or an error occurs.
 
 
 [heading Parameters]
@@ -6936,26 +8167,55 @@
 
 [variablelist
   
-[[io_service][The io\_service object that the socket will use to dispatch handlers for any asynchronous operations performed on the socket. ]]
+[[buffers][One or more data buffers to be sent on the socket. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+
+[[handler][The handler to be called when the send operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ std::size_t bytes_transferred // Number of bytes sent.
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
 
 ]
 
+[heading Remarks]
+
+The async\_send operation can only be used with a connected socket. Use the async\_send\_to function to send data on an unconnected raw socket.
+
+[heading Example]
+
+To send a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ socket.async_send(boost::asio::buffer(data, size), handler);
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+
 
 
 [endsect]
 
 
 
-[section:overload2 basic_socket::basic_socket (2 of 4 overloads)]
+[section:overload2 basic_raw_socket::async_send (2 of 2 overloads)]
 
-Construct and open a basic_socket.
+Start an asynchronous send on a connected socket.
 
- basic_socket(
- boost::asio::io_service & io_service,
- const protocol_type & protocol);
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_send(
+ const ConstBufferSequence & buffers,
+ socket_base::message_flags flags,
+ WriteHandler handler);
 
 
-This constructor creates and opens a socket.
+This function is used to send data on the raw socket. The function call will block until the data has been sent successfully or an error occurs.
 
 
 [heading Parameters]
@@ -6963,37 +8223,69 @@
 
 [variablelist
   
-[[io_service][The io\_service object that the socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
+[[buffers][One or more data buffers to be sent on the socket. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
 
-[[protocol][An object specifying protocol parameters to be used.]]
+[[flags][Flags specifying how the send call is to be made.]]
+
+[[handler][The handler to be called when the send operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ std::size_t bytes_transferred // Number of bytes sent.
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
 
 ]
 
-[heading Exceptions]
-
+[heading Remarks]
+
+The async\_send operation can only be used with a connected socket. Use the async\_send\_to function to send data on an unconnected raw socket.
 
-[variablelist
-
-[[boost::system::system_error][Thrown on failure. ]]
 
-]
 
+[endsect]
 
 
 [endsect]
 
+[section:async_send_to basic_raw_socket::async_send_to]
 
+Start an asynchronous send.
 
-[section:overload3 basic_socket::basic_socket (3 of 4 overloads)]
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void ``[link boost_asio.reference.basic_raw_socket.async_send_to.overload1 async_send_to]``(
+ const ConstBufferSequence & buffers,
+ const endpoint_type & destination,
+ WriteHandler handler);
 
-Construct a basic_socket, opening it and binding it to the given local endpoint.
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void ``[link boost_asio.reference.basic_raw_socket.async_send_to.overload2 async_send_to]``(
+ const ConstBufferSequence & buffers,
+ const endpoint_type & destination,
+ socket_base::message_flags flags,
+ WriteHandler handler);
 
- basic_socket(
- boost::asio::io_service & io_service,
- const endpoint_type & endpoint);
 
+[section:overload1 basic_raw_socket::async_send_to (1 of 2 overloads)]
 
-This constructor creates a socket and automatically opens it bound to the specified endpoint on the local machine. The protocol used is the protocol associated with the given endpoint.
+Start an asynchronous send.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_send_to(
+ const ConstBufferSequence & buffers,
+ const endpoint_type & destination,
+ WriteHandler handler);
+
+
+This function is used to asynchronously send raw data to the specified remote endpoint. The function call always returns immediately.
 
 
 [heading Parameters]
@@ -7001,20 +8293,35 @@
 
 [variablelist
   
-[[io_service][The io\_service object that the socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
+[[buffers][One or more data buffers to be sent to the remote endpoint. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
 
-[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
+[[destination][The remote endpoint to which the data will be sent. Copies will be made of the endpoint as required.]]
 
-]
+[[handler][The handler to be called when the send operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ std::size_t bytes_transferred // Number of bytes sent.
+ );
 
-[heading Exceptions]
-
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
 
-[variablelist
+]
+
+[heading Example]
   
-[[boost::system::system_error][Thrown on failure. ]]
+To send a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ boost::asio::ip::udp::endpoint destination(
+ boost::asio::ip::address::from_string("1.2.3.4"), 12345);
+ socket.async_send_to(
+ boost::asio::buffer(data, size), destination, handler);
 
-]
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
 
 
@@ -7022,17 +8329,21 @@
 
 
 
-[section:overload4 basic_socket::basic_socket (4 of 4 overloads)]
+[section:overload2 basic_raw_socket::async_send_to (2 of 2 overloads)]
 
-Construct a basic_socket on an existing native socket.
+Start an asynchronous send.
 
- basic_socket(
- boost::asio::io_service & io_service,
- const protocol_type & protocol,
- const native_type & native_socket);
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_send_to(
+ const ConstBufferSequence & buffers,
+ const endpoint_type & destination,
+ socket_base::message_flags flags,
+ WriteHandler handler);
 
 
-This constructor creates a socket object to hold an existing native socket.
+This function is used to asynchronously send raw data to the specified remote endpoint. The function call always returns immediately.
 
 
 [heading Parameters]
@@ -7040,20 +8351,21 @@
 
 [variablelist
   
-[[io_service][The io\_service object that the socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
-
-[[protocol][An object specifying protocol parameters to be used.]]
+[[buffers][One or more data buffers to be sent to the remote endpoint. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
 
-[[native_socket][A native socket.]]
+[[flags][Flags specifying how the send call is to be made.]]
 
-]
+[[destination][The remote endpoint to which the data will be sent. Copies will be made of the endpoint as required.]]
 
-[heading Exceptions]
-
+[[handler][The handler to be called when the send operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ std::size_t bytes_transferred // Number of bytes sent.
+ );
 
-[variablelist
-
-[[boost::system::system_error][Thrown on failure. ]]
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post(). ]]
 
 ]
 
@@ -7064,75 +8376,60 @@
 
 [endsect]
 
-[section:bind basic_socket::bind]
+[section:at_mark basic_raw_socket::at_mark]
 
-Bind the socket to the given local endpoint.
+Determine whether the socket is at the out-of-band data mark.
 
- void ``[link boost_asio.reference.basic_socket.bind.overload1 bind]``(
- const endpoint_type & endpoint);
+ bool ``[link boost_asio.reference.basic_raw_socket.at_mark.overload1 at_mark]``() const;
 
- boost::system::error_code ``[link boost_asio.reference.basic_socket.bind.overload2 bind]``(
- const endpoint_type & endpoint,
- boost::system::error_code & ec);
+ bool ``[link boost_asio.reference.basic_raw_socket.at_mark.overload2 at_mark]``(
+ boost::system::error_code & ec) const;
 
 
-[section:overload1 basic_socket::bind (1 of 2 overloads)]
+[section:overload1 basic_raw_socket::at_mark (1 of 2 overloads)]
 
-Bind the socket to the given local endpoint.
 
- void bind(
- const endpoint_type & endpoint);
+['Inherited from basic_socket.]
 
+Determine whether the socket is at the out-of-band data mark.
 
-This function binds the socket to the specified endpoint on the local machine.
+ bool at_mark() const;
 
 
-[heading Parameters]
-
+This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
 
-[variablelist
-
-[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
 
-]
+[heading Return Value]
+
+A bool indicating whether the socket is at the out-of-band data mark.
 
 [heading Exceptions]
     
 
 [variablelist
   
-[[boost::system::system_error][Thrown on failure.]]
+[[boost::system::system_error][Thrown on failure. ]]
 
 ]
 
-[heading Example]
-
-
-
- boost::asio::ip::tcp::socket socket(io_service);
- socket.open(boost::asio::ip::tcp::v4());
- socket.bind(boost::asio::ip::tcp::endpoint(
- boost::asio::ip::tcp::v4(), 12345));
-
-
 
 
+[endsect]
 
 
-[endsect]
 
+[section:overload2 basic_raw_socket::at_mark (2 of 2 overloads)]
 
 
-[section:overload2 basic_socket::bind (2 of 2 overloads)]
+['Inherited from basic_socket.]
 
-Bind the socket to the given local endpoint.
+Determine whether the socket is at the out-of-band data mark.
 
- boost::system::error_code bind(
- const endpoint_type & endpoint,
- boost::system::error_code & ec);
+ bool at_mark(
+ boost::system::error_code & ec) const;
 
 
-This function binds the socket to the specified endpoint on the local machine.
+This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
 
 
 [heading Parameters]
@@ -7140,38 +8437,376 @@
 
 [variablelist
   
-[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
-
 [[ec][Set to indicate what error occurred, if any.]]
 
 ]
 
-[heading Example]
-
+[heading Return Value]
+
+A bool indicating whether the socket is at the out-of-band data mark.
 
 
- boost::asio::ip::tcp::socket socket(io_service);
- socket.open(boost::asio::ip::tcp::v4());
- boost::system::error_code ec;
- socket.bind(boost::asio::ip::tcp::endpoint(
- boost::asio::ip::tcp::v4(), 12345), ec);
- if (ec)
- {
- // An error occurred.
- }
 
+[endsect]
 
 
+[endsect]
 
+[section:available basic_raw_socket::available]
 
+Determine the number of bytes available for reading.
 
-[endsect]
+ std::size_t ``[link boost_asio.reference.basic_raw_socket.available.overload1 available]``() const;
 
+ std::size_t ``[link boost_asio.reference.basic_raw_socket.available.overload2 available]``(
+ boost::system::error_code & ec) const;
 
-[endsect]
 
+[section:overload1 basic_raw_socket::available (1 of 2 overloads)]
 
-[section:broadcast basic_socket::broadcast]
+
+['Inherited from basic_socket.]
+
+Determine the number of bytes available for reading.
+
+ std::size_t available() const;
+
+
+This function is used to determine the number of bytes that may be read without blocking.
+
+
+[heading Return Value]
+
+The number of bytes that may be read without blocking, or 0 if an error occurs.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_raw_socket::available (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Determine the number of bytes available for reading.
+
+ std::size_t available(
+ boost::system::error_code & ec) const;
+
+
+This function is used to determine the number of bytes that may be read without blocking.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Return Value]
+
+The number of bytes that may be read without blocking, or 0 if an error occurs.
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:basic_raw_socket basic_raw_socket::basic_raw_socket]
+
+Construct a basic_raw_socket without opening it.
+
+ ``[link boost_asio.reference.basic_raw_socket.basic_raw_socket.overload1 basic_raw_socket]``(
+ boost::asio::io_service & io_service);
+
+ ``[link boost_asio.reference.basic_raw_socket.basic_raw_socket.overload2 basic_raw_socket]``(
+ boost::asio::io_service & io_service,
+ const protocol_type & protocol);
+
+ ``[link boost_asio.reference.basic_raw_socket.basic_raw_socket.overload3 basic_raw_socket]``(
+ boost::asio::io_service & io_service,
+ const endpoint_type & endpoint);
+
+ ``[link boost_asio.reference.basic_raw_socket.basic_raw_socket.overload4 basic_raw_socket]``(
+ boost::asio::io_service & io_service,
+ const protocol_type & protocol,
+ const native_type & native_socket);
+
+
+[section:overload1 basic_raw_socket::basic_raw_socket (1 of 4 overloads)]
+
+Construct a basic_raw_socket without opening it.
+
+ basic_raw_socket(
+ boost::asio::io_service & io_service);
+
+
+This constructor creates a raw socket without opening it. The open() function must be called before data can be sent or received on the socket.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[io_service][The io\_service object that the raw socket will use to dispatch handlers for any asynchronous operations performed on the socket. ]]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_raw_socket::basic_raw_socket (2 of 4 overloads)]
+
+Construct and open a basic_raw_socket.
+
+ basic_raw_socket(
+ boost::asio::io_service & io_service,
+ const protocol_type & protocol);
+
+
+This constructor creates and opens a raw socket.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[io_service][The io\_service object that the raw socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
+
+[[protocol][An object specifying protocol parameters to be used.]]
+
+]
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:overload3 basic_raw_socket::basic_raw_socket (3 of 4 overloads)]
+
+Construct a basic_raw_socket, opening it and binding it to the given local endpoint.
+
+ basic_raw_socket(
+ boost::asio::io_service & io_service,
+ const endpoint_type & endpoint);
+
+
+This constructor creates a raw socket and automatically opens it bound to the specified endpoint on the local machine. The protocol used is the protocol associated with the given endpoint.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[io_service][The io\_service object that the raw socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
+
+[[endpoint][An endpoint on the local machine to which the raw socket will be bound.]]
+
+]
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:overload4 basic_raw_socket::basic_raw_socket (4 of 4 overloads)]
+
+Construct a basic_raw_socket on an existing native socket.
+
+ basic_raw_socket(
+ boost::asio::io_service & io_service,
+ const protocol_type & protocol,
+ const native_type & native_socket);
+
+
+This constructor creates a raw socket object to hold an existing native socket.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[io_service][The io\_service object that the raw socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
+
+[[protocol][An object specifying protocol parameters to be used.]]
+
+[[native_socket][The new underlying socket implementation.]]
+
+]
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
+
+]
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:bind basic_raw_socket::bind]
+
+Bind the socket to the given local endpoint.
+
+ void ``[link boost_asio.reference.basic_raw_socket.bind.overload1 bind]``(
+ const endpoint_type & endpoint);
+
+ boost::system::error_code ``[link boost_asio.reference.basic_raw_socket.bind.overload2 bind]``(
+ const endpoint_type & endpoint,
+ boost::system::error_code & ec);
+
+
+[section:overload1 basic_raw_socket::bind (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Bind the socket to the given local endpoint.
+
+ void bind(
+ const endpoint_type & endpoint);
+
+
+This function binds the socket to the specified endpoint on the local machine.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
+
+]
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ socket.open(boost::asio::ip::tcp::v4());
+ socket.bind(boost::asio::ip::tcp::endpoint(
+ boost::asio::ip::tcp::v4(), 12345));
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_raw_socket::bind (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Bind the socket to the given local endpoint.
+
+ boost::system::error_code bind(
+ const endpoint_type & endpoint,
+ boost::system::error_code & ec);
+
+
+This function binds the socket to the specified endpoint on the local machine.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ socket.open(boost::asio::ip::tcp::v4());
+ boost::system::error_code ec;
+ socket.bind(boost::asio::ip::tcp::endpoint(
+ boost::asio::ip::tcp::v4(), 12345), ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
+
+
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:broadcast basic_raw_socket::broadcast]
 
 
 ['Inherited from socket_base.]
@@ -7214,7 +8849,7 @@
 
 
 
-[section:bytes_readable basic_socket::bytes_readable]
+[section:bytes_readable basic_raw_socket::bytes_readable]
 
 
 ['Inherited from socket_base.]
@@ -7246,17 +8881,20 @@
 [endsect]
 
 
-[section:cancel basic_socket::cancel]
+[section:cancel basic_raw_socket::cancel]
 
 Cancel all asynchronous operations associated with the socket.
 
- void ``[link boost_asio.reference.basic_socket.cancel.overload1 cancel]``();
+ void ``[link boost_asio.reference.basic_raw_socket.cancel.overload1 cancel]``();
 
- boost::system::error_code ``[link boost_asio.reference.basic_socket.cancel.overload2 cancel]``(
+ boost::system::error_code ``[link boost_asio.reference.basic_raw_socket.cancel.overload2 cancel]``(
       boost::system::error_code & ec);
 
 
-[section:overload1 basic_socket::cancel (1 of 2 overloads)]
+[section:overload1 basic_raw_socket::cancel (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
 
 Cancel all asynchronous operations associated with the socket.
 
@@ -7297,7 +8935,10 @@
 
 
 
-[section:overload2 basic_socket::cancel (2 of 2 overloads)]
+[section:overload2 basic_raw_socket::cancel (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
 
 Cancel all asynchronous operations associated with the socket.
 
@@ -7340,17 +8981,20 @@
 
 [endsect]
 
-[section:close basic_socket::close]
+[section:close basic_raw_socket::close]
 
 Close the socket.
 
- void ``[link boost_asio.reference.basic_socket.close.overload1 close]``();
+ void ``[link boost_asio.reference.basic_raw_socket.close.overload1 close]``();
 
- boost::system::error_code ``[link boost_asio.reference.basic_socket.close.overload2 close]``(
+ boost::system::error_code ``[link boost_asio.reference.basic_raw_socket.close.overload2 close]``(
       boost::system::error_code & ec);
 
 
-[section:overload1 basic_socket::close (1 of 2 overloads)]
+[section:overload1 basic_raw_socket::close (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
 
 Close the socket.
 
@@ -7379,7 +9023,10 @@
 
 
 
-[section:overload2 basic_socket::close (2 of 2 overloads)]
+[section:overload2 basic_raw_socket::close (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
 
 Close the socket.
 
@@ -7426,19 +9073,22 @@
 
 [endsect]
 
-[section:connect basic_socket::connect]
+[section:connect basic_raw_socket::connect]
 
 Connect the socket to the specified endpoint.
 
- void ``[link boost_asio.reference.basic_socket.connect.overload1 connect]``(
+ void ``[link boost_asio.reference.basic_raw_socket.connect.overload1 connect]``(
       const endpoint_type & peer_endpoint);
 
- boost::system::error_code ``[link boost_asio.reference.basic_socket.connect.overload2 connect]``(
+ boost::system::error_code ``[link boost_asio.reference.basic_raw_socket.connect.overload2 connect]``(
       const endpoint_type & peer_endpoint,
       boost::system::error_code & ec);
 
 
-[section:overload1 basic_socket::connect (1 of 2 overloads)]
+[section:overload1 basic_raw_socket::connect (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
 
 Connect the socket to the specified endpoint.
 
@@ -7487,7 +9137,10 @@
 
 
 
-[section:overload2 basic_socket::connect (2 of 2 overloads)]
+[section:overload2 basic_raw_socket::connect (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
 
 Connect the socket to the specified endpoint.
 
@@ -7537,7 +9190,7 @@
 [endsect]
 
 
-[section:debug basic_socket::debug]
+[section:debug basic_raw_socket::debug]
 
 
 ['Inherited from socket_base.]
@@ -7580,7 +9233,7 @@
 
 
 
-[section:do_not_route basic_socket::do_not_route]
+[section:do_not_route basic_raw_socket::do_not_route]
 
 
 ['Inherited from socket_base.]
@@ -7623,7 +9276,7 @@
 
 
 
-[section:enable_connection_aborted basic_socket::enable_connection_aborted]
+[section:enable_connection_aborted basic_raw_socket::enable_connection_aborted]
 
 
 ['Inherited from socket_base.]
@@ -7666,7 +9319,7 @@
 
 
 
-[section:endpoint_type basic_socket::endpoint_type]
+[section:endpoint_type basic_raw_socket::endpoint_type]
 
 The endpoint type.
 
@@ -7679,7 +9332,7 @@
 
 
 
-[section:get_io_service basic_socket::get_io_service]
+[section:get_io_service basic_raw_socket::get_io_service]
 
 
 ['Inherited from basic_io_object.]
@@ -7701,28 +9354,25 @@
 [endsect]
 
 
-[section:get_option basic_socket::get_option]
+[section:get_option basic_raw_socket::get_option]
 
 Get an option from the socket.
 
- template<
- typename ``[link boost_asio.reference.GettableSocketOption GettableSocketOption]``>
- void ``[link boost_asio.reference.basic_socket.get_option.overload1 get_option]``(
+ void ``[link boost_asio.reference.basic_raw_socket.get_option.overload1 get_option]``(
       GettableSocketOption & option) const;
 
- template<
- typename ``[link boost_asio.reference.GettableSocketOption GettableSocketOption]``>
- boost::system::error_code ``[link boost_asio.reference.basic_socket.get_option.overload2 get_option]``(
+ boost::system::error_code ``[link boost_asio.reference.basic_raw_socket.get_option.overload2 get_option]``(
       GettableSocketOption & option,
       boost::system::error_code & ec) const;
 
 
-[section:overload1 basic_socket::get_option (1 of 2 overloads)]
+[section:overload1 basic_raw_socket::get_option (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
 
 Get an option from the socket.
 
- template<
- typename ``[link boost_asio.reference.GettableSocketOption GettableSocketOption]``>
   void get_option(
       GettableSocketOption & option) const;
 
@@ -7767,12 +9417,13 @@
 
 
 
-[section:overload2 basic_socket::get_option (2 of 2 overloads)]
+[section:overload2 basic_raw_socket::get_option (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
 
 Get an option from the socket.
 
- template<
- typename ``[link boost_asio.reference.GettableSocketOption GettableSocketOption]``>
   boost::system::error_code get_option(
       GettableSocketOption & option,
       boost::system::error_code & ec) const;
@@ -7818,7 +9469,22 @@
 [endsect]
 
 
-[section:implementation_type basic_socket::implementation_type]
+[section:implementation basic_raw_socket::implementation]
+
+
+['Inherited from basic_io_object.]
+
+The underlying implementation of the I/O object.
+
+ implementation_type implementation;
+
+
+
+[endsect]
+
+
+
+[section:implementation_type basic_raw_socket::implementation_type]
 
 
 ['Inherited from basic_io_object.]
@@ -7833,28 +9499,25 @@
 [endsect]
 
 
-[section:io_control basic_socket::io_control]
+[section:io_control basic_raw_socket::io_control]
 
 Perform an IO control command on the socket.
 
- template<
- typename ``[link boost_asio.reference.IoControlCommand IoControlCommand]``>
- void ``[link boost_asio.reference.basic_socket.io_control.overload1 io_control]``(
+ void ``[link boost_asio.reference.basic_raw_socket.io_control.overload1 io_control]``(
       IoControlCommand & command);
 
- template<
- typename ``[link boost_asio.reference.IoControlCommand IoControlCommand]``>
- boost::system::error_code ``[link boost_asio.reference.basic_socket.io_control.overload2 io_control]``(
+ boost::system::error_code ``[link boost_asio.reference.basic_raw_socket.io_control.overload2 io_control]``(
       IoControlCommand & command,
       boost::system::error_code & ec);
 
 
-[section:overload1 basic_socket::io_control (1 of 2 overloads)]
+[section:overload1 basic_raw_socket::io_control (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
 
 Perform an IO control command on the socket.
 
- template<
- typename ``[link boost_asio.reference.IoControlCommand IoControlCommand]``>
   void io_control(
       IoControlCommand & command);
 
@@ -7899,12 +9562,13 @@
 
 
 
-[section:overload2 basic_socket::io_control (2 of 2 overloads)]
+[section:overload2 basic_raw_socket::io_control (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
 
 Perform an IO control command on the socket.
 
- template<
- typename ``[link boost_asio.reference.IoControlCommand IoControlCommand]``>
   boost::system::error_code io_control(
       IoControlCommand & command,
       boost::system::error_code & ec);
@@ -7950,7 +9614,7 @@
 [endsect]
 
 
-[section:io_service basic_socket::io_service]
+[section:io_service basic_raw_socket::io_service]
 
 
 ['Inherited from basic_io_object.]
@@ -7973,7 +9637,10 @@
 
 
 
-[section:is_open basic_socket::is_open]
+[section:is_open basic_raw_socket::is_open]
+
+
+['Inherited from basic_socket.]
 
 Determine whether the socket is open.
 
@@ -7985,7 +9652,7 @@
 
 
 
-[section:keep_alive basic_socket::keep_alive]
+[section:keep_alive basic_raw_socket::keep_alive]
 
 
 ['Inherited from socket_base.]
@@ -8028,7 +9695,7 @@
 
 
 
-[section:linger basic_socket::linger]
+[section:linger basic_raw_socket::linger]
 
 
 ['Inherited from socket_base.]
@@ -8071,17 +9738,20 @@
 [endsect]
 
 
-[section:local_endpoint basic_socket::local_endpoint]
+[section:local_endpoint basic_raw_socket::local_endpoint]
 
 Get the local endpoint of the socket.
 
- endpoint_type ``[link boost_asio.reference.basic_socket.local_endpoint.overload1 local_endpoint]``() const;
+ endpoint_type ``[link boost_asio.reference.basic_raw_socket.local_endpoint.overload1 local_endpoint]``() const;
 
- endpoint_type ``[link boost_asio.reference.basic_socket.local_endpoint.overload2 local_endpoint]``(
+ endpoint_type ``[link boost_asio.reference.basic_raw_socket.local_endpoint.overload2 local_endpoint]``(
       boost::system::error_code & ec) const;
 
 
-[section:overload1 basic_socket::local_endpoint (1 of 2 overloads)]
+[section:overload1 basic_raw_socket::local_endpoint (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
 
 Get the local endpoint of the socket.
 
@@ -8121,7 +9791,10 @@
 
 
 
-[section:overload2 basic_socket::local_endpoint (2 of 2 overloads)]
+[section:overload2 basic_raw_socket::local_endpoint (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
 
 Get the local endpoint of the socket.
 
@@ -8169,7 +9842,10 @@
 [endsect]
 
 
-[section:lowest_layer basic_socket::lowest_layer]
+[section:lowest_layer basic_raw_socket::lowest_layer]
+
+
+['Inherited from basic_socket.]
 
 Get a reference to the lowest layer.
 
@@ -8189,11 +9865,14 @@
 
 
 
-[section:lowest_layer_type basic_socket::lowest_layer_type]
+[section:lowest_layer_type basic_raw_socket::lowest_layer_type]
+
+
+['Inherited from basic_socket.]
 
 A basic_socket is always the lowest layer.
 
- typedef basic_socket< Protocol, SocketService > lowest_layer_type;
+ typedef basic_socket< Protocol, RawSocketService > lowest_layer_type;
 
 
 [heading Types]
@@ -8460,6 +10139,17 @@
   
 ]
 
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_socket._basic_socket [*~basic_socket]]]
+ [Protected destructor to prevent deletion through this type. ]
+ ]
+
+]
+
 [heading Data Members]
 [table
   [[Name][Description]]
@@ -8486,6 +10176,22 @@
 
 ]
 
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_socket.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
+
+]
+
 The basic_socket class template provides functionality that is common to both stream-oriented and datagram-oriented sockets.
 
 
@@ -8502,7 +10208,7 @@
 
 
 
-[section:max_connections basic_socket::max_connections]
+[section:max_connections basic_raw_socket::max_connections]
 
 
 ['Inherited from socket_base.]
@@ -8517,7 +10223,7 @@
 
 
 
-[section:message_do_not_route basic_socket::message_do_not_route]
+[section:message_do_not_route basic_raw_socket::message_do_not_route]
 
 
 ['Inherited from socket_base.]
@@ -8532,7 +10238,7 @@
 
 
 
-[section:message_flags basic_socket::message_flags]
+[section:message_flags basic_raw_socket::message_flags]
 
 
 ['Inherited from socket_base.]
@@ -8548,7 +10254,7 @@
 
 
 
-[section:message_out_of_band basic_socket::message_out_of_band]
+[section:message_out_of_band basic_raw_socket::message_out_of_band]
 
 
 ['Inherited from socket_base.]
@@ -8563,7 +10269,7 @@
 
 
 
-[section:message_peek basic_socket::message_peek]
+[section:message_peek basic_raw_socket::message_peek]
 
 
 ['Inherited from socket_base.]
@@ -8578,7 +10284,10 @@
 
 
 
-[section:native basic_socket::native]
+[section:native basic_raw_socket::native]
+
+
+['Inherited from basic_socket.]
 
 Get the native socket representation.
 
@@ -8592,11 +10301,11 @@
 
 
 
-[section:native_type basic_socket::native_type]
+[section:native_type basic_raw_socket::native_type]
 
 The native representation of a socket.
 
- typedef SocketService::native_type native_type;
+ typedef RawSocketService::native_type native_type;
 
 
 
@@ -8605,7 +10314,7 @@
 
 
 
-[section:non_blocking_io basic_socket::non_blocking_io]
+[section:non_blocking_io basic_raw_socket::non_blocking_io]
 
 
 ['Inherited from socket_base.]
@@ -8636,19 +10345,22 @@
 [endsect]
 
 
-[section:open basic_socket::open]
+[section:open basic_raw_socket::open]
 
 Open the socket using the specified protocol.
 
- void ``[link boost_asio.reference.basic_socket.open.overload1 open]``(
+ void ``[link boost_asio.reference.basic_raw_socket.open.overload1 open]``(
       const protocol_type & protocol = protocol_type());
 
- boost::system::error_code ``[link boost_asio.reference.basic_socket.open.overload2 open]``(
+ boost::system::error_code ``[link boost_asio.reference.basic_raw_socket.open.overload2 open]``(
       const protocol_type & protocol,
       boost::system::error_code & ec);
 
 
-[section:overload1 basic_socket::open (1 of 2 overloads)]
+[section:overload1 basic_raw_socket::open (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
 
 Open the socket using the specified protocol.
 
@@ -8693,7 +10405,10 @@
 
 
 
-[section:overload2 basic_socket::open (2 of 2 overloads)]
+[section:overload2 basic_raw_socket::open (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
 
 Open the socket using the specified protocol.
 
@@ -8739,7 +10454,7 @@
 [endsect]
 
 
-[section:protocol_type basic_socket::protocol_type]
+[section:protocol_type basic_raw_socket::protocol_type]
 
 The protocol type.
 
@@ -8751,43 +10466,78 @@
 [endsect]
 
 
+[section:receive basic_raw_socket::receive]
 
-[section:receive_buffer_size basic_socket::receive_buffer_size]
+Receive some data on a connected socket.
 
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_raw_socket.receive.overload1 receive]``(
+ const MutableBufferSequence & buffers);
 
-['Inherited from socket_base.]
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_raw_socket.receive.overload2 receive]``(
+ const MutableBufferSequence & buffers,
+ socket_base::message_flags flags);
 
-Socket option for the receive buffer size of a socket.
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_raw_socket.receive.overload3 receive]``(
+ const MutableBufferSequence & buffers,
+ socket_base::message_flags flags,
+ boost::system::error_code & ec);
 
- typedef implementation_defined receive_buffer_size;
 
+[section:overload1 basic_raw_socket::receive (1 of 3 overloads)]
 
+Receive some data on a connected socket.
 
-Implements the SOL\_SOCKET/SO\_RCVBUF socket option.
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t receive(
+ const MutableBufferSequence & buffers);
 
 
-[heading Examples]
-
-Setting the option:
+This function is used to receive data on the raw socket. The function call will block until data has been received successfully or an error occurs.
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::receive_buffer_size option(8192);
- socket.set_option(option);
 
+[heading Parameters]
+
 
+[variablelist
+
+[[buffers][One or more buffers into which the data will be received.]]
 
+]
 
-Getting the current option value:
+[heading Return Value]
+
+The number of bytes received.
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::receive_buffer_size option;
- socket.get_option(option);
- int size = option.value();
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Remarks]
+
+The receive operation can only be used with a connected socket. Use the receive\_from function to receive data on an unconnected raw socket.
+
+[heading Example]
+
+To receive into a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
 
+ socket.receive(boost::asio::buffer(data, size));
 
 
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
 
 
@@ -8795,18 +10545,110 @@
 
 
 
-[section:receive_low_watermark basic_socket::receive_low_watermark]
+[section:overload2 basic_raw_socket::receive (2 of 3 overloads)]
+
+Receive some data on a connected socket.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t receive(
+ const MutableBufferSequence & buffers,
+ socket_base::message_flags flags);
+
+
+This function is used to receive data on the raw socket. The function call will block until data has been received successfully or an error occurs.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[buffers][One or more buffers into which the data will be received.]]
+
+[[flags][Flags specifying how the receive call is to be made.]]
+
+]
+
+[heading Return Value]
+
+The number of bytes received.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Remarks]
+
+The receive operation can only be used with a connected socket. Use the receive\_from function to receive data on an unconnected raw socket.
+
+
+
+[endsect]
+
+
+
+[section:overload3 basic_raw_socket::receive (3 of 3 overloads)]
+
+Receive some data on a connected socket.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t receive(
+ const MutableBufferSequence & buffers,
+ socket_base::message_flags flags,
+ boost::system::error_code & ec);
+
+
+This function is used to receive data on the raw socket. The function call will block until data has been received successfully or an error occurs.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[buffers][One or more buffers into which the data will be received.]]
+
+[[flags][Flags specifying how the receive call is to be made.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Return Value]
+
+The number of bytes received.
+
+[heading Remarks]
+
+The receive operation can only be used with a connected socket. Use the receive\_from function to receive data on an unconnected raw socket.
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:receive_buffer_size basic_raw_socket::receive_buffer_size]
 
 
 ['Inherited from socket_base.]
 
-Socket option for the receive low watermark.
+Socket option for the receive buffer size of a socket.
 
- typedef implementation_defined receive_low_watermark;
+ typedef implementation_defined receive_buffer_size;
 
 
 
-Implements the SOL\_SOCKET/SO\_RCVLOWAT socket option.
+Implements the SOL\_SOCKET/SO\_RCVBUF socket option.
 
 
 [heading Examples]
@@ -8815,7 +10657,7 @@
 
    boost::asio::ip::tcp::socket socket(io_service);
    ...
- boost::asio::socket_base::receive_low_watermark option(1024);
+ boost::asio::socket_base::receive_buffer_size option(8192);
    socket.set_option(option);
 
 
@@ -8825,7 +10667,7 @@
 
    boost::asio::ip::tcp::socket socket(io_service);
    ...
- boost::asio::socket_base::receive_low_watermark option;
+ boost::asio::socket_base::receive_buffer_size option;
    socket.get_option(option);
    int size = option.value();
 
@@ -8837,29 +10679,60 @@
 [endsect]
 
 
-[section:remote_endpoint basic_socket::remote_endpoint]
+[section:receive_from basic_raw_socket::receive_from]
 
-Get the remote endpoint of the socket.
+Receive raw data with the endpoint of the sender.
 
- endpoint_type ``[link boost_asio.reference.basic_socket.remote_endpoint.overload1 remote_endpoint]``() const;
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_raw_socket.receive_from.overload1 receive_from]``(
+ const MutableBufferSequence & buffers,
+ endpoint_type & sender_endpoint);
 
- endpoint_type ``[link boost_asio.reference.basic_socket.remote_endpoint.overload2 remote_endpoint]``(
- boost::system::error_code & ec) const;
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_raw_socket.receive_from.overload2 receive_from]``(
+ const MutableBufferSequence & buffers,
+ endpoint_type & sender_endpoint,
+ socket_base::message_flags flags);
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_raw_socket.receive_from.overload3 receive_from]``(
+ const MutableBufferSequence & buffers,
+ endpoint_type & sender_endpoint,
+ socket_base::message_flags flags,
+ boost::system::error_code & ec);
 
 
-[section:overload1 basic_socket::remote_endpoint (1 of 2 overloads)]
+[section:overload1 basic_raw_socket::receive_from (1 of 3 overloads)]
 
-Get the remote endpoint of the socket.
+Receive raw data with the endpoint of the sender.
 
- endpoint_type remote_endpoint() const;
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t receive_from(
+ const MutableBufferSequence & buffers,
+ endpoint_type & sender_endpoint);
 
 
-This function is used to obtain the remote endpoint of the socket.
+This function is used to receive raw data. The function call will block until data has been received successfully or an error occurs.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[buffers][One or more buffers into which the data will be received.]]
+
+[[sender_endpoint][An endpoint object that receives the endpoint of the remote sender of the data.]]
 
+]
 
 [heading Return Value]
       
-An object that represents the remote endpoint of the socket.
+The number of bytes received.
 
 [heading Exceptions]
     
@@ -8872,14 +10745,16 @@
 
 [heading Example]
   
+To receive into a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
 
-
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::ip::tcp::endpoint endpoint = socket.remote_endpoint();
-
+ boost::asio::ip::udp::endpoint sender_endpoint;
+ socket.receive_from(
+ boost::asio::buffer(data, size), sender_endpoint);
 
 
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
 
 
@@ -8887,15 +10762,19 @@
 
 
 
-[section:overload2 basic_socket::remote_endpoint (2 of 2 overloads)]
+[section:overload2 basic_raw_socket::receive_from (2 of 3 overloads)]
 
-Get the remote endpoint of the socket.
+Receive raw data with the endpoint of the sender.
 
- endpoint_type remote_endpoint(
- boost::system::error_code & ec) const;
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t receive_from(
+ const MutableBufferSequence & buffers,
+ endpoint_type & sender_endpoint,
+ socket_base::message_flags flags);
 
 
-This function is used to obtain the remote endpoint of the socket.
+This function is used to receive raw data. The function call will block until data has been received successfully or an error occurs.
 
 
 [heading Parameters]
@@ -8903,93 +10782,88 @@
 
 [variablelist
   
-[[ec][Set to indicate what error occurred, if any.]]
+[[buffers][One or more buffers into which the data will be received.]]
+
+[[sender_endpoint][An endpoint object that receives the endpoint of the remote sender of the data.]]
+
+[[flags][Flags specifying how the receive call is to be made.]]
 
 ]
 
 [heading Return Value]
       
-An object that represents the remote endpoint of the socket. Returns a default-constructed endpoint object if an error occurred.
-
-[heading Example]
-
-
-
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::system::error_code ec;
- boost::asio::ip::tcp::endpoint endpoint = socket.remote_endpoint(ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
+The number of bytes received.
 
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
 
+]
 
-[endsect]
 
 
 [endsect]
 
 
-[section:reuse_address basic_socket::reuse_address]
-
 
-['Inherited from socket_base.]
+[section:overload3 basic_raw_socket::receive_from (3 of 3 overloads)]
 
-Socket option to allow the socket to be bound to an address that is already in use.
+Receive raw data with the endpoint of the sender.
 
- typedef implementation_defined reuse_address;
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t receive_from(
+ const MutableBufferSequence & buffers,
+ endpoint_type & sender_endpoint,
+ socket_base::message_flags flags,
+ boost::system::error_code & ec);
 
 
+This function is used to receive raw data. The function call will block until data has been received successfully or an error occurs.
 
-Implements the SOL\_SOCKET/SO\_REUSEADDR socket option.
 
+[heading Parameters]
+
 
-[heading Examples]
+[variablelist
   
-Setting the option:
-
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
- boost::asio::socket_base::reuse_address option(true);
- acceptor.set_option(option);
-
+[[buffers][One or more buffers into which the data will be received.]]
 
+[[sender_endpoint][An endpoint object that receives the endpoint of the remote sender of the data.]]
 
+[[flags][Flags specifying how the receive call is to be made.]]
 
-Getting the current option value:
+[[ec][Set to indicate what error occurred, if any.]]
 
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
- boost::asio::socket_base::reuse_address option;
- acceptor.get_option(option);
- bool is_set = option.value();
+]
 
+[heading Return Value]
+
+The number of bytes received.
 
 
 
+[endsect]
 
 
 [endsect]
 
 
-
-[section:send_buffer_size basic_socket::send_buffer_size]
+[section:receive_low_watermark basic_raw_socket::receive_low_watermark]
 
 
 ['Inherited from socket_base.]
 
-Socket option for the send buffer size of a socket.
+Socket option for the receive low watermark.
 
- typedef implementation_defined send_buffer_size;
+ typedef implementation_defined receive_low_watermark;
 
 
 
-Implements the SOL\_SOCKET/SO\_SNDBUF socket option.
+Implements the SOL\_SOCKET/SO\_RCVLOWAT socket option.
 
 
 [heading Examples]
@@ -8998,7 +10872,7 @@
 
    boost::asio::ip::tcp::socket socket(io_service);
    ...
- boost::asio::socket_base::send_buffer_size option(8192);
+ boost::asio::socket_base::receive_low_watermark option(1024);
    socket.set_option(option);
 
 
@@ -9008,7 +10882,7 @@
 
    boost::asio::ip::tcp::socket socket(io_service);
    ...
- boost::asio::socket_base::send_buffer_size option;
+ boost::asio::socket_base::receive_low_watermark option;
    socket.get_option(option);
    int size = option.value();
 
@@ -9020,58 +10894,51 @@
 [endsect]
 
 
+[section:remote_endpoint basic_raw_socket::remote_endpoint]
 
-[section:send_low_watermark basic_socket::send_low_watermark]
-
-
-['Inherited from socket_base.]
-
-Socket option for the send low watermark.
-
- typedef implementation_defined send_low_watermark;
-
-
-
-Implements the SOL\_SOCKET/SO\_SNDLOWAT socket option.
-
+Get the remote endpoint of the socket.
 
-[heading Examples]
-
-Setting the option:
+ endpoint_type ``[link boost_asio.reference.basic_raw_socket.remote_endpoint.overload1 remote_endpoint]``() const;
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::send_low_watermark option(1024);
- socket.set_option(option);
+ endpoint_type ``[link boost_asio.reference.basic_raw_socket.remote_endpoint.overload2 remote_endpoint]``(
+ boost::system::error_code & ec) const;
 
 
+[section:overload1 basic_raw_socket::remote_endpoint (1 of 2 overloads)]
 
 
-Getting the current option value:
+['Inherited from basic_socket.]
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::send_low_watermark option;
- socket.get_option(option);
- int size = option.value();
+Get the remote endpoint of the socket.
 
+ endpoint_type remote_endpoint() const;
 
 
+This function is used to obtain the remote endpoint of the socket.
 
 
+[heading Return Value]
+
+An object that represents the remote endpoint of the socket.
 
-[endsect]
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
 
+]
 
-[section:service_type basic_socket::service_type]
+[heading Example]
+
 
 
-['Inherited from basic_io_object.]
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::ip::tcp::endpoint endpoint = socket.remote_endpoint();
 
-The type of the service that will be used to provide I/O operations.
 
- typedef SocketService service_type;
 
 
 
@@ -9079,33 +10946,19 @@
 [endsect]
 
 
-[section:set_option basic_socket::set_option]
-
-Set an option on the socket.
-
- template<
- typename ``[link boost_asio.reference.SettableSocketOption SettableSocketOption]``>
- void ``[link boost_asio.reference.basic_socket.set_option.overload1 set_option]``(
- const SettableSocketOption & option);
 
- template<
- typename ``[link boost_asio.reference.SettableSocketOption SettableSocketOption]``>
- boost::system::error_code ``[link boost_asio.reference.basic_socket.set_option.overload2 set_option]``(
- const SettableSocketOption & option,
- boost::system::error_code & ec);
+[section:overload2 basic_raw_socket::remote_endpoint (2 of 2 overloads)]
 
 
-[section:overload1 basic_socket::set_option (1 of 2 overloads)]
+['Inherited from basic_socket.]
 
-Set an option on the socket.
+Get the remote endpoint of the socket.
 
- template<
- typename ``[link boost_asio.reference.SettableSocketOption SettableSocketOption]``>
- void set_option(
- const SettableSocketOption & option);
+ endpoint_type remote_endpoint(
+ boost::system::error_code & ec) const;
 
 
-This function is used to set an option on the socket.
+This function is used to obtain the remote endpoint of the socket.
 
 
 [heading Parameters]
@@ -9113,27 +10966,26 @@
 
 [variablelist
   
-[[option][The new option value to be set on the socket.]]
+[[ec][Set to indicate what error occurred, if any.]]
 
 ]
 
-[heading Exceptions]
-
-
-[variablelist
-
-[[boost::system::system_error][Thrown on failure.]]
-
-]
+[heading Return Value]
+
+An object that represents the remote endpoint of the socket. Returns a default-constructed endpoint object if an error occurred.
 
 [heading Example]
   
-Setting the IPPROTO\_TCP/TCP\_NODELAY option:
+
 
    boost::asio::ip::tcp::socket socket(io_service);
    ...
- boost::asio::ip::tcp::no_delay option(true);
- socket.set_option(option);
+ boost::system::error_code ec;
+ boost::asio::ip::tcp::endpoint endpoint = socket.remote_endpoint(ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
 
 
 
@@ -9143,77 +10995,85 @@
 [endsect]
 
 
+[endsect]
 
-[section:overload2 basic_socket::set_option (2 of 2 overloads)]
 
-Set an option on the socket.
+[section:reuse_address basic_raw_socket::reuse_address]
 
- template<
- typename ``[link boost_asio.reference.SettableSocketOption SettableSocketOption]``>
- boost::system::error_code set_option(
- const SettableSocketOption & option,
- boost::system::error_code & ec);
 
+['Inherited from socket_base.]
 
-This function is used to set an option on the socket.
+Socket option to allow the socket to be bound to an address that is already in use.
 
+ typedef implementation_defined reuse_address;
 
-[heading Parameters]
-
 
-[variablelist
-
-[[option][The new option value to be set on the socket.]]
 
-[[ec][Set to indicate what error occurred, if any.]]
+Implements the SOL\_SOCKET/SO\_REUSEADDR socket option.
 
-]
 
-[heading Example]
+[heading Examples]
   
-Setting the IPPROTO\_TCP/TCP\_NODELAY option:
+Setting the option:
 
- boost::asio::ip::tcp::socket socket(io_service);
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
    ...
- boost::asio::ip::tcp::no_delay option(true);
- boost::system::error_code ec;
- socket.set_option(option, ec);
- if (ec)
- {
- // An error occurred.
- }
+ boost::asio::socket_base::reuse_address option(true);
+ acceptor.set_option(option);
+
 
 
 
+Getting the current option value:
+
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
+ boost::asio::socket_base::reuse_address option;
+ acceptor.get_option(option);
+ bool is_set = option.value();
+
 
 
 
-[endsect]
 
 
 [endsect]
 
-[section:shutdown basic_socket::shutdown]
 
-Disable sends or receives on the socket.
+[section:send basic_raw_socket::send]
 
- void ``[link boost_asio.reference.basic_socket.shutdown.overload1 shutdown]``(
- shutdown_type what);
+Send some data on a connected socket.
 
- boost::system::error_code ``[link boost_asio.reference.basic_socket.shutdown.overload2 shutdown]``(
- shutdown_type what,
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_raw_socket.send.overload1 send]``(
+ const ConstBufferSequence & buffers);
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_raw_socket.send.overload2 send]``(
+ const ConstBufferSequence & buffers,
+ socket_base::message_flags flags);
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_raw_socket.send.overload3 send]``(
+ const ConstBufferSequence & buffers,
+ socket_base::message_flags flags,
       boost::system::error_code & ec);
 
 
-[section:overload1 basic_socket::shutdown (1 of 2 overloads)]
+[section:overload1 basic_raw_socket::send (1 of 3 overloads)]
 
-Disable sends or receives on the socket.
+Send some data on a connected socket.
 
- void shutdown(
- shutdown_type what);
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t send(
+ const ConstBufferSequence & buffers);
 
 
-This function is used to disable send operations, receive operations, or both.
+This function is used to send data on the raw socket. The function call will block until the data has been sent successfully or an error occurs.
 
 
 [heading Parameters]
@@ -9221,10 +11081,14 @@
 
 [variablelist
   
-[[what][Determines what types of operation will no longer be allowed.]]
+[[buffers][One ore more data buffers to be sent on the socket.]]
 
 ]
 
+[heading Return Value]
+
+The number of bytes sent.
+
 [heading Exceptions]
     
 
@@ -9234,16 +11098,20 @@
 
 ]
 
+[heading Remarks]
+
+The send operation can only be used with a connected socket. Use the send\_to function to send data on an unconnected raw socket.
+
 [heading Example]
   
-Shutting down the send side of the socket:
-
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- socket.shutdown(boost::asio::ip::tcp::socket::shutdown_send);
+To send a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
 
+ socket.send(boost::asio::buffer(data, size));
 
 
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
 
 
@@ -9251,16 +11119,18 @@
 
 
 
-[section:overload2 basic_socket::shutdown (2 of 2 overloads)]
+[section:overload2 basic_raw_socket::send (2 of 3 overloads)]
 
-Disable sends or receives on the socket.
+Send some data on a connected socket.
 
- boost::system::error_code shutdown(
- shutdown_type what,
- boost::system::error_code & ec);
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t send(
+ const ConstBufferSequence & buffers,
+ socket_base::message_flags flags);
 
 
-This function is used to disable send operations, receive operations, or both.
+This function is used to send data on the raw socket. The function call will block until the data has been sent successfully or an error occurs.
 
 
 [heading Parameters]
@@ -9268,407 +11138,260 @@
 
 [variablelist
   
-[[what][Determines what types of operation will no longer be allowed.]]
+[[buffers][One ore more data buffers to be sent on the socket.]]
 
-[[ec][Set to indicate what error occurred, if any.]]
+[[flags][Flags specifying how the send call is to be made.]]
 
 ]
 
-[heading Example]
-
-Shutting down the send side of the socket:
+[heading Return Value]
+
+The number of bytes sent.
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::system::error_code ec;
- socket.shutdown(boost::asio::ip::tcp::socket::shutdown_send, ec);
- if (ec)
- {
- // An error occurred.
- }
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
 
+]
 
+[heading Remarks]
+
+The send operation can only be used with a connected socket. Use the send\_to function to send data on an unconnected raw socket.
 
 
 
 [endsect]
 
 
-[endsect]
 
+[section:overload3 basic_raw_socket::send (3 of 3 overloads)]
 
-[section:shutdown_type basic_socket::shutdown_type]
+Send some data on a connected socket.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t send(
+ const ConstBufferSequence & buffers,
+ socket_base::message_flags flags,
+ boost::system::error_code & ec);
 
 
-['Inherited from socket_base.]
+This function is used to send data on the raw socket. The function call will block until the data has been sent successfully or an error occurs.
 
-Different ways a socket may be shutdown.
 
- enum shutdown_type
+[heading Parameters]
+
 
-[heading Values]
 [variablelist
+
+[[buffers][One or more data buffers to be sent on the socket.]]
 
- [
- [shutdown_receive]
- [Shutdown the receive side of the socket. ]
- ]
-
- [
- [shutdown_send]
- [Shutdown the send side of the socket. ]
- ]
+[[flags][Flags specifying how the send call is to be made.]]
 
- [
- [shutdown_both]
- [Shutdown both send and receive on the socket. ]
- ]
+[[ec][Set to indicate what error occurred, if any.]]
 
 ]
 
+[heading Return Value]
+
+The number of bytes sent.
+
+[heading Remarks]
+
+The send operation can only be used with a connected socket. Use the send\_to function to send data on an unconnected raw socket.
 
 
-[endsect]
 
+[endsect]
 
 
 [endsect]
 
-[section:basic_socket_acceptor basic_socket_acceptor]
 
-Provides the ability to accept new connections.
+[section:send_buffer_size basic_raw_socket::send_buffer_size]
 
- template<
- typename ``[link boost_asio.reference.Protocol Protocol]``,
- typename ``[link boost_asio.reference.SocketAcceptorService SocketAcceptorService]`` = socket_acceptor_service<Protocol>>
- class basic_socket_acceptor :
- public basic_io_object< SocketAcceptorService >,
- public socket_base
 
+['Inherited from socket_base.]
 
-[heading Types]
-[table
- [[Name][Description]]
+Socket option for the send buffer size of a socket.
 
- [
+ typedef implementation_defined send_buffer_size;
 
- [[link boost_asio.reference.basic_socket_acceptor.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.basic_socket_acceptor.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
+Implements the SOL\_SOCKET/SO\_SNDBUF socket option.
 
- [
 
- [[link boost_asio.reference.basic_socket_acceptor.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
+[heading Examples]
   
- ]
+Setting the option:
 
- [
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::send_buffer_size option(8192);
+ socket.set_option(option);
 
- [[link boost_asio.reference.basic_socket_acceptor.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.basic_socket_acceptor.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
 
- [
+Getting the current option value:
 
- [[link boost_asio.reference.basic_socket_acceptor.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::send_buffer_size option;
+ socket.get_option(option);
+ int size = option.value();
 
- [
 
- [[link boost_asio.reference.basic_socket_acceptor.implementation_type [*implementation_type]]]
- [The underlying implementation type of I/O object. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.basic_socket_acceptor.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.basic_socket_acceptor.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
+[endsect]
 
- [
 
- [[link boost_asio.reference.basic_socket_acceptor.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
 
- [
+[section:send_low_watermark basic_raw_socket::send_low_watermark]
 
- [[link boost_asio.reference.basic_socket_acceptor.native_type [*native_type]]]
- [The native representation of an acceptor. ]
-
- ]
 
- [
+['Inherited from socket_base.]
 
- [[link boost_asio.reference.basic_socket_acceptor.non_blocking_io [*non_blocking_io]]]
- [IO control command to set the blocking mode of the socket. ]
-
- ]
+Socket option for the send low watermark.
 
- [
+ typedef implementation_defined send_low_watermark;
 
- [[link boost_asio.reference.basic_socket_acceptor.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.basic_socket_acceptor.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
+Implements the SOL\_SOCKET/SO\_SNDLOWAT socket option.
 
- [
 
- [[link boost_asio.reference.basic_socket_acceptor.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
+[heading Examples]
   
- ]
+Setting the option:
 
- [
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::send_low_watermark option(1024);
+ socket.set_option(option);
 
- [[link boost_asio.reference.basic_socket_acceptor.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.basic_socket_acceptor.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
 
- [
+Getting the current option value:
 
- [[link boost_asio.reference.basic_socket_acceptor.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::send_low_watermark option;
+ socket.get_option(option);
+ int size = option.value();
 
- [
 
- [[link boost_asio.reference.basic_socket_acceptor.service_type [*service_type]]]
- [The type of the service that will be used to provide I/O operations. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.basic_socket_acceptor.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
 
-]
 
-[heading Member Functions]
-[table
- [[Name][Description]]
+[endsect]
 
- [
- [[link boost_asio.reference.basic_socket_acceptor.accept [*accept]]]
- [Accept a new connection. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.assign [*assign]]]
- [Assigns an existing native acceptor to the acceptor. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.async_accept [*async_accept]]]
- [Start an asynchronous accept. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.basic_socket_acceptor [*basic_socket_acceptor]]]
- [Construct an acceptor without opening it. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.bind [*bind]]]
- [Bind the acceptor to the given local endpoint. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the acceptor. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.close [*close]]]
- [Close the acceptor. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.get_io_service [*get_io_service]]]
- [Get the io_service associated with the object. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.get_option [*get_option]]]
- [Get an option from the acceptor. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.io_service [*io_service]]]
- [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.is_open [*is_open]]]
- [Determine whether the acceptor is open. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.listen [*listen]]]
- [Place the acceptor into the state where it will listen for new connections. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the acceptor. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.native [*native]]]
- [Get the native acceptor representation. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.open [*open]]]
- [Open the acceptor using the specified protocol. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.set_option [*set_option]]]
- [Set an option on the acceptor. ]
- ]
-
-]
 
-[heading Data Members]
-[table
- [[Name][Description]]
+[section:send_to basic_raw_socket::send_to]
 
- [
- [[link boost_asio.reference.basic_socket_acceptor.max_connections [*max_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
+Send raw data to the specified endpoint.
 
- [
- [[link boost_asio.reference.basic_socket_acceptor.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_raw_socket.send_to.overload1 send_to]``(
+ const ConstBufferSequence & buffers,
+ const endpoint_type & destination);
 
- [
- [[link boost_asio.reference.basic_socket_acceptor.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_raw_socket.send_to.overload2 send_to]``(
+ const ConstBufferSequence & buffers,
+ const endpoint_type & destination,
+ socket_base::message_flags flags);
 
- [
- [[link boost_asio.reference.basic_socket_acceptor.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_raw_socket.send_to.overload3 send_to]``(
+ const ConstBufferSequence & buffers,
+ const endpoint_type & destination,
+ socket_base::message_flags flags,
+ boost::system::error_code & ec);
 
-]
 
-The basic_socket_acceptor class template is used for accepting new socket connections.
+[section:overload1 basic_raw_socket::send_to (1 of 3 overloads)]
 
+Send raw data to the specified endpoint.
 
-[heading Thread Safety]
-
-[*Distinct] [*objects:] Safe.
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t send_to(
+ const ConstBufferSequence & buffers,
+ const endpoint_type & destination);
 
-[*Shared] [*objects:] Unsafe.
 
-[heading Example]
+This function is used to send raw data to the specified remote endpoint. The function call will block until the data has been sent successfully or an error occurs.
+
+
+[heading Parameters]
+
+
+[variablelist
   
-Opening a socket acceptor with the SO\_REUSEADDR option enabled:
+[[buffers][One or more data buffers to be sent to the remote endpoint.]]
 
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::tcp::v4(), port);
- acceptor.open(endpoint.protocol());
- acceptor.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true));
- acceptor.bind(endpoint);
- acceptor.listen();
+[[destination][The remote endpoint to which the data will be sent.]]
 
+]
 
+[heading Return Value]
+
+The number of bytes sent.
 
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
 
-[section:accept basic_socket_acceptor::accept]
+]
 
-Accept a new connection.
+[heading Example]
+
+To send a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
 
- template<
- typename ``[link boost_asio.reference.SocketService SocketService]``>
- void ``[link boost_asio.reference.basic_socket_acceptor.accept.overload1 accept]``(
- basic_socket< protocol_type, SocketService > & peer);
+ boost::asio::ip::udp::endpoint destination(
+ boost::asio::ip::address::from_string("1.2.3.4"), 12345);
+ socket.send_to(boost::asio::buffer(data, size), destination);
 
- template<
- typename ``[link boost_asio.reference.SocketService SocketService]``>
- boost::system::error_code ``[link boost_asio.reference.basic_socket_acceptor.accept.overload2 accept]``(
- basic_socket< protocol_type, SocketService > & peer,
- boost::system::error_code & ec);
 
- template<
- typename ``[link boost_asio.reference.SocketService SocketService]``>
- void ``[link boost_asio.reference.basic_socket_acceptor.accept.overload3 accept]``(
- basic_socket< protocol_type, SocketService > & peer,
- endpoint_type & peer_endpoint);
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
- template<
- typename ``[link boost_asio.reference.SocketService SocketService]``>
- boost::system::error_code ``[link boost_asio.reference.basic_socket_acceptor.accept.overload4 accept]``(
- basic_socket< protocol_type, SocketService > & peer,
- endpoint_type & peer_endpoint,
- boost::system::error_code & ec);
 
 
-[section:overload1 basic_socket_acceptor::accept (1 of 4 overloads)]
+[endsect]
 
-Accept a new connection.
+
+
+[section:overload2 basic_raw_socket::send_to (2 of 3 overloads)]
+
+Send raw data to the specified endpoint.
 
   template<
- typename ``[link boost_asio.reference.SocketService SocketService]``>
- void accept(
- basic_socket< protocol_type, SocketService > & peer);
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t send_to(
+ const ConstBufferSequence & buffers,
+ const endpoint_type & destination,
+ socket_base::message_flags flags);
 
 
-This function is used to accept a new connection from a peer into the given socket. The function call will block until a new connection has been accepted successfully or an error occurs.
+This function is used to send raw data to the specified remote endpoint. The function call will block until the data has been sent successfully or an error occurs.
 
 
 [heading Parameters]
@@ -9676,49 +11399,47 @@
 
 [variablelist
   
-[[peer][The socket into which the new connection will be accepted.]]
+[[buffers][One or more data buffers to be sent to the remote endpoint.]]
+
+[[destination][The remote endpoint to which the data will be sent.]]
+
+[[flags][Flags specifying how the send call is to be made.]]
 
 ]
 
+[heading Return Value]
+
+The number of bytes sent.
+
 [heading Exceptions]
     
 
 [variablelist
   
-[[boost::system::system_error][Thrown on failure.]]
+[[boost::system::system_error][Thrown on failure. ]]
 
 ]
 
-[heading Example]
-
-
-
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
- boost::asio::ip::tcp::socket socket(io_service);
- acceptor.accept(socket);
-
-
-
-
 
 
 [endsect]
 
 
 
-[section:overload2 basic_socket_acceptor::accept (2 of 4 overloads)]
+[section:overload3 basic_raw_socket::send_to (3 of 3 overloads)]
 
-Accept a new connection.
+Send raw data to the specified endpoint.
 
   template<
- typename ``[link boost_asio.reference.SocketService SocketService]``>
- boost::system::error_code accept(
- basic_socket< protocol_type, SocketService > & peer,
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t send_to(
+ const ConstBufferSequence & buffers,
+ const endpoint_type & destination,
+ socket_base::message_flags flags,
       boost::system::error_code & ec);
 
 
-This function is used to accept a new connection from a peer into the given socket. The function call will block until a new connection has been accepted successfully or an error occurs.
+This function is used to send raw data to the specified remote endpoint. The function call will block until the data has been sent successfully or an error occurs.
 
 
 [heading Parameters]
@@ -9726,28 +11447,36 @@
 
 [variablelist
   
-[[peer][The socket into which the new connection will be accepted.]]
+[[buffers][One or more data buffers to be sent to the remote endpoint.]]
+
+[[destination][The remote endpoint to which the data will be sent.]]
+
+[[flags][Flags specifying how the send call is to be made.]]
 
 [[ec][Set to indicate what error occurred, if any.]]
 
 ]
 
-[heading Example]
-
+[heading Return Value]
+
+The number of bytes sent.
 
 
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
- boost::asio::ip::tcp::soocket socket(io_service);
- boost::system::error_code ec;
- acceptor.accept(socket, ec);
- if (ec)
- {
- // An error occurred.
- }
+
+[endsect]
+
+
+[endsect]
+
+
+[section:service basic_raw_socket::service]
 
 
+['Inherited from basic_io_object.]
+
+The service associated with the I/O object.
 
+ service_type & service;
 
 
 
@@ -9755,18 +11484,45 @@
 
 
 
-[section:overload3 basic_socket_acceptor::accept (3 of 4 overloads)]
+[section:service_type basic_raw_socket::service_type]
 
-Accept a new connection and obtain the endpoint of the peer.
 
- template<
- typename ``[link boost_asio.reference.SocketService SocketService]``>
- void accept(
- basic_socket< protocol_type, SocketService > & peer,
- endpoint_type & peer_endpoint);
+['Inherited from basic_io_object.]
 
+The type of the service that will be used to provide I/O operations.
 
-This function is used to accept a new connection from a peer into the given socket, and additionally provide the endpoint of the remote peer. The function call will block until a new connection has been accepted successfully or an error occurs.
+ typedef RawSocketService service_type;
+
+
+
+
+[endsect]
+
+
+[section:set_option basic_raw_socket::set_option]
+
+Set an option on the socket.
+
+ void ``[link boost_asio.reference.basic_raw_socket.set_option.overload1 set_option]``(
+ const SettableSocketOption & option);
+
+ boost::system::error_code ``[link boost_asio.reference.basic_raw_socket.set_option.overload2 set_option]``(
+ const SettableSocketOption & option,
+ boost::system::error_code & ec);
+
+
+[section:overload1 basic_raw_socket::set_option (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Set an option on the socket.
+
+ void set_option(
+ const SettableSocketOption & option);
+
+
+This function is used to set an option on the socket.
 
 
 [heading Parameters]
@@ -9774,9 +11530,7 @@
 
 [variablelist
   
-[[peer][The socket into which the new connection will be accepted.]]
-
-[[peer_endpoint][An endpoint object which will receive the endpoint of the remote peer.]]
+[[option][The new option value to be set on the socket.]]
 
 ]
 
@@ -9791,13 +11545,12 @@
 
 [heading Example]
   
+Setting the IPPROTO\_TCP/TCP\_NODELAY option:
 
-
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
    boost::asio::ip::tcp::socket socket(io_service);
- boost::asio::ip::tcp::endpoint endpoint;
- acceptor.accept(socket, endpoint);
+ ...
+ boost::asio::ip::tcp::no_delay option(true);
+ socket.set_option(option);
 
 
 
@@ -9808,19 +11561,19 @@
 
 
 
-[section:overload4 basic_socket_acceptor::accept (4 of 4 overloads)]
+[section:overload2 basic_raw_socket::set_option (2 of 2 overloads)]
 
-Accept a new connection and obtain the endpoint of the peer.
 
- template<
- typename ``[link boost_asio.reference.SocketService SocketService]``>
- boost::system::error_code accept(
- basic_socket< protocol_type, SocketService > & peer,
- endpoint_type & peer_endpoint,
+['Inherited from basic_socket.]
+
+Set an option on the socket.
+
+ boost::system::error_code set_option(
+ const SettableSocketOption & option,
       boost::system::error_code & ec);
 
 
-This function is used to accept a new connection from a peer into the given socket, and additionally provide the endpoint of the remote peer. The function call will block until a new connection has been accepted successfully or an error occurs.
+This function is used to set an option on the socket.
 
 
 [heading Parameters]
@@ -9828,9 +11581,7 @@
 
 [variablelist
   
-[[peer][The socket into which the new connection will be accepted.]]
-
-[[peer_endpoint][An endpoint object which will receive the endpoint of the remote peer.]]
+[[option][The new option value to be set on the socket.]]
 
 [[ec][Set to indicate what error occurred, if any.]]
 
@@ -9838,14 +11589,13 @@
 
 [heading Example]
   
+Setting the IPPROTO\_TCP/TCP\_NODELAY option:
 
-
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
    boost::asio::ip::tcp::socket socket(io_service);
- boost::asio::ip::tcp::endpoint endpoint;
+ ...
+ boost::asio::ip::tcp::no_delay option(true);
    boost::system::error_code ec;
- acceptor.accept(socket, endpoint, ec);
+ socket.set_option(option, ec);
    if (ec)
    {
      // An error occurred.
@@ -9861,83 +11611,80 @@
 
 [endsect]
 
-[section:assign basic_socket_acceptor::assign]
+[section:shutdown basic_raw_socket::shutdown]
 
-Assigns an existing native acceptor to the acceptor.
+Disable sends or receives on the socket.
 
- void ``[link boost_asio.reference.basic_socket_acceptor.assign.overload1 assign]``(
- const protocol_type & protocol,
- const native_type & native_acceptor);
+ void ``[link boost_asio.reference.basic_raw_socket.shutdown.overload1 shutdown]``(
+ shutdown_type what);
 
- boost::system::error_code ``[link boost_asio.reference.basic_socket_acceptor.assign.overload2 assign]``(
- const protocol_type & protocol,
- const native_type & native_acceptor,
+ boost::system::error_code ``[link boost_asio.reference.basic_raw_socket.shutdown.overload2 shutdown]``(
+ shutdown_type what,
       boost::system::error_code & ec);
 
 
-[section:overload1 basic_socket_acceptor::assign (1 of 2 overloads)]
+[section:overload1 basic_raw_socket::shutdown (1 of 2 overloads)]
 
-Assigns an existing native acceptor to the acceptor.
 
- void assign(
- const protocol_type & protocol,
- const native_type & native_acceptor);
+['Inherited from basic_socket.]
 
+Disable sends or receives on the socket.
 
+ void shutdown(
+ shutdown_type what);
 
-[endsect]
 
+This function is used to disable send operations, receive operations, or both.
 
 
-[section:overload2 basic_socket_acceptor::assign (2 of 2 overloads)]
+[heading Parameters]
+
 
-Assigns an existing native acceptor to the acceptor.
+[variablelist
+
+[[what][Determines what types of operation will no longer be allowed.]]
 
- boost::system::error_code assign(
- const protocol_type & protocol,
- const native_type & native_acceptor,
- boost::system::error_code & ec);
+]
 
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
 
-[endsect]
+]
 
+[heading Example]
+
+Shutting down the send side of the socket:
 
-[endsect]
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ socket.shutdown(boost::asio::ip::tcp::socket::shutdown_send);
 
-[section:async_accept basic_socket_acceptor::async_accept]
 
-Start an asynchronous accept.
 
- template<
- typename ``[link boost_asio.reference.SocketService SocketService]``,
- typename ``[link boost_asio.reference.AcceptHandler AcceptHandler]``>
- void ``[link boost_asio.reference.basic_socket_acceptor.async_accept.overload1 async_accept]``(
- basic_socket< protocol_type, SocketService > & peer,
- AcceptHandler handler);
 
- template<
- typename ``[link boost_asio.reference.SocketService SocketService]``,
- typename ``[link boost_asio.reference.AcceptHandler AcceptHandler]``>
- void ``[link boost_asio.reference.basic_socket_acceptor.async_accept.overload2 async_accept]``(
- basic_socket< protocol_type, SocketService > & peer,
- endpoint_type & peer_endpoint,
- AcceptHandler handler);
 
 
-[section:overload1 basic_socket_acceptor::async_accept (1 of 2 overloads)]
+[endsect]
 
-Start an asynchronous accept.
 
- template<
- typename ``[link boost_asio.reference.SocketService SocketService]``,
- typename ``[link boost_asio.reference.AcceptHandler AcceptHandler]``>
- void async_accept(
- basic_socket< protocol_type, SocketService > & peer,
- AcceptHandler handler);
 
+[section:overload2 basic_raw_socket::shutdown (2 of 2 overloads)]
 
-This function is used to asynchronously accept a new connection into a socket. The function call always returns immediately.
+
+['Inherited from basic_socket.]
+
+Disable sends or receives on the socket.
+
+ boost::system::error_code shutdown(
+ shutdown_type what,
+ boost::system::error_code & ec);
+
+
+This function is used to disable send operations, receive operations, or both.
 
 
 [heading Parameters]
@@ -9945,38 +11692,25 @@
 
 [variablelist
   
-[[peer][The socket into which the new connection will be accepted. Ownership of the peer object is retained by the caller, which must guarantee that it is valid until the handler is called.]]
-
-[[handler][The handler to be called when the accept operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const boost::system::error_code& error // Result of operation.
- );
+[[what][Determines what types of operation will no longer be allowed.]]
 
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
+[[ec][Set to indicate what error occurred, if any.]]
 
 ]
 
 [heading Example]
   
+Shutting down the send side of the socket:
 
-
- void accept_handler(const boost::system::error_code& error)
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::system::error_code ec;
+ socket.shutdown(boost::asio::ip::tcp::socket::shutdown_send, ec);
+ if (ec)
    {
- if (!error)
- {
- // Accept succeeded.
- }
+ // An error occurred.
    }
 
- ...
-
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
- boost::asio::ip::tcp::socket socket(io_service);
- acceptor.async_accept(socket, accept_handler);
-
 
 
 
@@ -9985,40 +11719,35 @@
 [endsect]
 
 
+[endsect]
 
-[section:overload2 basic_socket_acceptor::async_accept (2 of 2 overloads)]
-
-Start an asynchronous accept.
 
- template<
- typename ``[link boost_asio.reference.SocketService SocketService]``,
- typename ``[link boost_asio.reference.AcceptHandler AcceptHandler]``>
- void async_accept(
- basic_socket< protocol_type, SocketService > & peer,
- endpoint_type & peer_endpoint,
- AcceptHandler handler);
+[section:shutdown_type basic_raw_socket::shutdown_type]
 
 
-This function is used to asynchronously accept a new connection into a socket, and additionally obtain the endpoint of the remote peer. The function call always returns immediately.
+['Inherited from socket_base.]
 
+Different ways a socket may be shutdown.
 
-[heading Parameters]
-
+ enum shutdown_type
 
+[heading Values]
 [variablelist
-
-[[peer][The socket into which the new connection will be accepted. Ownership of the peer object is retained by the caller, which must guarantee that it is valid until the handler is called.]]
 
-[[peer_endpoint][An endpoint object into which the endpoint of the remote peer will be written. Ownership of the peer\_endpoint object is retained by the caller, which must guarantee that it is valid until the handler is called.]]
+ [
+ [shutdown_receive]
+ [Shutdown the receive side of the socket. ]
+ ]
 
-[[handler][The handler to be called when the accept operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const boost::system::error_code& error // Result of operation.
- );
+ [
+ [shutdown_send]
+ [Shutdown the send side of the socket. ]
+ ]
 
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post(). ]]
+ [
+ [shutdown_both]
+ [Shutdown both send and receive on the socket. ]
+ ]
 
 ]
 
@@ -10027,87 +11756,189 @@
 [endsect]
 
 
-[endsect]
-
-[section:basic_socket_acceptor basic_socket_acceptor::basic_socket_acceptor]
 
-Construct an acceptor without opening it.
+[endsect]
 
- ``[link boost_asio.reference.basic_socket_acceptor.basic_socket_acceptor.overload1 basic_socket_acceptor]``(
- boost::asio::io_service & io_service);
+[section:basic_serial_port basic_serial_port]
 
- ``[link boost_asio.reference.basic_socket_acceptor.basic_socket_acceptor.overload2 basic_socket_acceptor]``(
- boost::asio::io_service & io_service,
- const protocol_type & protocol);
+Provides serial port functionality.
 
- ``[link boost_asio.reference.basic_socket_acceptor.basic_socket_acceptor.overload3 basic_socket_acceptor]``(
- boost::asio::io_service & io_service,
- const endpoint_type & endpoint,
- bool reuse_addr = true);
+ template<
+ typename ``[link boost_asio.reference.SerialPortService SerialPortService]`` = serial_port_service>
+ class basic_serial_port :
+ public basic_io_object< SerialPortService >,
+ public serial_port_base
 
- ``[link boost_asio.reference.basic_socket_acceptor.basic_socket_acceptor.overload4 basic_socket_acceptor]``(
- boost::asio::io_service & io_service,
- const protocol_type & protocol,
- const native_type & native_acceptor);
 
+[heading Types]
+[table
+ [[Name][Description]]
 
-[section:overload1 basic_socket_acceptor::basic_socket_acceptor (1 of 4 overloads)]
+ [
 
-Construct an acceptor without opening it.
+ [[link boost_asio.reference.basic_serial_port.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
 
- basic_socket_acceptor(
- boost::asio::io_service & io_service);
+ [
 
+ [[link boost_asio.reference.basic_serial_port.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_serial_port is always the lowest layer. ]
+
+ ]
 
-This constructor creates an acceptor without opening it to listen for new connections. The open() function must be called before the acceptor can accept new socket connections.
+ [
 
+ [[link boost_asio.reference.basic_serial_port.native_type [*native_type]]]
+ [The native representation of a serial port. ]
+
+ ]
 
-[heading Parameters]
-
+ [
 
-[variablelist
+ [[link boost_asio.reference.basic_serial_port.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
   
-[[io_service][The io\_service object that the acceptor will use to dispatch handlers for any asynchronous operations performed on the acceptor. ]]
+ ]
 
 ]
 
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.basic_serial_port.assign [*assign]]]
+ [Assign an existing native serial port to the serial port. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.async_read_some [*async_read_some]]]
+ [Start an asynchronous read. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.async_write_some [*async_write_some]]]
+ [Start an asynchronous write. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.basic_serial_port [*basic_serial_port]]]
+ [Construct a basic_serial_port without opening it. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the serial port. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.close [*close]]]
+ [Close the serial port. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.get_option [*get_option]]]
+ [Get an option from the serial port. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.is_open [*is_open]]]
+ [Determine whether the serial port is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.native [*native]]]
+ [Get the native serial port representation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.open [*open]]]
+ [Open the serial port using the specified device name. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.read_some [*read_some]]]
+ [Read some data from the serial port. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.send_break [*send_break]]]
+ [Send a break sequence to the serial port. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.set_option [*set_option]]]
+ [Set an option on the serial port. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.write_some [*write_some]]]
+ [Write some data to the serial port. ]
+ ]
+
+]
 
-[endsect]
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.basic_serial_port.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
 
+ [
+ [[link boost_asio.reference.basic_serial_port.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
 
-[section:overload2 basic_socket_acceptor::basic_socket_acceptor (2 of 4 overloads)]
+]
 
-Construct an open acceptor.
+The basic_serial_port class template provides functionality that is common to all serial ports.
 
- basic_socket_acceptor(
- boost::asio::io_service & io_service,
- const protocol_type & protocol);
 
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
-This constructor creates an acceptor and automatically opens it.
+[*Shared] [*objects:] Unsafe.
 
 
-[heading Parameters]
-
+[section:assign basic_serial_port::assign]
 
-[variablelist
-
-[[io_service][The io\_service object that the acceptor will use to dispatch handlers for any asynchronous operations performed on the acceptor.]]
+Assign an existing native serial port to the serial port.
 
-[[protocol][An object specifying protocol parameters to be used.]]
+ void ``[link boost_asio.reference.basic_serial_port.assign.overload1 assign]``(
+ const native_type & native_serial_port);
 
-]
+ boost::system::error_code ``[link boost_asio.reference.basic_serial_port.assign.overload2 assign]``(
+ const native_type & native_serial_port,
+ boost::system::error_code & ec);
 
-[heading Exceptions]
-
 
-[variablelist
-
-[[boost::system::system_error][Thrown on failure. ]]
+[section:overload1 basic_serial_port::assign (1 of 2 overloads)]
 
-]
+Assign an existing native serial port to the serial port.
+
+ void assign(
+ const native_type & native_serial_port);
 
 
 
@@ -10115,54 +11946,71 @@
 
 
 
-[section:overload3 basic_socket_acceptor::basic_socket_acceptor (3 of 4 overloads)]
+[section:overload2 basic_serial_port::assign (2 of 2 overloads)]
 
-Construct an acceptor opened on the given endpoint.
+Assign an existing native serial port to the serial port.
 
- basic_socket_acceptor(
- boost::asio::io_service & io_service,
- const endpoint_type & endpoint,
- bool reuse_addr = true);
+ boost::system::error_code assign(
+ const native_type & native_serial_port,
+ boost::system::error_code & ec);
 
 
-This constructor creates an acceptor and automatically opens it to listen for new connections on the specified endpoint.
 
+[endsect]
 
-[heading Parameters]
-
 
-[variablelist
-
-[[io_service][The io\_service object that the acceptor will use to dispatch handlers for any asynchronous operations performed on the acceptor.]]
+[endsect]
 
-[[endpoint][An endpoint on the local machine on which the acceptor will listen for new connections.]]
 
-[[reuse_addr][Whether the constructor should set the socket option socket\_base::reuse\_address.]]
+[section:async_read_some basic_serial_port::async_read_some]
 
-]
+Start an asynchronous read.
 
-[heading Exceptions]
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_read_some(
+ const MutableBufferSequence & buffers,
+ ReadHandler handler);
+
+
+This function is used to asynchronously read data from the serial port. The function call always returns immediately.
+
+
+[heading Parameters]
     
 
 [variablelist
   
-[[boost::system::system_error][Thrown on failure.]]
+[[buffers][One or more buffers into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+
+[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ std::size_t bytes_transferred // Number of bytes read.
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
 
 ]
 
 [heading Remarks]
       
-This constructor is equivalent to the following code:
+The read operation may not read all of the requested number of bytes. Consider using the
+[link boost_asio.reference.async_read async_read] function if you need to ensure that the requested amount of data is read before the asynchronous operation completes.
 
- basic_socket_acceptor<Protocol> acceptor(io_service);
- acceptor.open(endpoint.protocol());
- if (reuse_addr)
- acceptor.set_option(socket_base::reuse_address(true));
- acceptor.bind(endpoint);
- acceptor.listen(listen_backlog);
+[heading Example]
+
+To read into a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
 
+ serial_port.async_read_some(boost::asio::buffer(data, size), handler);
 
 
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
 
 
@@ -10170,17 +12018,19 @@
 
 
 
-[section:overload4 basic_socket_acceptor::basic_socket_acceptor (4 of 4 overloads)]
+[section:async_write_some basic_serial_port::async_write_some]
 
-Construct a basic_socket_acceptor on an existing native acceptor.
+Start an asynchronous write.
 
- basic_socket_acceptor(
- boost::asio::io_service & io_service,
- const protocol_type & protocol,
- const native_type & native_acceptor);
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_write_some(
+ const ConstBufferSequence & buffers,
+ WriteHandler handler);
 
 
-This constructor creates an acceptor object to hold an existing native acceptor.
+This function is used to asynchronously write data to the serial port. The function call always returns immediately.
 
 
 [heading Parameters]
@@ -10188,98 +12038,97 @@
 
 [variablelist
   
-[[io_service][The io\_service object that the acceptor will use to dispatch handlers for any asynchronous operations performed on the acceptor.]]
+[[buffers][One or more data buffers to be written to the serial port. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
 
-[[protocol][An object specifying protocol parameters to be used.]]
+[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ std::size_t bytes_transferred // Number of bytes written.
+ );
 
-[[native_acceptor][A native acceptor.]]
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
 
 ]
 
-[heading Exceptions]
-
+[heading Remarks]
+
+The write operation may not transmit all of the data to the peer. Consider using the
+[link boost_asio.reference.async_write async_write] function if you need to ensure that all data is written before the asynchronous operation completes.
 
-[variablelist
+[heading Example]
   
-[[boost::system::system_error][Thrown on failure. ]]
+To write a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
 
-]
+ serial_port.async_write_some(boost::asio::buffer(data, size), handler);
 
 
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
-[endsect]
 
 
 [endsect]
 
-[section:bind basic_socket_acceptor::bind]
 
-Bind the acceptor to the given local endpoint.
+[section:basic_serial_port basic_serial_port::basic_serial_port]
 
- void ``[link boost_asio.reference.basic_socket_acceptor.bind.overload1 bind]``(
- const endpoint_type & endpoint);
+Construct a basic_serial_port without opening it.
 
- boost::system::error_code ``[link boost_asio.reference.basic_socket_acceptor.bind.overload2 bind]``(
- const endpoint_type & endpoint,
- boost::system::error_code & ec);
+ ``[link boost_asio.reference.basic_serial_port.basic_serial_port.overload1 basic_serial_port]``(
+ boost::asio::io_service & io_service);
 
+ ``[link boost_asio.reference.basic_serial_port.basic_serial_port.overload2 basic_serial_port]``(
+ boost::asio::io_service & io_service,
+ const char * device);
 
-[section:overload1 basic_socket_acceptor::bind (1 of 2 overloads)]
+ ``[link boost_asio.reference.basic_serial_port.basic_serial_port.overload3 basic_serial_port]``(
+ boost::asio::io_service & io_service,
+ const std::string & device);
 
-Bind the acceptor to the given local endpoint.
+ ``[link boost_asio.reference.basic_serial_port.basic_serial_port.overload4 basic_serial_port]``(
+ boost::asio::io_service & io_service,
+ const native_type & native_serial_port);
 
- void bind(
- const endpoint_type & endpoint);
 
+[section:overload1 basic_serial_port::basic_serial_port (1 of 4 overloads)]
 
-This function binds the socket acceptor to the specified endpoint on the local machine.
+Construct a basic_serial_port without opening it.
 
+ basic_serial_port(
+ boost::asio::io_service & io_service);
 
-[heading Parameters]
-
 
-[variablelist
-
-[[endpoint][An endpoint on the local machine to which the socket acceptor will be bound.]]
+This constructor creates a serial port without opening it.
 
-]
 
-[heading Exceptions]
+[heading Parameters]
     
 
 [variablelist
   
-[[boost::system::system_error][Thrown on failure.]]
+[[io_service][The io\_service object that the serial port will use to dispatch handlers for any asynchronous operations performed on the port. ]]
 
 ]
 
-[heading Example]
-
-
-
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- acceptor.open(boost::asio::ip::tcp::v4());
- acceptor.bind(boost::asio::ip::tcp::endpoint(12345));
-
-
-
-
 
 
 [endsect]
 
 
 
-[section:overload2 basic_socket_acceptor::bind (2 of 2 overloads)]
+[section:overload2 basic_serial_port::basic_serial_port (2 of 4 overloads)]
 
-Bind the acceptor to the given local endpoint.
+Construct and open a basic_serial_port.
 
- boost::system::error_code bind(
- const endpoint_type & endpoint,
- boost::system::error_code & ec);
+ basic_serial_port(
+ boost::asio::io_service & io_service,
+ const char * device);
 
 
-This function binds the socket acceptor to the specified endpoint on the local machine.
+This constructor creates and opens a serial port for the specified device name.
 
 
 [heading Parameters]
@@ -10287,129 +12136,166 @@
 
 [variablelist
   
-[[endpoint][An endpoint on the local machine to which the socket acceptor will be bound.]]
+[[io_service][The io\_service object that the serial port will use to dispatch handlers for any asynchronous operations performed on the port.]]
 
-[[ec][Set to indicate what error occurred, if any.]]
+[[device][The platform-specific device name for this serial port. ]]
 
 ]
 
-[heading Example]
-
 
 
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- acceptor.open(boost::asio::ip::tcp::v4());
- boost::system::error_code ec;
- acceptor.bind(boost::asio::ip::tcp::endpoint(12345), ec);
- if (ec)
- {
- // An error occurred.
- }
+[endsect]
 
 
 
+[section:overload3 basic_serial_port::basic_serial_port (3 of 4 overloads)]
 
+Construct and open a basic_serial_port.
 
+ basic_serial_port(
+ boost::asio::io_service & io_service,
+ const std::string & device);
 
-[endsect]
 
+This constructor creates and opens a serial port for the specified device name.
 
-[endsect]
 
+[heading Parameters]
+
 
-[section:broadcast basic_socket_acceptor::broadcast]
+[variablelist
+
+[[io_service][The io\_service object that the serial port will use to dispatch handlers for any asynchronous operations performed on the port.]]
 
+[[device][The platform-specific device name for this serial port. ]]
 
-['Inherited from socket_base.]
+]
 
-Socket option to permit sending of broadcast messages.
 
- typedef implementation_defined broadcast;
 
+[endsect]
 
 
-Implements the SOL\_SOCKET/SO\_BROADCAST socket option.
 
+[section:overload4 basic_serial_port::basic_serial_port (4 of 4 overloads)]
 
-[heading Examples]
-
-Setting the option:
+Construct a basic_serial_port on an existing native serial port.
 
- boost::asio::ip::udp::socket socket(io_service);
- ...
- boost::asio::socket_base::broadcast option(true);
- socket.set_option(option);
+ basic_serial_port(
+ boost::asio::io_service & io_service,
+ const native_type & native_serial_port);
 
 
+This constructor creates a serial port object to hold an existing native serial port.
 
 
-Getting the current option value:
+[heading Parameters]
+
 
- boost::asio::ip::udp::socket socket(io_service);
- ...
- boost::asio::socket_base::broadcast option;
- socket.get_option(option);
- bool is_set = option.value();
+[variablelist
+
+[[io_service][The io\_service object that the serial port will use to dispatch handlers for any asynchronous operations performed on the port.]]
+
+[[native_serial_port][A native serial port.]]
+
+]
 
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
 
+]
 
 
 
 [endsect]
 
 
+[endsect]
 
-[section:bytes_readable basic_socket_acceptor::bytes_readable]
-
+[section:cancel basic_serial_port::cancel]
 
-['Inherited from socket_base.]
+Cancel all asynchronous operations associated with the serial port.
 
-IO control command to get the amount of data that can be read without blocking.
+ void ``[link boost_asio.reference.basic_serial_port.cancel.overload1 cancel]``();
 
- typedef implementation_defined bytes_readable;
+ boost::system::error_code ``[link boost_asio.reference.basic_serial_port.cancel.overload2 cancel]``(
+ boost::system::error_code & ec);
 
 
+[section:overload1 basic_serial_port::cancel (1 of 2 overloads)]
 
-Implements the FIONREAD IO control command.
+Cancel all asynchronous operations associated with the serial port.
 
+ void cancel();
 
-[heading Example]
-
 
+This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the boost::asio::error::operation\_aborted error.
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::bytes_readable command(true);
- socket.io_control(command);
- std::size_t bytes_readable = command.get();
 
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
 
+]
 
 
 
 [endsect]
 
 
-[section:cancel basic_socket_acceptor::cancel]
 
-Cancel all asynchronous operations associated with the acceptor.
+[section:overload2 basic_serial_port::cancel (2 of 2 overloads)]
 
- void ``[link boost_asio.reference.basic_socket_acceptor.cancel.overload1 cancel]``();
+Cancel all asynchronous operations associated with the serial port.
 
- boost::system::error_code ``[link boost_asio.reference.basic_socket_acceptor.cancel.overload2 cancel]``(
+ boost::system::error_code cancel(
       boost::system::error_code & ec);
 
 
-[section:overload1 basic_socket_acceptor::cancel (1 of 2 overloads)]
+This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the boost::asio::error::operation\_aborted error.
 
-Cancel all asynchronous operations associated with the acceptor.
 
- void cancel();
+[heading Parameters]
+
+
+[variablelist
+
+[[ec][Set to indicate what error occurred, if any. ]]
 
+]
+
+
+
+[endsect]
 
-This function causes all outstanding asynchronous connect, send and receive operations to finish immediately, and the handlers for cancelled operations will be passed the boost::asio::error::operation\_aborted error.
+
+[endsect]
+
+[section:close basic_serial_port::close]
+
+Close the serial port.
+
+ void ``[link boost_asio.reference.basic_serial_port.close.overload1 close]``();
+
+ boost::system::error_code ``[link boost_asio.reference.basic_serial_port.close.overload2 close]``(
+ boost::system::error_code & ec);
+
+
+[section:overload1 basic_serial_port::close (1 of 2 overloads)]
+
+Close the serial port.
+
+ void close();
+
+
+This function is used to close the serial port. Any asynchronous read or write operations will be cancelled immediately, and will complete with the boost::asio::error::operation\_aborted error.
 
 
 [heading Exceptions]
@@ -10427,15 +12313,15 @@
 
 
 
-[section:overload2 basic_socket_acceptor::cancel (2 of 2 overloads)]
+[section:overload2 basic_serial_port::close (2 of 2 overloads)]
 
-Cancel all asynchronous operations associated with the acceptor.
+Close the serial port.
 
- boost::system::error_code cancel(
+ boost::system::error_code close(
       boost::system::error_code & ec);
 
 
-This function causes all outstanding asynchronous connect, send and receive operations to finish immediately, and the handlers for cancelled operations will be passed the boost::asio::error::operation\_aborted error.
+This function is used to close the serial port. Any asynchronous read or write operations will be cancelled immediately, and will complete with the boost::asio::error::operation\_aborted error.
 
 
 [heading Parameters]
@@ -10454,34 +12340,73 @@
 
 [endsect]
 
-[section:close basic_socket_acceptor::close]
 
-Close the acceptor.
+[section:get_io_service basic_serial_port::get_io_service]
 
- void ``[link boost_asio.reference.basic_socket_acceptor.close.overload1 close]``();
 
- boost::system::error_code ``[link boost_asio.reference.basic_socket_acceptor.close.overload2 close]``(
+['Inherited from basic_io_object.]
+
+Get the io_service associated with the object.
+
+ boost::asio::io_service & get_io_service();
+
+
+This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
+
+
+[heading Return Value]
+
+A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
+
+
+
+[endsect]
+
+
+[section:get_option basic_serial_port::get_option]
+
+Get an option from the serial port.
+
+ template<
+ typename ``[link boost_asio.reference.GettableSerialPortOption GettableSerialPortOption]``>
+ void ``[link boost_asio.reference.basic_serial_port.get_option.overload1 get_option]``(
+ GettableSerialPortOption & option);
+
+ template<
+ typename ``[link boost_asio.reference.GettableSerialPortOption GettableSerialPortOption]``>
+ boost::system::error_code ``[link boost_asio.reference.basic_serial_port.get_option.overload2 get_option]``(
+ GettableSerialPortOption & option,
       boost::system::error_code & ec);
 
 
-[section:overload1 basic_socket_acceptor::close (1 of 2 overloads)]
+[section:overload1 basic_serial_port::get_option (1 of 2 overloads)]
 
-Close the acceptor.
+Get an option from the serial port.
 
- void close();
+ template<
+ typename ``[link boost_asio.reference.GettableSerialPortOption GettableSerialPortOption]``>
+ void get_option(
+ GettableSerialPortOption & option);
 
 
-This function is used to close the acceptor. Any asynchronous accept operations will be cancelled immediately.
+This function is used to get the current value of an option on the serial port.
 
-A subsequent call to open() is required before the acceptor can again be used to again perform socket accept operations.
 
+[heading Parameters]
+
+
+[variablelist
+
+[[option][The option value to be obtained from the serial port.]]
+
+]
 
 [heading Exceptions]
     
 
 [variablelist
   
-[[boost::system::system_error][Thrown on failure. ]]
+[[boost::system::system_error][Thrown on failure.]]
 
 ]
 
@@ -10491,17 +12416,18 @@
 
 
 
-[section:overload2 basic_socket_acceptor::close (2 of 2 overloads)]
+[section:overload2 basic_serial_port::get_option (2 of 2 overloads)]
 
-Close the acceptor.
+Get an option from the serial port.
 
- boost::system::error_code close(
+ template<
+ typename ``[link boost_asio.reference.GettableSerialPortOption GettableSerialPortOption]``>
+ boost::system::error_code get_option(
+ GettableSerialPortOption & option,
       boost::system::error_code & ec);
 
 
-This function is used to close the acceptor. Any asynchronous accept operations will be cancelled immediately.
-
-A subsequent call to open() is required before the acceptor can again be used to again perform socket accept operations.
+This function is used to get the current value of an option on the serial port.
 
 
 [heading Parameters]
@@ -10509,113 +12435,99 @@
 
 [variablelist
   
-[[ec][Set to indicate what error occurred, if any.]]
+[[option][The option value to be obtained from the serial port.]]
+
+[[ec][Set to indicate what error occured, if any.]]
 
 ]
 
-[heading Example]
-
 
 
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
- boost::system::error_code ec;
- acceptor.close(ec);
- if (ec)
- {
- // An error occurred.
- }
+[endsect]
 
 
+[endsect]
 
 
+[section:implementation basic_serial_port::implementation]
 
 
-[endsect]
+['Inherited from basic_io_object.]
 
+The underlying implementation of the I/O object.
 
-[endsect]
+ implementation_type implementation;
 
 
-[section:debug basic_socket_acceptor::debug]
 
+[endsect]
 
-['Inherited from socket_base.]
 
-Socket option to enable socket-level debugging.
 
- typedef implementation_defined debug;
+[section:implementation_type basic_serial_port::implementation_type]
 
 
+['Inherited from basic_io_object.]
 
-Implements the SOL\_SOCKET/SO\_DEBUG socket option.
+The underlying implementation type of I/O object.
 
+ typedef service_type::implementation_type implementation_type;
 
-[heading Examples]
-
-Setting the option:
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::debug option(true);
- socket.set_option(option);
 
 
+[endsect]
 
 
-Getting the current option value:
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::debug option;
- socket.get_option(option);
- bool is_set = option.value();
+[section:io_service basic_serial_port::io_service]
+
 
+['Inherited from basic_io_object.]
 
+(Deprecated: use get_io_service().) Get the io_service associated with the object.
 
+ boost::asio::io_service & io_service();
 
 
+This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
 
-[endsect]
 
+[heading Return Value]
+
+A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
 
 
-[section:do_not_route basic_socket_acceptor::do_not_route]
 
+[endsect]
 
-['Inherited from socket_base.]
 
-Socket option to prevent routing, use local interfaces only.
 
- typedef implementation_defined do_not_route;
+[section:is_open basic_serial_port::is_open]
 
+Determine whether the serial port is open.
 
+ bool is_open() const;
 
-Implements the SOL\_SOCKET/SO\_DONTROUTE socket option.
 
 
-[heading Examples]
-
-Setting the option:
+[endsect]
 
- boost::asio::ip::udp::socket socket(io_service);
- ...
- boost::asio::socket_base::do_not_route option(true);
- socket.set_option(option);
 
 
+[section:lowest_layer basic_serial_port::lowest_layer]
 
+Get a reference to the lowest layer.
 
-Getting the current option value:
+ lowest_layer_type & lowest_layer();
 
- boost::asio::ip::udp::socket socket(io_service);
- ...
- boost::asio::socket_base::do_not_route option;
- socket.get_option(option);
- bool is_set = option.value();
 
+This function returns a reference to the lowest layer in a stack of layers. Since a basic_serial_port cannot contain any further layers, it simply returns a reference to itself.
 
 
+[heading Return Value]
+
+A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
 
 
 
@@ -10623,111 +12535,217 @@
 
 
 
-[section:enable_connection_aborted basic_socket_acceptor::enable_connection_aborted]
+[section:lowest_layer_type basic_serial_port::lowest_layer_type]
 
+A basic_serial_port is always the lowest layer.
 
-['Inherited from socket_base.]
+ typedef basic_serial_port< SerialPortService > lowest_layer_type;
 
-Socket option to report aborted connections on accept.
 
- typedef implementation_defined enable_connection_aborted;
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
 
+ [[link boost_asio.reference.basic_serial_port.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
 
+ [
 
-Implements a custom socket option that determines whether or not an accept operation is permitted to fail with boost::asio::error::connection\_aborted. By default the option is false.
+ [[link boost_asio.reference.basic_serial_port.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_serial_port is always the lowest layer. ]
+
+ ]
 
+ [
 
-[heading Examples]
+ [[link boost_asio.reference.basic_serial_port.native_type [*native_type]]]
+ [The native representation of a serial port. ]
   
-Setting the option:
+ ]
 
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
- boost::asio::socket_base::enable_connection_aborted option(true);
- acceptor.set_option(option);
+ [
 
+ [[link boost_asio.reference.basic_serial_port.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
+
+ ]
 
+]
 
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
-Getting the current option value:
+ [
+ [[link boost_asio.reference.basic_serial_port.assign [*assign]]]
+ [Assign an existing native serial port to the serial port. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.async_read_some [*async_read_some]]]
+ [Start an asynchronous read. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.async_write_some [*async_write_some]]]
+ [Start an asynchronous write. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.basic_serial_port [*basic_serial_port]]]
+ [Construct a basic_serial_port without opening it. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the serial port. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.close [*close]]]
+ [Close the serial port. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.get_option [*get_option]]]
+ [Get an option from the serial port. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.is_open [*is_open]]]
+ [Determine whether the serial port is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.native [*native]]]
+ [Get the native serial port representation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.open [*open]]]
+ [Open the serial port using the specified device name. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.read_some [*read_some]]]
+ [Read some data from the serial port. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.send_break [*send_break]]]
+ [Send a break sequence to the serial port. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.set_option [*set_option]]]
+ [Set an option on the serial port. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.write_some [*write_some]]]
+ [Write some data to the serial port. ]
+ ]
+
+]
 
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
- boost::asio::socket_base::enable_connection_aborted option;
- acceptor.get_option(option);
- bool is_set = option.value();
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.basic_serial_port.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
 
+ [
+ [[link boost_asio.reference.basic_serial_port.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
 
+]
 
+The basic_serial_port class template provides functionality that is common to all serial ports.
 
 
-[endsect]
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
+[*Shared] [*objects:] Unsafe.
 
 
-[section:endpoint_type basic_socket_acceptor::endpoint_type]
 
-The endpoint type.
 
- typedef Protocol::endpoint endpoint_type;
+[endsect]
 
 
 
+[section:native basic_serial_port::native]
 
-[endsect]
+Get the native serial port representation.
 
+ native_type native();
 
 
-[section:get_io_service basic_socket_acceptor::get_io_service]
+This function may be used to obtain the underlying representation of the serial port. This is intended to allow access to native serial port functionality that is not otherwise provided.
 
 
-['Inherited from basic_io_object.]
+[endsect]
 
-Get the io_service associated with the object.
 
- boost::asio::io_service & get_io_service();
 
+[section:native_type basic_serial_port::native_type]
 
-This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
+The native representation of a serial port.
 
+ typedef SerialPortService::native_type native_type;
 
-[heading Return Value]
-
-A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
 
 
 
 [endsect]
 
 
-[section:get_option basic_socket_acceptor::get_option]
+[section:open basic_serial_port::open]
 
-Get an option from the acceptor.
+Open the serial port using the specified device name.
 
- template<
- typename ``[link boost_asio.reference.GettableSocketOption GettableSocketOption]``>
- void ``[link boost_asio.reference.basic_socket_acceptor.get_option.overload1 get_option]``(
- GettableSocketOption & option);
+ void ``[link boost_asio.reference.basic_serial_port.open.overload1 open]``(
+ const std::string & device);
 
- template<
- typename ``[link boost_asio.reference.GettableSocketOption GettableSocketOption]``>
- boost::system::error_code ``[link boost_asio.reference.basic_socket_acceptor.get_option.overload2 get_option]``(
- GettableSocketOption & option,
+ boost::system::error_code ``[link boost_asio.reference.basic_serial_port.open.overload2 open]``(
+ const std::string & device,
       boost::system::error_code & ec);
 
 
-[section:overload1 basic_socket_acceptor::get_option (1 of 2 overloads)]
+[section:overload1 basic_serial_port::open (1 of 2 overloads)]
 
-Get an option from the acceptor.
+Open the serial port using the specified device name.
 
- template<
- typename ``[link boost_asio.reference.GettableSocketOption GettableSocketOption]``>
- void get_option(
- GettableSocketOption & option);
+ void open(
+ const std::string & device);
 
 
-This function is used to get the current value of an option on the acceptor.
+This function opens the serial port for the specified device name.
 
 
 [heading Parameters]
@@ -10735,7 +12753,7 @@
 
 [variablelist
   
-[[option][The option value to be obtained from the acceptor.]]
+[[device][The platform-specific device name.]]
 
 ]
 
@@ -10744,41 +12762,26 @@
 
 [variablelist
   
-[[boost::system::system_error][Thrown on failure.]]
+[[boost::system::system_error][Thrown on failure. ]]
 
 ]
 
-[heading Example]
-
-Getting the value of the SOL\_SOCKET/SO\_REUSEADDR option:
-
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
- boost::asio::ip::tcp::acceptor::reuse_address option;
- acceptor.get_option(option);
- bool is_set = option.get();
-
-
-
-
 
 
 [endsect]
 
 
 
-[section:overload2 basic_socket_acceptor::get_option (2 of 2 overloads)]
+[section:overload2 basic_serial_port::open (2 of 2 overloads)]
 
-Get an option from the acceptor.
+Open the serial port using the specified device name.
 
- template<
- typename ``[link boost_asio.reference.GettableSocketOption GettableSocketOption]``>
- boost::system::error_code get_option(
- GettableSocketOption & option,
+ boost::system::error_code open(
+ const std::string & device,
       boost::system::error_code & ec);
 
 
-This function is used to get the current value of an option on the acceptor.
+This function opens the serial port using the given platform-specific device name.
 
 
 [heading Parameters]
@@ -10786,47 +12789,85 @@
 
 [variablelist
   
-[[option][The option value to be obtained from the acceptor.]]
+[[device][The platform-specific device name.]]
 
-[[ec][Set to indicate what error occurred, if any.]]
+[[ec][Set the indicate what error occurred, if any. ]]
 
 ]
 
-[heading Example]
-
-Getting the value of the SOL\_SOCKET/SO\_REUSEADDR option:
 
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
- boost::asio::ip::tcp::acceptor::reuse_address option;
- boost::system::error_code ec;
- acceptor.get_option(option, ec);
- if (ec)
- {
- // An error occurred.
- }
- bool is_set = option.get();
 
+[endsect]
 
 
+[endsect]
 
+[section:read_some basic_serial_port::read_some]
 
+Read some data from the serial port.
 
-[endsect]
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_serial_port.read_some.overload1 read_some]``(
+ const MutableBufferSequence & buffers);
 
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_serial_port.read_some.overload2 read_some]``(
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
 
-[endsect]
 
+[section:overload1 basic_serial_port::read_some (1 of 2 overloads)]
 
-[section:implementation_type basic_socket_acceptor::implementation_type]
+Read some data from the serial port.
 
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t read_some(
+ const MutableBufferSequence & buffers);
 
-['Inherited from basic_io_object.]
 
-The underlying implementation type of I/O object.
+This function is used to read data from the serial port. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
 
- typedef service_type::implementation_type implementation_type;
 
+[heading Parameters]
+
+
+[variablelist
+
+[[buffers][One or more buffers into which the data will be read.]]
+
+]
+
+[heading Return Value]
+
+The number of bytes read.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. An error code of boost::asio::error::eof indicates that the connection was closed by the peer.]]
+
+]
+
+[heading Remarks]
+
+The read\_some operation may not read all of the requested number of bytes. Consider using the
+[link boost_asio.reference.read read] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
+
+[heading Example]
+
+To read into a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ serial_port.read_some(boost::asio::buffer(data, size));
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
 
 
@@ -10834,120 +12875,133 @@
 
 
 
-[section:io_service basic_socket_acceptor::io_service]
+[section:overload2 basic_serial_port::read_some (2 of 2 overloads)]
 
+Read some data from the serial port.
 
-['Inherited from basic_io_object.]
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t read_some(
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
 
-(Deprecated: use get_io_service().) Get the io_service associated with the object.
 
- boost::asio::io_service & io_service();
+This function is used to read data from the serial port. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
 
 
-This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
+[heading Parameters]
+
 
+[variablelist
+
+[[buffers][One or more buffers into which the data will be read.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
 
 [heading Return Value]
       
-A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
+The number of bytes read. Returns 0 if an error occurred.
+
+[heading Remarks]
+
+The read\_some operation may not read all of the requested number of bytes. Consider using the
+[link boost_asio.reference.read read] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
 
 
 
 [endsect]
 
 
+[endsect]
 
-[section:is_open basic_socket_acceptor::is_open]
-
-Determine whether the acceptor is open.
+[section:send_break basic_serial_port::send_break]
 
- bool is_open() const;
+Send a break sequence to the serial port.
 
+ void ``[link boost_asio.reference.basic_serial_port.send_break.overload1 send_break]``();
 
+ boost::system::error_code ``[link boost_asio.reference.basic_serial_port.send_break.overload2 send_break]``(
+ boost::system::error_code & ec);
 
-[endsect]
 
+[section:overload1 basic_serial_port::send_break (1 of 2 overloads)]
 
+Send a break sequence to the serial port.
 
-[section:keep_alive basic_socket_acceptor::keep_alive]
+ void send_break();
 
 
-['Inherited from socket_base.]
+This function causes a break sequence of platform-specific duration to be sent out the serial port.
 
-Socket option to send keep-alives.
 
- typedef implementation_defined keep_alive;
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
 
+]
 
-Implements the SOL\_SOCKET/SO\_KEEPALIVE socket option.
 
 
-[heading Examples]
-
-Setting the option:
+[endsect]
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::keep_alive option(true);
- socket.set_option(option);
 
 
+[section:overload2 basic_serial_port::send_break (2 of 2 overloads)]
 
+Send a break sequence to the serial port.
 
-Getting the current option value:
+ boost::system::error_code send_break(
+ boost::system::error_code & ec);
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::keep_alive option;
- socket.get_option(option);
- bool is_set = option.value();
 
+This function causes a break sequence of platform-specific duration to be sent out the serial port.
 
 
+[heading Parameters]
+
 
+[variablelist
+
+[[ec][Set to indicate what error occurred, if any. ]]
 
+]
 
-[endsect]
 
 
+[endsect]
 
-[section:linger basic_socket_acceptor::linger]
 
+[endsect]
 
-['Inherited from socket_base.]
 
-Socket option to specify whether the socket lingers on close if unsent data is present.
+[section:service basic_serial_port::service]
 
- typedef implementation_defined linger;
 
+['Inherited from basic_io_object.]
 
+The service associated with the I/O object.
 
-Implements the SOL\_SOCKET/SO\_LINGER socket option.
+ service_type & service;
 
 
-[heading Examples]
-
-Setting the option:
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::linger option(true, 30);
- socket.set_option(option);
+[endsect]
 
 
 
+[section:service_type basic_serial_port::service_type]
 
-Getting the current option value:
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::linger option;
- socket.get_option(option);
- bool is_set = option.enabled();
- unsigned short timeout = option.timeout();
+['Inherited from basic_io_object.]
 
+The type of the service that will be used to provide I/O operations.
 
+ typedef SerialPortService service_type;
 
 
 
@@ -10955,27 +13009,33 @@
 [endsect]
 
 
-[section:listen basic_socket_acceptor::listen]
+[section:set_option basic_serial_port::set_option]
 
-Place the acceptor into the state where it will listen for new connections.
+Set an option on the serial port.
 
- void ``[link boost_asio.reference.basic_socket_acceptor.listen.overload1 listen]``(
- int backlog = socket_base::max_connections);
+ template<
+ typename ``[link boost_asio.reference.SettableSerialPortOption SettableSerialPortOption]``>
+ void ``[link boost_asio.reference.basic_serial_port.set_option.overload1 set_option]``(
+ const SettableSerialPortOption & option);
 
- boost::system::error_code ``[link boost_asio.reference.basic_socket_acceptor.listen.overload2 listen]``(
- int backlog,
+ template<
+ typename ``[link boost_asio.reference.SettableSerialPortOption SettableSerialPortOption]``>
+ boost::system::error_code ``[link boost_asio.reference.basic_serial_port.set_option.overload2 set_option]``(
+ const SettableSerialPortOption & option,
       boost::system::error_code & ec);
 
 
-[section:overload1 basic_socket_acceptor::listen (1 of 2 overloads)]
+[section:overload1 basic_serial_port::set_option (1 of 2 overloads)]
 
-Place the acceptor into the state where it will listen for new connections.
+Set an option on the serial port.
 
- void listen(
- int backlog = socket_base::max_connections);
+ template<
+ typename ``[link boost_asio.reference.SettableSerialPortOption SettableSerialPortOption]``>
+ void set_option(
+ const SettableSerialPortOption & option);
 
 
-This function puts the socket acceptor into the state where it may accept new connections.
+This function is used to set an option on the serial port.
 
 
 [heading Parameters]
@@ -10983,7 +13043,7 @@
 
 [variablelist
   
-[[backlog][The maximum length of the queue of pending connections.]]
+[[option][The option value to be set on the serial port.]]
 
 ]
 
@@ -10992,7 +13052,7 @@
 
 [variablelist
   
-[[boost::system::system_error][Thrown on failure. ]]
+[[boost::system::system_error][Thrown on failure.]]
 
 ]
 
@@ -11002,16 +13062,18 @@
 
 
 
-[section:overload2 basic_socket_acceptor::listen (2 of 2 overloads)]
+[section:overload2 basic_serial_port::set_option (2 of 2 overloads)]
 
-Place the acceptor into the state where it will listen for new connections.
+Set an option on the serial port.
 
- boost::system::error_code listen(
- int backlog,
+ template<
+ typename ``[link boost_asio.reference.SettableSerialPortOption SettableSerialPortOption]``>
+ boost::system::error_code set_option(
+ const SettableSerialPortOption & option,
       boost::system::error_code & ec);
 
 
-This function puts the socket acceptor into the state where it may accept new connections.
+This function is used to set an option on the serial port.
 
 
 [heading Parameters]
@@ -11019,78 +13081,85 @@
 
 [variablelist
   
-[[backlog][The maximum length of the queue of pending connections.]]
+[[option][The option value to be set on the serial port.]]
 
 [[ec][Set to indicate what error occurred, if any.]]
 
 ]
 
-[heading Example]
-
-
-
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
- boost::system::error_code ec;
- acceptor.listen(boost::asio::socket_base::max_connections, ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
 
 
+[endsect]
 
 
 [endsect]
 
+[section:write_some basic_serial_port::write_some]
 
-[endsect]
+Write some data to the serial port.
 
-[section:local_endpoint basic_socket_acceptor::local_endpoint]
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_serial_port.write_some.overload1 write_some]``(
+ const ConstBufferSequence & buffers);
 
-Get the local endpoint of the acceptor.
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_serial_port.write_some.overload2 write_some]``(
+ const ConstBufferSequence & buffers,
+ boost::system::error_code & ec);
 
- endpoint_type ``[link boost_asio.reference.basic_socket_acceptor.local_endpoint.overload1 local_endpoint]``() const;
 
- endpoint_type ``[link boost_asio.reference.basic_socket_acceptor.local_endpoint.overload2 local_endpoint]``(
- boost::system::error_code & ec) const;
+[section:overload1 basic_serial_port::write_some (1 of 2 overloads)]
 
+Write some data to the serial port.
 
-[section:overload1 basic_socket_acceptor::local_endpoint (1 of 2 overloads)]
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t write_some(
+ const ConstBufferSequence & buffers);
 
-Get the local endpoint of the acceptor.
 
- endpoint_type local_endpoint() const;
+This function is used to write data to the serial port. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
 
 
-This function is used to obtain the locally bound endpoint of the acceptor.
+[heading Parameters]
+
+
+[variablelist
+
+[[buffers][One or more data buffers to be written to the serial port.]]
 
+]
 
 [heading Return Value]
       
-An object that represents the local endpoint of the acceptor.
+The number of bytes written.
 
 [heading Exceptions]
     
 
 [variablelist
   
-[[boost::system::system_error][Thrown on failure.]]
+[[boost::system::system_error][Thrown on failure. An error code of boost::asio::error::eof indicates that the connection was closed by the peer.]]
 
 ]
 
+[heading Remarks]
+
+The write\_some operation may not transmit all of the data to the peer. Consider using the
+[link boost_asio.reference.write write] function if you need to ensure that all data is written before the blocking operation completes.
+
 [heading Example]
   
+To write a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
 
-
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
- boost::asio::ip::tcp::endpoint endpoint = acceptor.local_endpoint();
-
+ serial_port.write_some(boost::asio::buffer(data, size));
 
 
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
 
 
@@ -11098,15 +13167,18 @@
 
 
 
-[section:overload2 basic_socket_acceptor::local_endpoint (2 of 2 overloads)]
+[section:overload2 basic_serial_port::write_some (2 of 2 overloads)]
 
-Get the local endpoint of the acceptor.
+Write some data to the serial port.
 
- endpoint_type local_endpoint(
- boost::system::error_code & ec) const;
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t write_some(
+ const ConstBufferSequence & buffers,
+ boost::system::error_code & ec);
 
 
-This function is used to obtain the locally bound endpoint of the acceptor.
+This function is used to write data to the serial port. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
 
 
 [heading Parameters]
@@ -11114,29 +13186,20 @@
 
 [variablelist
   
+[[buffers][One or more data buffers to be written to the serial port.]]
+
 [[ec][Set to indicate what error occurred, if any.]]
 
 ]
 
 [heading Return Value]
       
-An object that represents the local endpoint of the acceptor. Returns a default-constructed endpoint object if an error occurred and the error handler did not throw an exception.
-
-[heading Example]
-
-
-
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
- boost::system::error_code ec;
- boost::asio::ip::tcp::endpoint endpoint = acceptor.local_endpoint(ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
+The number of bytes written. Returns 0 if an error occurred.
 
+[heading Remarks]
+
+The write\_some operation may not transmit all of the data to the peer. Consider using the
+[link boost_asio.reference.write write] function if you need to ensure that all data is written before the blocking operation completes.
 
 
 
@@ -11146,161 +13209,406 @@
 [endsect]
 
 
-[section:max_connections basic_socket_acceptor::max_connections]
+[endsect]
 
+[section:basic_socket basic_socket]
 
-['Inherited from socket_base.]
+Provides socket functionality.
 
-The maximum length of the queue of pending incoming connections.
+ template<
+ typename ``[link boost_asio.reference.Protocol Protocol]``,
+ typename ``[link boost_asio.reference.SocketService SocketService]``>
+ class basic_socket :
+ public basic_io_object< SocketService >,
+ public socket_base
 
- static const int max_connections = implementation_defined;
 
+[heading Types]
+[table
+ [[Name][Description]]
 
+ [
 
-[endsect]
+ [[link boost_asio.reference.basic_socket.broadcast [*broadcast]]]
+ [Socket option to permit sending of broadcast messages. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.basic_socket.bytes_readable [*bytes_readable]]]
+ [IO control command to get the amount of data that can be read without blocking. ]
+
+ ]
 
-[section:message_do_not_route basic_socket_acceptor::message_do_not_route]
+ [
 
+ [[link boost_asio.reference.basic_socket.debug [*debug]]]
+ [Socket option to enable socket-level debugging. ]
+
+ ]
 
-['Inherited from socket_base.]
+ [
 
-Specify that the data should not be subject to routing.
+ [[link boost_asio.reference.basic_socket.do_not_route [*do_not_route]]]
+ [Socket option to prevent routing, use local interfaces only. ]
+
+ ]
 
- static const int message_do_not_route = implementation_defined;
+ [
 
+ [[link boost_asio.reference.basic_socket.enable_connection_aborted [*enable_connection_aborted]]]
+ [Socket option to report aborted connections on accept. ]
+
+ ]
 
+ [
 
-[endsect]
+ [[link boost_asio.reference.basic_socket.endpoint_type [*endpoint_type]]]
+ [The endpoint type. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.basic_socket.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
 
-[section:message_flags basic_socket_acceptor::message_flags]
+ [
 
+ [[link boost_asio.reference.basic_socket.keep_alive [*keep_alive]]]
+ [Socket option to send keep-alives. ]
+
+ ]
 
-['Inherited from socket_base.]
+ [
 
-Bitmask type for flags that can be passed to send and receive operations.
+ [[link boost_asio.reference.basic_socket.linger [*linger]]]
+ [Socket option to specify whether the socket lingers on close if unsent data is present. ]
+
+ ]
 
- typedef int message_flags;
+ [
 
+ [[link boost_asio.reference.basic_socket.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_socket is always the lowest layer. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.basic_socket.message_flags [*message_flags]]]
+ [Bitmask type for flags that can be passed to send and receive operations. ]
+
+ ]
 
-[endsect]
+ [
 
+ [[link boost_asio.reference.basic_socket.native_type [*native_type]]]
+ [The native representation of a socket. ]
+
+ ]
 
+ [
 
-[section:message_out_of_band basic_socket_acceptor::message_out_of_band]
+ [[link boost_asio.reference.basic_socket.non_blocking_io [*non_blocking_io]]]
+ [IO control command to set the blocking mode of the socket. ]
+
+ ]
 
+ [
 
-['Inherited from socket_base.]
+ [[link boost_asio.reference.basic_socket.protocol_type [*protocol_type]]]
+ [The protocol type. ]
+
+ ]
 
-Process out-of-band data.
+ [
 
- static const int message_out_of_band = implementation_defined;
+ [[link boost_asio.reference.basic_socket.receive_buffer_size [*receive_buffer_size]]]
+ [Socket option for the receive buffer size of a socket. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.basic_socket.receive_low_watermark [*receive_low_watermark]]]
+ [Socket option for the receive low watermark. ]
+
+ ]
 
-[endsect]
+ [
 
+ [[link boost_asio.reference.basic_socket.reuse_address [*reuse_address]]]
+ [Socket option to allow the socket to be bound to an address that is already in use. ]
+
+ ]
 
+ [
 
-[section:message_peek basic_socket_acceptor::message_peek]
+ [[link boost_asio.reference.basic_socket.send_buffer_size [*send_buffer_size]]]
+ [Socket option for the send buffer size of a socket. ]
+
+ ]
 
+ [
 
-['Inherited from socket_base.]
+ [[link boost_asio.reference.basic_socket.send_low_watermark [*send_low_watermark]]]
+ [Socket option for the send low watermark. ]
+
+ ]
 
-Peek at incoming data without removing it from the input queue.
+ [
 
- static const int message_peek = implementation_defined;
+ [[link boost_asio.reference.basic_socket.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.basic_socket.shutdown_type [*shutdown_type]]]
+ [Different ways a socket may be shutdown. ]
+
+ ]
 
-[endsect]
+]
 
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.basic_socket.assign [*assign]]]
+ [Assign an existing native socket to the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.async_connect [*async_connect]]]
+ [Start an asynchronous connect. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.at_mark [*at_mark]]]
+ [Determine whether the socket is at the out-of-band data mark. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.available [*available]]]
+ [Determine the number of bytes available for reading. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.basic_socket [*basic_socket]]]
+ [Construct a basic_socket without opening it. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.bind [*bind]]]
+ [Bind the socket to the given local endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.close [*close]]]
+ [Close the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.connect [*connect]]]
+ [Connect the socket to the specified endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.get_option [*get_option]]]
+ [Get an option from the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.io_control [*io_control]]]
+ [Perform an IO control command on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.is_open [*is_open]]]
+ [Determine whether the socket is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.local_endpoint [*local_endpoint]]]
+ [Get the local endpoint of the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.native [*native]]]
+ [Get the native socket representation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.open [*open]]]
+ [Open the socket using the specified protocol. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.remote_endpoint [*remote_endpoint]]]
+ [Get the remote endpoint of the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.set_option [*set_option]]]
+ [Set an option on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.shutdown [*shutdown]]]
+ [Disable sends or receives on the socket. ]
+ ]
+
+]
 
-[section:native basic_socket_acceptor::native]
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
 
-Get the native acceptor representation.
+ [
+ [[link boost_asio.reference.basic_socket._basic_socket [*~basic_socket]]]
+ [Protected destructor to prevent deletion through this type. ]
+ ]
+
+]
 
- native_type native();
+[heading Data Members]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.basic_socket.max_connections [*max_connections]]]
+ [The maximum length of the queue of pending incoming connections. ]
+ ]
 
-This function may be used to obtain the underlying representation of the acceptor. This is intended to allow access to native acceptor functionality that is not otherwise provided.
+ [
+ [[link boost_asio.reference.basic_socket.message_do_not_route [*message_do_not_route]]]
+ [Specify that the data should not be subject to routing. ]
+ ]
 
+ [
+ [[link boost_asio.reference.basic_socket.message_out_of_band [*message_out_of_band]]]
+ [Process out-of-band data. ]
+ ]
 
-[endsect]
+ [
+ [[link boost_asio.reference.basic_socket.message_peek [*message_peek]]]
+ [Peek at incoming data without removing it from the input queue. ]
+ ]
 
+]
 
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
 
-[section:native_type basic_socket_acceptor::native_type]
+ [
+ [[link boost_asio.reference.basic_socket.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
 
-The native representation of an acceptor.
+ [
+ [[link boost_asio.reference.basic_socket.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
 
- typedef SocketAcceptorService::native_type native_type;
+]
 
+The basic_socket class template provides functionality that is common to both stream-oriented and datagram-oriented sockets.
 
 
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
-[endsect]
+[*Shared] [*objects:] Unsafe.
 
 
+[section:assign basic_socket::assign]
 
-[section:non_blocking_io basic_socket_acceptor::non_blocking_io]
+Assign an existing native socket to the socket.
 
+ void ``[link boost_asio.reference.basic_socket.assign.overload1 assign]``(
+ const protocol_type & protocol,
+ const native_type & native_socket);
 
-['Inherited from socket_base.]
+ boost::system::error_code ``[link boost_asio.reference.basic_socket.assign.overload2 assign]``(
+ const protocol_type & protocol,
+ const native_type & native_socket,
+ boost::system::error_code & ec);
 
-IO control command to set the blocking mode of the socket.
 
- typedef implementation_defined non_blocking_io;
+[section:overload1 basic_socket::assign (1 of 2 overloads)]
 
+Assign an existing native socket to the socket.
 
+ void assign(
+ const protocol_type & protocol,
+ const native_type & native_socket);
 
-Implements the FIONBIO IO control command.
 
 
-[heading Example]
-
+[endsect]
 
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::non_blocking_io command(true);
- socket.io_control(command);
 
+[section:overload2 basic_socket::assign (2 of 2 overloads)]
 
+Assign an existing native socket to the socket.
 
+ boost::system::error_code assign(
+ const protocol_type & protocol,
+ const native_type & native_socket,
+ boost::system::error_code & ec);
 
 
 
 [endsect]
 
 
-[section:open basic_socket_acceptor::open]
-
-Open the acceptor using the specified protocol.
-
- void ``[link boost_asio.reference.basic_socket_acceptor.open.overload1 open]``(
- const protocol_type & protocol = protocol_type());
+[endsect]
 
- boost::system::error_code ``[link boost_asio.reference.basic_socket_acceptor.open.overload2 open]``(
- const protocol_type & protocol,
- boost::system::error_code & ec);
 
+[section:async_connect basic_socket::async_connect]
 
-[section:overload1 basic_socket_acceptor::open (1 of 2 overloads)]
+Start an asynchronous connect.
 
-Open the acceptor using the specified protocol.
+ template<
+ typename ``[link boost_asio.reference.ConnectHandler ConnectHandler]``>
+ void async_connect(
+ const endpoint_type & peer_endpoint,
+ ConnectHandler handler);
 
- void open(
- const protocol_type & protocol = protocol_type());
 
+This function is used to asynchronously connect a socket to the specified remote endpoint. The function call always returns immediately.
 
-This function opens the socket acceptor so that it will use the specified protocol.
+The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is returned to the closed state.
 
 
 [heading Parameters]
@@ -11308,16 +13616,16 @@
 
 [variablelist
   
-[[protocol][An object specifying which protocol is to be used.]]
-
-]
+[[peer_endpoint][The remote endpoint to which the socket will be connected. Copies will be made of the endpoint object as required.]]
 
-[heading Exceptions]
-
+[[handler][The handler to be called when the connection operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error // Result of operation
+ );
 
-[variablelist
-
-[[boost::system::system_error][Thrown on failure.]]
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
 
 ]
 
@@ -11325,8 +13633,20 @@
   
 
 
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- acceptor.open(boost::asio::ip::tcp::v4());
+ void connect_handler(const boost::system::error_code& error)
+ {
+ if (!error)
+ {
+ // Connect succeeded.
+ }
+ }
+
+ ...
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ boost::asio::ip::tcp::endpoint endpoint(
+ boost::asio::ip::address::from_string("1.2.3.4"), 12345);
+ socket.async_connect(endpoint, connect_handler);
 
 
 
@@ -11336,102 +13656,108 @@
 [endsect]
 
 
+[section:at_mark basic_socket::at_mark]
 
-[section:overload2 basic_socket_acceptor::open (2 of 2 overloads)]
+Determine whether the socket is at the out-of-band data mark.
 
-Open the acceptor using the specified protocol.
+ bool ``[link boost_asio.reference.basic_socket.at_mark.overload1 at_mark]``() const;
 
- boost::system::error_code open(
- const protocol_type & protocol,
- boost::system::error_code & ec);
+ bool ``[link boost_asio.reference.basic_socket.at_mark.overload2 at_mark]``(
+ boost::system::error_code & ec) const;
 
 
-This function opens the socket acceptor so that it will use the specified protocol.
+[section:overload1 basic_socket::at_mark (1 of 2 overloads)]
 
+Determine whether the socket is at the out-of-band data mark.
 
-[heading Parameters]
+ bool at_mark() const;
+
+
+This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
+
+
+[heading Return Value]
+
+A bool indicating whether the socket is at the out-of-band data mark.
+
+[heading Exceptions]
     
 
 [variablelist
   
-[[protocol][An object specifying which protocol is to be used.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
+[[boost::system::system_error][Thrown on failure. ]]
 
 ]
 
-[heading Example]
-
 
 
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- boost::system::error_code ec;
- acceptor.open(boost::asio::ip::tcp::v4(), ec);
- if (ec)
- {
- // An error occurred.
- }
-
+[endsect]
 
 
 
+[section:overload2 basic_socket::at_mark (2 of 2 overloads)]
 
+Determine whether the socket is at the out-of-band data mark.
 
-[endsect]
+ bool at_mark(
+ boost::system::error_code & ec) const;
 
 
-[endsect]
+This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
 
 
-[section:protocol_type basic_socket_acceptor::protocol_type]
+[heading Parameters]
+
 
-The protocol type.
+[variablelist
+
+[[ec][Set to indicate what error occurred, if any.]]
 
- typedef Protocol protocol_type;
+]
 
+[heading Return Value]
+
+A bool indicating whether the socket is at the out-of-band data mark.
 
 
 
 [endsect]
 
 
+[endsect]
 
-[section:receive_buffer_size basic_socket_acceptor::receive_buffer_size]
-
-
-['Inherited from socket_base.]
-
-Socket option for the receive buffer size of a socket.
-
- typedef implementation_defined receive_buffer_size;
+[section:available basic_socket::available]
 
+Determine the number of bytes available for reading.
 
+ std::size_t ``[link boost_asio.reference.basic_socket.available.overload1 available]``() const;
 
-Implements the SOL\_SOCKET/SO\_RCVBUF socket option.
+ std::size_t ``[link boost_asio.reference.basic_socket.available.overload2 available]``(
+ boost::system::error_code & ec) const;
 
 
-[heading Examples]
-
-Setting the option:
+[section:overload1 basic_socket::available (1 of 2 overloads)]
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::receive_buffer_size option(8192);
- socket.set_option(option);
+Determine the number of bytes available for reading.
 
+ std::size_t available() const;
 
 
+This function is used to determine the number of bytes that may be read without blocking.
 
-Getting the current option value:
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::receive_buffer_size option;
- socket.get_option(option);
- int size = option.value();
+[heading Return Value]
+
+The number of bytes that may be read without blocking, or 0 if an error occurs.
 
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
 
+]
 
 
 
@@ -11439,85 +13765,77 @@
 
 
 
-[section:receive_low_watermark basic_socket_acceptor::receive_low_watermark]
-
-
-['Inherited from socket_base.]
+[section:overload2 basic_socket::available (2 of 2 overloads)]
 
-Socket option for the receive low watermark.
+Determine the number of bytes available for reading.
 
- typedef implementation_defined receive_low_watermark;
+ std::size_t available(
+ boost::system::error_code & ec) const;
 
 
+This function is used to determine the number of bytes that may be read without blocking.
 
-Implements the SOL\_SOCKET/SO\_RCVLOWAT socket option.
 
+[heading Parameters]
+
 
-[heading Examples]
+[variablelist
   
-Setting the option:
-
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::receive_low_watermark option(1024);
- socket.set_option(option);
-
-
-
-
-Getting the current option value:
-
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::receive_low_watermark option;
- socket.get_option(option);
- int size = option.value();
-
+[[ec][Set to indicate what error occurred, if any.]]
 
+]
 
+[heading Return Value]
+
+The number of bytes that may be read without blocking, or 0 if an error occurs.
 
 
 
 [endsect]
 
 
+[endsect]
 
-[section:reuse_address basic_socket_acceptor::reuse_address]
-
-
-['Inherited from socket_base.]
-
-Socket option to allow the socket to be bound to an address that is already in use.
+[section:basic_socket basic_socket::basic_socket]
 
- typedef implementation_defined reuse_address;
+Construct a basic_socket without opening it.
 
+ ``[link boost_asio.reference.basic_socket.basic_socket.overload1 basic_socket]``(
+ boost::asio::io_service & io_service);
 
+ ``[link boost_asio.reference.basic_socket.basic_socket.overload2 basic_socket]``(
+ boost::asio::io_service & io_service,
+ const protocol_type & protocol);
 
-Implements the SOL\_SOCKET/SO\_REUSEADDR socket option.
+ ``[link boost_asio.reference.basic_socket.basic_socket.overload3 basic_socket]``(
+ boost::asio::io_service & io_service,
+ const endpoint_type & endpoint);
 
+ ``[link boost_asio.reference.basic_socket.basic_socket.overload4 basic_socket]``(
+ boost::asio::io_service & io_service,
+ const protocol_type & protocol,
+ const native_type & native_socket);
 
-[heading Examples]
-
-Setting the option:
 
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
- boost::asio::socket_base::reuse_address option(true);
- acceptor.set_option(option);
+[section:overload1 basic_socket::basic_socket (1 of 4 overloads)]
 
+Construct a basic_socket without opening it.
 
+ basic_socket(
+ boost::asio::io_service & io_service);
 
 
-Getting the current option value:
+This constructor creates a socket without opening it.
 
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
- boost::asio::socket_base::reuse_address option;
- acceptor.get_option(option);
- bool is_set = option.value();
 
+[heading Parameters]
+
 
+[variablelist
+
+[[io_service][The io\_service object that the socket will use to dispatch handlers for any asynchronous operations performed on the socket. ]]
 
+]
 
 
 
@@ -11525,134 +13843,145 @@
 
 
 
-[section:send_buffer_size basic_socket_acceptor::send_buffer_size]
-
-
-['Inherited from socket_base.]
+[section:overload2 basic_socket::basic_socket (2 of 4 overloads)]
 
-Socket option for the send buffer size of a socket.
+Construct and open a basic_socket.
 
- typedef implementation_defined send_buffer_size;
+ basic_socket(
+ boost::asio::io_service & io_service,
+ const protocol_type & protocol);
 
 
+This constructor creates and opens a socket.
 
-Implements the SOL\_SOCKET/SO\_SNDBUF socket option.
 
+[heading Parameters]
+
 
-[heading Examples]
+[variablelist
   
-Setting the option:
-
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::send_buffer_size option(8192);
- socket.set_option(option);
-
+[[io_service][The io\_service object that the socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
 
+[[protocol][An object specifying protocol parameters to be used.]]
 
+]
 
-Getting the current option value:
+[heading Exceptions]
+
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::send_buffer_size option;
- socket.get_option(option);
- int size = option.value();
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
 
+]
 
 
 
+[endsect]
 
 
-[endsect]
 
+[section:overload3 basic_socket::basic_socket (3 of 4 overloads)]
 
+Construct a basic_socket, opening it and binding it to the given local endpoint.
 
-[section:send_low_watermark basic_socket_acceptor::send_low_watermark]
+ basic_socket(
+ boost::asio::io_service & io_service,
+ const endpoint_type & endpoint);
 
 
-['Inherited from socket_base.]
+This constructor creates a socket and automatically opens it bound to the specified endpoint on the local machine. The protocol used is the protocol associated with the given endpoint.
 
-Socket option for the send low watermark.
 
- typedef implementation_defined send_low_watermark;
+[heading Parameters]
+
 
+[variablelist
+
+[[io_service][The io\_service object that the socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
 
+[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
 
-Implements the SOL\_SOCKET/SO\_SNDLOWAT socket option.
+]
 
+[heading Exceptions]
+
 
-[heading Examples]
+[variablelist
   
-Setting the option:
+[[boost::system::system_error][Thrown on failure. ]]
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::send_low_watermark option(1024);
- socket.set_option(option);
+]
 
 
 
+[endsect]
 
-Getting the current option value:
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::send_low_watermark option;
- socket.get_option(option);
- int size = option.value();
 
+[section:overload4 basic_socket::basic_socket (4 of 4 overloads)]
 
+Construct a basic_socket on an existing native socket.
 
+ basic_socket(
+ boost::asio::io_service & io_service,
+ const protocol_type & protocol,
+ const native_type & native_socket);
 
 
+This constructor creates a socket object to hold an existing native socket.
 
-[endsect]
 
+[heading Parameters]
+
 
+[variablelist
+
+[[io_service][The io\_service object that the socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
 
-[section:service_type basic_socket_acceptor::service_type]
+[[protocol][An object specifying protocol parameters to be used.]]
 
+[[native_socket][A native socket.]]
 
-['Inherited from basic_io_object.]
+]
 
-The type of the service that will be used to provide I/O operations.
+[heading Exceptions]
+
 
- typedef SocketAcceptorService service_type;
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
 
+]
 
 
 
 [endsect]
 
 
-[section:set_option basic_socket_acceptor::set_option]
+[endsect]
 
-Set an option on the acceptor.
+[section:bind basic_socket::bind]
 
- template<
- typename ``[link boost_asio.reference.SettableSocketOption SettableSocketOption]``>
- void ``[link boost_asio.reference.basic_socket_acceptor.set_option.overload1 set_option]``(
- const SettableSocketOption & option);
+Bind the socket to the given local endpoint.
 
- template<
- typename ``[link boost_asio.reference.SettableSocketOption SettableSocketOption]``>
- boost::system::error_code ``[link boost_asio.reference.basic_socket_acceptor.set_option.overload2 set_option]``(
- const SettableSocketOption & option,
+ void ``[link boost_asio.reference.basic_socket.bind.overload1 bind]``(
+ const endpoint_type & endpoint);
+
+ boost::system::error_code ``[link boost_asio.reference.basic_socket.bind.overload2 bind]``(
+ const endpoint_type & endpoint,
       boost::system::error_code & ec);
 
 
-[section:overload1 basic_socket_acceptor::set_option (1 of 2 overloads)]
+[section:overload1 basic_socket::bind (1 of 2 overloads)]
 
-Set an option on the acceptor.
+Bind the socket to the given local endpoint.
 
- template<
- typename ``[link boost_asio.reference.SettableSocketOption SettableSocketOption]``>
- void set_option(
- const SettableSocketOption & option);
+ void bind(
+ const endpoint_type & endpoint);
 
 
-This function is used to set an option on the acceptor.
+This function binds the socket to the specified endpoint on the local machine.
 
 
 [heading Parameters]
@@ -11660,7 +13989,7 @@
 
 [variablelist
   
-[[option][The new option value to be set on the acceptor.]]
+[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
 
 ]
 
@@ -11675,12 +14004,12 @@
 
 [heading Example]
   
-Setting the SOL\_SOCKET/SO\_REUSEADDR option:
 
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
- boost::asio::ip::tcp::acceptor::reuse_address option(true);
- acceptor.set_option(option);
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ socket.open(boost::asio::ip::tcp::v4());
+ socket.bind(boost::asio::ip::tcp::endpoint(
+ boost::asio::ip::tcp::v4(), 12345));
 
 
 
@@ -11691,18 +14020,16 @@
 
 
 
-[section:overload2 basic_socket_acceptor::set_option (2 of 2 overloads)]
+[section:overload2 basic_socket::bind (2 of 2 overloads)]
 
-Set an option on the acceptor.
+Bind the socket to the given local endpoint.
 
- template<
- typename ``[link boost_asio.reference.SettableSocketOption SettableSocketOption]``>
- boost::system::error_code set_option(
- const SettableSocketOption & option,
+ boost::system::error_code bind(
+ const endpoint_type & endpoint,
       boost::system::error_code & ec);
 
 
-This function is used to set an option on the acceptor.
+This function binds the socket to the specified endpoint on the local machine.
 
 
 [heading Parameters]
@@ -11710,7 +14037,7 @@
 
 [variablelist
   
-[[option][The new option value to be set on the acceptor.]]
+[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
 
 [[ec][Set to indicate what error occurred, if any.]]
 
@@ -11718,13 +14045,13 @@
 
 [heading Example]
   
-Setting the SOL\_SOCKET/SO\_REUSEADDR option:
 
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
- boost::asio::ip::tcp::acceptor::reuse_address option(true);
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ socket.open(boost::asio::ip::tcp::v4());
    boost::system::error_code ec;
- acceptor.set_option(option, ec);
+ socket.bind(boost::asio::ip::tcp::endpoint(
+ boost::asio::ip::tcp::v4(), 12345), ec);
    if (ec)
    {
      // An error occurred.
@@ -11741,547 +14068,332 @@
 [endsect]
 
 
-[section:shutdown_type basic_socket_acceptor::shutdown_type]
+[section:broadcast basic_socket::broadcast]
 
 
 ['Inherited from socket_base.]
 
-Different ways a socket may be shutdown.
+Socket option to permit sending of broadcast messages.
 
- enum shutdown_type
+ typedef implementation_defined broadcast;
 
-[heading Values]
-[variablelist
 
- [
- [shutdown_receive]
- [Shutdown the receive side of the socket. ]
- ]
 
- [
- [shutdown_send]
- [Shutdown the send side of the socket. ]
- ]
+Implements the SOL\_SOCKET/SO\_BROADCAST socket option.
 
- [
- [shutdown_both]
- [Shutdown both send and receive on the socket. ]
- ]
 
-]
+[heading Examples]
+
+Setting the option:
 
+ boost::asio::ip::udp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::broadcast option(true);
+ socket.set_option(option);
 
 
-[endsect]
 
 
+Getting the current option value:
 
-[endsect]
+ boost::asio::ip::udp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::broadcast option;
+ socket.get_option(option);
+ bool is_set = option.value();
 
-[section:basic_socket_iostream basic_socket_iostream]
 
-Iostream interface for a socket.
 
- template<
- typename ``[link boost_asio.reference.Protocol Protocol]``,
- typename ``[link boost_asio.reference.StreamSocketService StreamSocketService]`` = stream_socket_service<Protocol>>
- class basic_socket_iostream
 
 
-[heading Member Functions]
-[table
- [[Name][Description]]
 
- [
- [[link boost_asio.reference.basic_socket_iostream.basic_socket_iostream [*basic_socket_iostream]]]
- [Construct a basic_socket_iostream without establishing a connection. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_iostream.close [*close]]]
- [Close the connection. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_iostream.connect [*connect]]]
- [Establish a connection to an endpoint corresponding to a resolver query. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_iostream.rdbuf [*rdbuf]]]
- [Return a pointer to the underlying streambuf. ]
- ]
-
-]
+[endsect]
 
-[section:basic_socket_iostream basic_socket_iostream::basic_socket_iostream]
 
-Construct a basic_socket_iostream without establishing a connection.
 
- ``[link boost_asio.reference.basic_socket_iostream.basic_socket_iostream.overload1 basic_socket_iostream]``();
+[section:bytes_readable basic_socket::bytes_readable]
 
- template<
- typename T1,
- ... ,
- typename TN>
- ``[link boost_asio.reference.basic_socket_iostream.basic_socket_iostream.overload2 basic_socket_iostream]``(
- T1 t1,
- ... ,
- TN tn);
 
+['Inherited from socket_base.]
 
-[section:overload1 basic_socket_iostream::basic_socket_iostream (1 of 2 overloads)]
+IO control command to get the amount of data that can be read without blocking.
 
-Construct a basic_socket_iostream without establishing a connection.
+ typedef implementation_defined bytes_readable;
 
- basic_socket_iostream();
 
 
+Implements the FIONREAD IO control command.
 
-[endsect]
 
+[heading Example]
+
 
 
-[section:overload2 basic_socket_iostream::basic_socket_iostream (2 of 2 overloads)]
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::bytes_readable command(true);
+ socket.io_control(command);
+ std::size_t bytes_readable = command.get();
 
-Establish a connection to an endpoint corresponding to a resolver query.
 
- template<
- typename T1,
- ... ,
- typename TN>
- basic_socket_iostream(
- T1 t1,
- ... ,
- TN tn);
 
 
-This constructor automatically establishes a connection based on the supplied resolver query parameters. The arguments are used to construct a resolver query object.
 
 
 [endsect]
 
 
-[endsect]
-
+[section:cancel basic_socket::cancel]
 
-[section:close basic_socket_iostream::close]
+Cancel all asynchronous operations associated with the socket.
 
-Close the connection.
+ void ``[link boost_asio.reference.basic_socket.cancel.overload1 cancel]``();
 
- void close();
+ boost::system::error_code ``[link boost_asio.reference.basic_socket.cancel.overload2 cancel]``(
+ boost::system::error_code & ec);
 
 
+[section:overload1 basic_socket::cancel (1 of 2 overloads)]
 
-[endsect]
+Cancel all asynchronous operations associated with the socket.
 
+ void cancel();
 
 
-[section:connect basic_socket_iostream::connect]
+This function causes all outstanding asynchronous connect, send and receive operations to finish immediately, and the handlers for cancelled operations will be passed the boost::asio::error::operation\_aborted error.
 
-Establish a connection to an endpoint corresponding to a resolver query.
 
- template<
- typename T1,
- ... ,
- typename TN>
- void connect(
- T1 t1,
- ... ,
- TN tn);
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
 
-This function automatically establishes a connection based on the supplied resolver query parameters. The arguments are used to construct a resolver query object.
+]
 
+[heading Remarks]
+
+Calls to cancel() will always fail with boost::asio::error::operation\_not\_supported when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless BOOST\_ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use:
 
-[endsect]
+* It will only cancel asynchronous operations that were initiated in the current thread.
 
+* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed.
 
+For portable cancellation, consider using one of the following alternatives:
 
-[section:rdbuf basic_socket_iostream::rdbuf]
 
-Return a pointer to the underlying streambuf.
+* Disable asio's I/O completion port backend by defining BOOST_ASIO_DISABLE_IOCP.
 
- basic_socket_streambuf< Protocol, StreamSocketService > * rdbuf() const;
+* Use the close() function to simultaneously cancel the outstanding operations and close the socket.
 
+When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above.
 
 
 [endsect]
 
 
 
-[endsect]
+[section:overload2 basic_socket::cancel (2 of 2 overloads)]
 
-[section:basic_socket_streambuf basic_socket_streambuf]
+Cancel all asynchronous operations associated with the socket.
 
-Iostream streambuf for a socket.
+ boost::system::error_code cancel(
+ boost::system::error_code & ec);
 
- template<
- typename ``[link boost_asio.reference.Protocol Protocol]``,
- typename ``[link boost_asio.reference.StreamSocketService StreamSocketService]`` = stream_socket_service<Protocol>>
- class basic_socket_streambuf :
- public basic_socket< Protocol, StreamSocketService >
 
+This function causes all outstanding asynchronous connect, send and receive operations to finish immediately, and the handlers for cancelled operations will be passed the boost::asio::error::operation\_aborted error.
 
-[heading Types]
-[table
- [[Name][Description]]
 
- [
+[heading Parameters]
+
 
- [[link boost_asio.reference.basic_socket_streambuf.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
+[variablelist
   
- ]
+[[ec][Set to indicate what error occurred, if any.]]
 
- [
+]
 
- [[link boost_asio.reference.basic_socket_streambuf.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
+[heading Remarks]
+
+Calls to cancel() will always fail with boost::asio::error::operation\_not\_supported when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless BOOST\_ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use:
 
- [
+* It will only cancel asynchronous operations that were initiated in the current thread.
 
- [[link boost_asio.reference.basic_socket_streambuf.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
+* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed.
 
- [
+For portable cancellation, consider using one of the following alternatives:
 
- [[link boost_asio.reference.basic_socket_streambuf.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
 
- [
+* Disable asio's I/O completion port backend by defining BOOST_ASIO_DISABLE_IOCP.
 
- [[link boost_asio.reference.basic_socket_streambuf.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
+* Use the close() function to simultaneously cancel the outstanding operations and close the socket.
 
- [
+When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above.
 
- [[link boost_asio.reference.basic_socket_streambuf.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
 
- [
+[endsect]
 
- [[link boost_asio.reference.basic_socket_streambuf.implementation_type [*implementation_type]]]
- [The underlying implementation type of I/O object. ]
-
- ]
 
- [
+[endsect]
 
- [[link boost_asio.reference.basic_socket_streambuf.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
+[section:close basic_socket::close]
 
- [
+Close the socket.
 
- [[link boost_asio.reference.basic_socket_streambuf.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
+ void ``[link boost_asio.reference.basic_socket.close.overload1 close]``();
 
- [
+ boost::system::error_code ``[link boost_asio.reference.basic_socket.close.overload2 close]``(
+ boost::system::error_code & ec);
 
- [[link boost_asio.reference.basic_socket_streambuf.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
-
- ]
 
- [
+[section:overload1 basic_socket::close (1 of 2 overloads)]
 
- [[link boost_asio.reference.basic_socket_streambuf.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
+Close the socket.
 
- [
+ void close();
 
- [[link boost_asio.reference.basic_socket_streambuf.native_type [*native_type]]]
- [The native representation of a socket. ]
-
- ]
 
- [
+This function is used to close the socket. Any asynchronous send, receive or connect operations will be cancelled immediately, and will complete with the boost::asio::error::operation\_aborted error.
 
- [[link boost_asio.reference.basic_socket_streambuf.non_blocking_io [*non_blocking_io]]]
- [IO control command to set the blocking mode of the socket. ]
-
- ]
 
- [
+[heading Exceptions]
+
 
- [[link boost_asio.reference.basic_socket_streambuf.protocol_type [*protocol_type]]]
- [The protocol type. ]
+[variablelist
   
- ]
+[[boost::system::system_error][Thrown on failure.]]
 
- [
+]
 
- [[link boost_asio.reference.basic_socket_streambuf.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
+[heading Remarks]
+
+For portable behaviour with respect to graceful closure of a connected socket, call shutdown() before closing the socket.
 
- [
 
- [[link boost_asio.reference.basic_socket_streambuf.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
 
- [
+[endsect]
 
- [[link boost_asio.reference.basic_socket_streambuf.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.basic_socket_streambuf.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
+[section:overload2 basic_socket::close (2 of 2 overloads)]
 
- [
+Close the socket.
 
- [[link boost_asio.reference.basic_socket_streambuf.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
+ boost::system::error_code close(
+ boost::system::error_code & ec);
 
- [
 
- [[link boost_asio.reference.basic_socket_streambuf.service_type [*service_type]]]
- [The type of the service that will be used to provide I/O operations. ]
-
- ]
+This function is used to close the socket. Any asynchronous send, receive or connect operations will be cancelled immediately, and will complete with the boost::asio::error::operation\_aborted error.
 
- [
 
- [[link boost_asio.reference.basic_socket_streambuf.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
+[heading Parameters]
+
+
+[variablelist
   
- ]
+[[ec][Set to indicate what error occurred, if any.]]
 
 ]
 
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link boost_asio.reference.basic_socket_streambuf.assign [*assign]]]
- [Assign an existing native socket to the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_streambuf.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_streambuf.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_streambuf.available [*available]]]
- [Determine the number of bytes available for reading. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_streambuf.basic_socket_streambuf [*basic_socket_streambuf]]]
- [Construct a basic_socket_streambuf without establishing a connection. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_streambuf.bind [*bind]]]
- [Bind the socket to the given local endpoint. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_streambuf.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_streambuf.close [*close]]]
- [Close the connection. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_streambuf.connect [*connect]]]
- [Establish a connection. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_streambuf.get_io_service [*get_io_service]]]
- [Get the io_service associated with the object. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_streambuf.get_option [*get_option]]]
- [Get an option from the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_streambuf.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_streambuf.io_service [*io_service]]]
- [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_streambuf.is_open [*is_open]]]
- [Determine whether the socket is open. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_streambuf.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_streambuf.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_streambuf.native [*native]]]
- [Get the native socket representation. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_streambuf.open [*open]]]
- [Open the socket using the specified protocol. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_streambuf.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint of the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_streambuf.set_option [*set_option]]]
- [Set an option on the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_streambuf.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_streambuf._basic_socket_streambuf [*~basic_socket_streambuf]]]
- [Destructor flushes buffered data. ]
- ]
+[heading Example]
   
-]
 
-[heading Data Members]
-[table
- [[Name][Description]]
 
- [
- [[link boost_asio.reference.basic_socket_streambuf.max_connections [*max_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::system::error_code ec;
+ socket.close(ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
 
- [
- [[link boost_asio.reference.basic_socket_streambuf.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
 
- [
- [[link boost_asio.reference.basic_socket_streambuf.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
 
- [
- [[link boost_asio.reference.basic_socket_streambuf.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
 
-]
+[heading Remarks]
+
+For portable behaviour with respect to graceful closure of a connected socket, call shutdown() before closing the socket.
 
-[section:assign basic_socket_streambuf::assign]
 
-Assign an existing native socket to the socket.
 
- void ``[link boost_asio.reference.basic_socket_streambuf.assign.overload1 assign]``(
- const protocol_type & protocol,
- const native_type & native_socket);
+[endsect]
 
- boost::system::error_code ``[link boost_asio.reference.basic_socket_streambuf.assign.overload2 assign]``(
- const protocol_type & protocol,
- const native_type & native_socket,
+
+[endsect]
+
+[section:connect basic_socket::connect]
+
+Connect the socket to the specified endpoint.
+
+ void ``[link boost_asio.reference.basic_socket.connect.overload1 connect]``(
+ const endpoint_type & peer_endpoint);
+
+ boost::system::error_code ``[link boost_asio.reference.basic_socket.connect.overload2 connect]``(
+ const endpoint_type & peer_endpoint,
       boost::system::error_code & ec);
 
 
-[section:overload1 basic_socket_streambuf::assign (1 of 2 overloads)]
+[section:overload1 basic_socket::connect (1 of 2 overloads)]
 
+Connect the socket to the specified endpoint.
 
-['Inherited from basic_socket.]
+ void connect(
+ const endpoint_type & peer_endpoint);
 
-Assign an existing native socket to the socket.
 
- void assign(
- const protocol_type & protocol,
- const native_type & native_socket);
+This function is used to connect a socket to the specified remote endpoint. The function call will block until the connection is successfully made or an error occurs.
 
+The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is returned to the closed state.
 
 
-[endsect]
+[heading Parameters]
+
 
+[variablelist
+
+[[peer_endpoint][The remote endpoint to which the socket will be connected.]]
 
+]
 
-[section:overload2 basic_socket_streambuf::assign (2 of 2 overloads)]
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
 
-['Inherited from basic_socket.]
+]
 
-Assign an existing native socket to the socket.
+[heading Example]
+
 
- boost::system::error_code assign(
- const protocol_type & protocol,
- const native_type & native_socket,
- boost::system::error_code & ec);
 
+ boost::asio::ip::tcp::socket socket(io_service);
+ boost::asio::ip::tcp::endpoint endpoint(
+ boost::asio::ip::address::from_string("1.2.3.4"), 12345);
+ socket.connect(endpoint);
 
 
-[endsect]
 
 
-[endsect]
 
 
-[section:async_connect basic_socket_streambuf::async_connect]
+[endsect]
 
 
-['Inherited from basic_socket.]
 
-Start an asynchronous connect.
+[section:overload2 basic_socket::connect (2 of 2 overloads)]
 
- void async_connect(
+Connect the socket to the specified endpoint.
+
+ boost::system::error_code connect(
       const endpoint_type & peer_endpoint,
- ConnectHandler handler);
+ boost::system::error_code & ec);
 
 
-This function is used to asynchronously connect a socket to the specified remote endpoint. The function call always returns immediately.
+This function is used to connect a socket to the specified remote endpoint. The function call will block until the connection is successfully made or an error occurs.
 
 The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is returned to the closed state.
 
@@ -12291,16 +14403,9 @@
 
 [variablelist
   
-[[peer_endpoint][The remote endpoint to which the socket will be connected. Copies will be made of the endpoint object as required.]]
-
-[[handler][The handler to be called when the connection operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const boost::system::error_code& error // Result of operation
- );
+[[peer_endpoint][The remote endpoint to which the socket will be connected.]]
 
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
+[[ec][Set to indicate what error occurred, if any.]]
 
 ]
 
@@ -12308,64 +14413,63 @@
   
 
 
- void connect_handler(const boost::system::error_code& error)
+ boost::asio::ip::tcp::socket socket(io_service);
+ boost::asio::ip::tcp::endpoint endpoint(
+ boost::asio::ip::address::from_string("1.2.3.4"), 12345);
+ boost::system::error_code ec;
+ socket.connect(endpoint, ec);
+ if (ec)
    {
- if (!error)
- {
- // Connect succeeded.
- }
+ // An error occurred.
    }
 
- ...
 
- boost::asio::ip::tcp::socket socket(io_service);
- boost::asio::ip::tcp::endpoint endpoint(
- boost::asio::ip::address::from_string("1.2.3.4"), 12345);
- socket.async_connect(endpoint, connect_handler);
 
 
 
 
+[endsect]
 
 
 [endsect]
 
 
-[section:at_mark basic_socket_streambuf::at_mark]
+[section:debug basic_socket::debug]
 
-Determine whether the socket is at the out-of-band data mark.
 
- bool ``[link boost_asio.reference.basic_socket_streambuf.at_mark.overload1 at_mark]``() const;
+['Inherited from socket_base.]
 
- bool ``[link boost_asio.reference.basic_socket_streambuf.at_mark.overload2 at_mark]``(
- boost::system::error_code & ec) const;
+Socket option to enable socket-level debugging.
 
+ typedef implementation_defined debug;
 
-[section:overload1 basic_socket_streambuf::at_mark (1 of 2 overloads)]
 
 
-['Inherited from basic_socket.]
+Implements the SOL\_SOCKET/SO\_DEBUG socket option.
 
-Determine whether the socket is at the out-of-band data mark.
 
- bool at_mark() const;
+[heading Examples]
+
+Setting the option:
 
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::debug option(true);
+ socket.set_option(option);
 
-This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
 
 
-[heading Return Value]
-
-A bool indicating whether the socket is at the out-of-band data mark.
 
-[heading Exceptions]
-
+Getting the current option value:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::debug option;
+ socket.get_option(option);
+ bool is_set = option.value();
+
 
-[variablelist
-
-[[boost::system::system_error][Thrown on failure. ]]
 
-]
 
 
 
@@ -12373,152 +14477,154 @@
 
 
 
-[section:overload2 basic_socket_streambuf::at_mark (2 of 2 overloads)]
+[section:do_not_route basic_socket::do_not_route]
 
 
-['Inherited from basic_socket.]
+['Inherited from socket_base.]
 
-Determine whether the socket is at the out-of-band data mark.
+Socket option to prevent routing, use local interfaces only.
 
- bool at_mark(
- boost::system::error_code & ec) const;
+ typedef implementation_defined do_not_route;
 
 
-This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
 
+Implements the SOL\_SOCKET/SO\_DONTROUTE socket option.
 
-[heading Parameters]
-
 
-[variablelist
+[heading Examples]
   
-[[ec][Set to indicate what error occurred, if any.]]
+Setting the option:
 
-]
+ boost::asio::ip::udp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::do_not_route option(true);
+ socket.set_option(option);
 
-[heading Return Value]
-
-A bool indicating whether the socket is at the out-of-band data mark.
 
 
 
-[endsect]
+Getting the current option value:
 
+ boost::asio::ip::udp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::do_not_route option;
+ socket.get_option(option);
+ bool is_set = option.value();
 
-[endsect]
 
-[section:available basic_socket_streambuf::available]
 
-Determine the number of bytes available for reading.
 
- std::size_t ``[link boost_asio.reference.basic_socket_streambuf.available.overload1 available]``() const;
 
- std::size_t ``[link boost_asio.reference.basic_socket_streambuf.available.overload2 available]``(
- boost::system::error_code & ec) const;
 
+[endsect]
 
-[section:overload1 basic_socket_streambuf::available (1 of 2 overloads)]
 
 
-['Inherited from basic_socket.]
+[section:enable_connection_aborted basic_socket::enable_connection_aborted]
 
-Determine the number of bytes available for reading.
 
- std::size_t available() const;
+['Inherited from socket_base.]
 
+Socket option to report aborted connections on accept.
 
-This function is used to determine the number of bytes that may be read without blocking.
+ typedef implementation_defined enable_connection_aborted;
 
 
-[heading Return Value]
-
-The number of bytes that may be read without blocking, or 0 if an error occurs.
 
-[heading Exceptions]
-
+Implements a custom socket option that determines whether or not an accept operation is permitted to fail with boost::asio::error::connection\_aborted. By default the option is false.
 
-[variablelist
+
+[heading Examples]
   
-[[boost::system::system_error][Thrown on failure. ]]
+Setting the option:
 
-]
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
+ boost::asio::socket_base::enable_connection_aborted option(true);
+ acceptor.set_option(option);
 
 
 
-[endsect]
 
+Getting the current option value:
 
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
+ boost::asio::socket_base::enable_connection_aborted option;
+ acceptor.get_option(option);
+ bool is_set = option.value();
 
-[section:overload2 basic_socket_streambuf::available (2 of 2 overloads)]
 
 
-['Inherited from basic_socket.]
 
-Determine the number of bytes available for reading.
 
- std::size_t available(
- boost::system::error_code & ec) const;
 
+[endsect]
 
-This function is used to determine the number of bytes that may be read without blocking.
 
 
-[heading Parameters]
-
+[section:endpoint_type basic_socket::endpoint_type]
 
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
+The endpoint type.
 
-]
+ typedef Protocol::endpoint endpoint_type;
 
-[heading Return Value]
-
-The number of bytes that may be read without blocking, or 0 if an error occurs.
 
 
 
 [endsect]
 
 
-[endsect]
 
+[section:get_io_service basic_socket::get_io_service]
 
-[section:basic_socket_streambuf basic_socket_streambuf::basic_socket_streambuf]
 
-Construct a basic_socket_streambuf without establishing a connection.
+['Inherited from basic_io_object.]
 
- basic_socket_streambuf();
+Get the io_service associated with the object.
 
+ boost::asio::io_service & get_io_service();
 
 
-[endsect]
+This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
 
 
-[section:bind basic_socket_streambuf::bind]
+[heading Return Value]
+
+A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
 
-Bind the socket to the given local endpoint.
 
- void ``[link boost_asio.reference.basic_socket_streambuf.bind.overload1 bind]``(
- const endpoint_type & endpoint);
 
- boost::system::error_code ``[link boost_asio.reference.basic_socket_streambuf.bind.overload2 bind]``(
- const endpoint_type & endpoint,
- boost::system::error_code & ec);
+[endsect]
 
 
-[section:overload1 basic_socket_streambuf::bind (1 of 2 overloads)]
+[section:get_option basic_socket::get_option]
 
+Get an option from the socket.
 
-['Inherited from basic_socket.]
+ template<
+ typename ``[link boost_asio.reference.GettableSocketOption GettableSocketOption]``>
+ void ``[link boost_asio.reference.basic_socket.get_option.overload1 get_option]``(
+ GettableSocketOption & option) const;
 
-Bind the socket to the given local endpoint.
+ template<
+ typename ``[link boost_asio.reference.GettableSocketOption GettableSocketOption]``>
+ boost::system::error_code ``[link boost_asio.reference.basic_socket.get_option.overload2 get_option]``(
+ GettableSocketOption & option,
+ boost::system::error_code & ec) const;
 
- void bind(
- const endpoint_type & endpoint);
 
+[section:overload1 basic_socket::get_option (1 of 2 overloads)]
+
+Get an option from the socket.
+
+ template<
+ typename ``[link boost_asio.reference.GettableSocketOption GettableSocketOption]``>
+ void get_option(
+ GettableSocketOption & option) const;
 
-This function binds the socket to the specified endpoint on the local machine.
+
+This function is used to get the current value of an option on the socket.
 
 
 [heading Parameters]
@@ -12526,7 +14632,7 @@
 
 [variablelist
   
-[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
+[[option][The option value to be obtained from the socket.]]
 
 ]
 
@@ -12541,12 +14647,13 @@
 
 [heading Example]
   
-
+Getting the value of the SOL\_SOCKET/SO\_KEEPALIVE option:
 
    boost::asio::ip::tcp::socket socket(io_service);
- socket.open(boost::asio::ip::tcp::v4());
- socket.bind(boost::asio::ip::tcp::endpoint(
- boost::asio::ip::tcp::v4(), 12345));
+ ...
+ boost::asio::ip::tcp::socket::keep_alive option;
+ socket.get_option(option);
+ bool is_set = option.get();
 
 
 
@@ -12557,19 +14664,18 @@
 
 
 
-[section:overload2 basic_socket_streambuf::bind (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
+[section:overload2 basic_socket::get_option (2 of 2 overloads)]
 
-Bind the socket to the given local endpoint.
+Get an option from the socket.
 
- boost::system::error_code bind(
- const endpoint_type & endpoint,
- boost::system::error_code & ec);
+ template<
+ typename ``[link boost_asio.reference.GettableSocketOption GettableSocketOption]``>
+ boost::system::error_code get_option(
+ GettableSocketOption & option,
+ boost::system::error_code & ec) const;
 
 
-This function binds the socket to the specified endpoint on the local machine.
+This function is used to get the current value of an option on the socket.
 
 
 [heading Parameters]
@@ -12577,7 +14683,7 @@
 
 [variablelist
   
-[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
+[[option][The option value to be obtained from the socket.]]
 
 [[ec][Set to indicate what error occurred, if any.]]
 
@@ -12585,17 +14691,18 @@
 
 [heading Example]
   
-
+Getting the value of the SOL\_SOCKET/SO\_KEEPALIVE option:
 
    boost::asio::ip::tcp::socket socket(io_service);
- socket.open(boost::asio::ip::tcp::v4());
+ ...
+ boost::asio::ip::tcp::socket::keep_alive option;
    boost::system::error_code ec;
- socket.bind(boost::asio::ip::tcp::endpoint(
- boost::asio::ip::tcp::v4(), 12345), ec);
+ socket.get_option(option, ec);
    if (ec)
    {
      // An error occurred.
    }
+ bool is_set = option.get();
 
 
 
@@ -12608,42 +14715,14 @@
 [endsect]
 
 
-[section:broadcast basic_socket_streambuf::broadcast]
-
-
-['Inherited from socket_base.]
-
-Socket option to permit sending of broadcast messages.
-
- typedef implementation_defined broadcast;
-
-
-
-Implements the SOL\_SOCKET/SO\_BROADCAST socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- boost::asio::ip::udp::socket socket(io_service);
- ...
- boost::asio::socket_base::broadcast option(true);
- socket.set_option(option);
-
-
-
-
-Getting the current option value:
+[section:implementation basic_socket::implementation]
 
- boost::asio::ip::udp::socket socket(io_service);
- ...
- boost::asio::socket_base::broadcast option;
- socket.get_option(option);
- bool is_set = option.value();
 
+['Inherited from basic_io_object.]
 
+The underlying implementation of the I/O object.
 
+ implementation_type implementation;
 
 
 
@@ -12651,31 +14730,14 @@
 
 
 
-[section:bytes_readable basic_socket_streambuf::bytes_readable]
-
-
-['Inherited from socket_base.]
-
-IO control command to get the amount of data that can be read without blocking.
-
- typedef implementation_defined bytes_readable;
-
-
-
-Implements the FIONREAD IO control command.
-
-
-[heading Example]
-
+[section:implementation_type basic_socket::implementation_type]
 
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::bytes_readable command(true);
- socket.io_control(command);
- std::size_t bytes_readable = command.get();
+['Inherited from basic_io_object.]
 
+The underlying implementation type of I/O object.
 
+ typedef service_type::implementation_type implementation_type;
 
 
 
@@ -12683,127 +14745,65 @@
 [endsect]
 
 
-[section:cancel basic_socket_streambuf::cancel]
+[section:io_control basic_socket::io_control]
 
-Cancel all asynchronous operations associated with the socket.
+Perform an IO control command on the socket.
 
- void ``[link boost_asio.reference.basic_socket_streambuf.cancel.overload1 cancel]``();
+ template<
+ typename ``[link boost_asio.reference.IoControlCommand IoControlCommand]``>
+ void ``[link boost_asio.reference.basic_socket.io_control.overload1 io_control]``(
+ IoControlCommand & command);
 
- boost::system::error_code ``[link boost_asio.reference.basic_socket_streambuf.cancel.overload2 cancel]``(
+ template<
+ typename ``[link boost_asio.reference.IoControlCommand IoControlCommand]``>
+ boost::system::error_code ``[link boost_asio.reference.basic_socket.io_control.overload2 io_control]``(
+ IoControlCommand & command,
       boost::system::error_code & ec);
 
 
-[section:overload1 basic_socket_streambuf::cancel (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
+[section:overload1 basic_socket::io_control (1 of 2 overloads)]
 
-Cancel all asynchronous operations associated with the socket.
+Perform an IO control command on the socket.
 
- void cancel();
+ template<
+ typename ``[link boost_asio.reference.IoControlCommand IoControlCommand]``>
+ void io_control(
+ IoControlCommand & command);
 
 
-This function causes all outstanding asynchronous connect, send and receive operations to finish immediately, and the handlers for cancelled operations will be passed the boost::asio::error::operation\_aborted error.
+This function is used to execute an IO control command on the socket.
 
 
-[heading Exceptions]
+[heading Parameters]
     
 
 [variablelist
   
-[[boost::system::system_error][Thrown on failure.]]
+[[command][The IO control command to be performed on the socket.]]
 
 ]
 
-[heading Remarks]
-
-Calls to cancel() will always fail with boost::asio::error::operation\_not\_supported when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless BOOST\_ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use:
-
-* It will only cancel asynchronous operations that were initiated in the current thread.
-
-* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed.
-
-For portable cancellation, consider using one of the following alternatives:
-
-
-* Disable asio's I/O completion port backend by defining BOOST_ASIO_DISABLE_IOCP.
-
-* Use the close() function to simultaneously cancel the outstanding operations and close the socket.
-
-When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above.
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::cancel (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-Cancel all asynchronous operations associated with the socket.
-
- boost::system::error_code cancel(
- boost::system::error_code & ec);
-
-
-This function causes all outstanding asynchronous connect, send and receive operations to finish immediately, and the handlers for cancelled operations will be passed the boost::asio::error::operation\_aborted error.
-
-
-[heading Parameters]
+[heading Exceptions]
     
 
 [variablelist
   
-[[ec][Set to indicate what error occurred, if any.]]
+[[boost::system::system_error][Thrown on failure.]]
 
 ]
 
-[heading Remarks]
-
-Calls to cancel() will always fail with boost::asio::error::operation\_not\_supported when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless BOOST\_ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use:
-
-* It will only cancel asynchronous operations that were initiated in the current thread.
-
-* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed.
-
-For portable cancellation, consider using one of the following alternatives:
-
-
-* Disable asio's I/O completion port backend by defining BOOST_ASIO_DISABLE_IOCP.
-
-* Use the close() function to simultaneously cancel the outstanding operations and close the socket.
-
-When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above.
-
-
-[endsect]
-
-
-[endsect]
-
-[section:close basic_socket_streambuf::close]
-
-Close the connection.
-
- basic_socket_streambuf< Protocol, StreamSocketService > * ``[link boost_asio.reference.basic_socket_streambuf.close.overload1 close]``();
-
- boost::system::error_code ``[link boost_asio.reference.basic_socket_streambuf.close.overload2 close]``(
- boost::system::error_code & ec);
-
-
-[section:overload1 basic_socket_streambuf::close (1 of 2 overloads)]
-
-Close the connection.
+[heading Example]
+
+Getting the number of bytes ready to read:
 
- basic_socket_streambuf< Protocol, StreamSocketService > * close();
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::ip::tcp::socket::bytes_readable command;
+ socket.io_control(command);
+ std::size_t bytes_readable = command.get();
 
 
 
-[heading Return Value]
-
-this if a connection was successfully established, a null pointer otherwise.
 
 
 
@@ -12811,18 +14811,18 @@
 
 
 
-[section:overload2 basic_socket_streambuf::close (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
+[section:overload2 basic_socket::io_control (2 of 2 overloads)]
 
-Close the socket.
+Perform an IO control command on the socket.
 
- boost::system::error_code close(
+ template<
+ typename ``[link boost_asio.reference.IoControlCommand IoControlCommand]``>
+ boost::system::error_code io_control(
+ IoControlCommand & command,
       boost::system::error_code & ec);
 
 
-This function is used to close the socket. Any asynchronous send, receive or connect operations will be cancelled immediately, and will complete with the boost::asio::error::operation\_aborted error.
+This function is used to execute an IO control command on the socket.
 
 
 [heading Parameters]
@@ -12830,30 +14830,30 @@
 
 [variablelist
   
+[[command][The IO control command to be performed on the socket.]]
+
 [[ec][Set to indicate what error occurred, if any.]]
 
 ]
 
 [heading Example]
   
-
+Getting the number of bytes ready to read:
 
    boost::asio::ip::tcp::socket socket(io_service);
    ...
+ boost::asio::ip::tcp::socket::bytes_readable command;
    boost::system::error_code ec;
- socket.close(ec);
+ socket.io_control(command, ec);
    if (ec)
    {
      // An error occurred.
    }
+ std::size_t bytes_readable = command.get();
 
 
 
 
-[heading Remarks]
-
-For portable behaviour with respect to graceful closure of a connected socket, call shutdown() before closing the socket.
-
 
 
 [endsect]
@@ -12861,41 +14861,23 @@
 
 [endsect]
 
-[section:connect basic_socket_streambuf::connect]
-
-Establish a connection.
-
- basic_socket_streambuf< Protocol, StreamSocketService > * ``[link boost_asio.reference.basic_socket_streambuf.connect.overload1 connect]``(
- const endpoint_type & endpoint);
-
- template<
- typename T1,
- ... ,
- typename TN>
- basic_socket_streambuf< Protocol, StreamSocketService > * ``[link boost_asio.reference.basic_socket_streambuf.connect.overload2 connect]``(
- T1 t1,
- ... ,
- TN tn);
 
- boost::system::error_code ``[link boost_asio.reference.basic_socket_streambuf.connect.overload3 connect]``(
- const endpoint_type & peer_endpoint,
- boost::system::error_code & ec);
+[section:io_service basic_socket::io_service]
 
 
-[section:overload1 basic_socket_streambuf::connect (1 of 3 overloads)]
+['Inherited from basic_io_object.]
 
-Establish a connection.
+(Deprecated: use get_io_service().) Get the io_service associated with the object.
 
- basic_socket_streambuf< Protocol, StreamSocketService > * connect(
- const endpoint_type & endpoint);
+ boost::asio::io_service & io_service();
 
 
-This function establishes a connection to the specified endpoint.
+This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
 
 
 [heading Return Value]
       
-this if a connection was successfully established, a null pointer otherwise.
+A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
 
 
 
@@ -12903,26 +14885,11 @@
 
 
 
-[section:overload2 basic_socket_streambuf::connect (2 of 3 overloads)]
-
-Establish a connection.
-
- template<
- typename T1,
- ... ,
- typename TN>
- basic_socket_streambuf< Protocol, StreamSocketService > * connect(
- T1 t1,
- ... ,
- TN tn);
-
-
-This function automatically establishes a connection based on the supplied resolver query parameters. The arguments are used to construct a resolver query object.
+[section:is_open basic_socket::is_open]
 
+Determine whether the socket is open.
 
-[heading Return Value]
-
-this if a connection was successfully established, a null pointer otherwise.
+ bool is_open() const;
 
 
 
@@ -12930,71 +14897,61 @@
 
 
 
-[section:overload3 basic_socket_streambuf::connect (3 of 3 overloads)]
-
+[section:keep_alive basic_socket::keep_alive]
 
-['Inherited from basic_socket.]
 
-Connect the socket to the specified endpoint.
+['Inherited from socket_base.]
 
- boost::system::error_code connect(
- const endpoint_type & peer_endpoint,
- boost::system::error_code & ec);
+Socket option to send keep-alives.
 
+ typedef implementation_defined keep_alive;
 
-This function is used to connect a socket to the specified remote endpoint. The function call will block until the connection is successfully made or an error occurs.
 
-The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is returned to the closed state.
 
+Implements the SOL\_SOCKET/SO\_KEEPALIVE socket option.
 
-[heading Parameters]
-
 
-[variablelist
+[heading Examples]
   
-[[peer_endpoint][The remote endpoint to which the socket will be connected.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
+Setting the option:
 
-]
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::keep_alive option(true);
+ socket.set_option(option);
 
-[heading Example]
-
 
 
- boost::asio::ip::tcp::socket socket(io_service);
- boost::asio::ip::tcp::endpoint endpoint(
- boost::asio::ip::address::from_string("1.2.3.4"), 12345);
- boost::system::error_code ec;
- socket.connect(endpoint, ec);
- if (ec)
- {
- // An error occurred.
- }
 
+Getting the current option value:
 
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::keep_alive option;
+ socket.get_option(option);
+ bool is_set = option.value();
 
 
 
 
-[endsect]
 
 
 [endsect]
 
 
-[section:debug basic_socket_streambuf::debug]
+
+[section:linger basic_socket::linger]
 
 
 ['Inherited from socket_base.]
 
-Socket option to enable socket-level debugging.
+Socket option to specify whether the socket lingers on close if unsent data is present.
 
- typedef implementation_defined debug;
+ typedef implementation_defined linger;
 
 
 
-Implements the SOL\_SOCKET/SO\_DEBUG socket option.
+Implements the SOL\_SOCKET/SO\_LINGER socket option.
 
 
 [heading Examples]
@@ -13003,7 +14960,7 @@
 
    boost::asio::ip::tcp::socket socket(io_service);
    ...
- boost::asio::socket_base::debug option(true);
+ boost::asio::socket_base::linger option(true, 30);
    socket.set_option(option);
 
 
@@ -13013,9 +14970,10 @@
 
    boost::asio::ip::tcp::socket socket(io_service);
    ...
- boost::asio::socket_base::debug option;
+ boost::asio::socket_base::linger option;
    socket.get_option(option);
- bool is_set = option.value();
+ bool is_set = option.enabled();
+ unsigned short timeout = option.timeout();
 
 
 
@@ -13025,40 +14983,46 @@
 [endsect]
 
 
+[section:local_endpoint basic_socket::local_endpoint]
 
-[section:do_not_route basic_socket_streambuf::do_not_route]
+Get the local endpoint of the socket.
 
+ endpoint_type ``[link boost_asio.reference.basic_socket.local_endpoint.overload1 local_endpoint]``() const;
 
-['Inherited from socket_base.]
+ endpoint_type ``[link boost_asio.reference.basic_socket.local_endpoint.overload2 local_endpoint]``(
+ boost::system::error_code & ec) const;
 
-Socket option to prevent routing, use local interfaces only.
 
- typedef implementation_defined do_not_route;
+[section:overload1 basic_socket::local_endpoint (1 of 2 overloads)]
 
+Get the local endpoint of the socket.
 
+ endpoint_type local_endpoint() const;
 
-Implements the SOL\_SOCKET/SO\_DONTROUTE socket option.
 
+This function is used to obtain the locally bound endpoint of the socket.
 
-[heading Examples]
-
-Setting the option:
 
- boost::asio::ip::udp::socket socket(io_service);
- ...
- boost::asio::socket_base::do_not_route option(true);
- socket.set_option(option);
+[heading Return Value]
+
+An object that represents the local endpoint of the socket.
 
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
 
+]
 
-Getting the current option value:
+[heading Example]
+
 
- boost::asio::ip::udp::socket socket(io_service);
+
+ boost::asio::ip::tcp::socket socket(io_service);
    ...
- boost::asio::socket_base::do_not_route option;
- socket.get_option(option);
- bool is_set = option.value();
+ boost::asio::ip::tcp::endpoint endpoint = socket.local_endpoint();
 
 
 
@@ -13069,39 +15033,42 @@
 
 
 
-[section:enable_connection_aborted basic_socket_streambuf::enable_connection_aborted]
-
-
-['Inherited from socket_base.]
+[section:overload2 basic_socket::local_endpoint (2 of 2 overloads)]
 
-Socket option to report aborted connections on accept.
+Get the local endpoint of the socket.
 
- typedef implementation_defined enable_connection_aborted;
+ endpoint_type local_endpoint(
+ boost::system::error_code & ec) const;
 
 
+This function is used to obtain the locally bound endpoint of the socket.
 
-Implements a custom socket option that determines whether or not an accept operation is permitted to fail with boost::asio::error::connection\_aborted. By default the option is false.
 
+[heading Parameters]
+
 
-[heading Examples]
+[variablelist
   
-Setting the option:
-
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
- boost::asio::socket_base::enable_connection_aborted option(true);
- acceptor.set_option(option);
+[[ec][Set to indicate what error occurred, if any.]]
 
+]
 
+[heading Return Value]
+
+An object that represents the local endpoint of the socket. Returns a default-constructed endpoint object if an error occurred.
 
+[heading Example]
+
 
-Getting the current option value:
 
- boost::asio::ip::tcp::acceptor acceptor(io_service);
+ boost::asio::ip::tcp::socket socket(io_service);
    ...
- boost::asio::socket_base::enable_connection_aborted option;
- acceptor.get_option(option);
- bool is_set = option.value();
+ boost::system::error_code ec;
+ boost::asio::ip::tcp::endpoint endpoint = socket.local_endpoint(ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
 
 
 
@@ -13111,551 +15078,39 @@
 [endsect]
 
 
-
-[section:endpoint_type basic_socket_streambuf::endpoint_type]
-
-The endpoint type.
-
- typedef Protocol::endpoint endpoint_type;
-
-
-
-
 [endsect]
 
 
+[section:lowest_layer basic_socket::lowest_layer]
 
-[section:get_io_service basic_socket_streambuf::get_io_service]
-
-
-['Inherited from basic_io_object.]
-
-Get the io_service associated with the object.
+Get a reference to the lowest layer.
 
- boost::asio::io_service & get_io_service();
+ lowest_layer_type & lowest_layer();
 
 
-This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
+This function returns a reference to the lowest layer in a stack of layers. Since a basic_socket cannot contain any further layers, it simply returns a reference to itself.
 
 
 [heading Return Value]
       
-A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
+A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
 
 
 
 [endsect]
 
 
-[section:get_option basic_socket_streambuf::get_option]
 
-Get an option from the socket.
+[section:lowest_layer_type basic_socket::lowest_layer_type]
 
- void ``[link boost_asio.reference.basic_socket_streambuf.get_option.overload1 get_option]``(
- GettableSocketOption & option) const;
+A basic_socket is always the lowest layer.
 
- boost::system::error_code ``[link boost_asio.reference.basic_socket_streambuf.get_option.overload2 get_option]``(
- GettableSocketOption & option,
- boost::system::error_code & ec) const;
+ typedef basic_socket< Protocol, SocketService > lowest_layer_type;
 
 
-[section:overload1 basic_socket_streambuf::get_option (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-Get an option from the socket.
-
- void get_option(
- GettableSocketOption & option) const;
-
-
-This function is used to get the current value of an option on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The option value to be obtained from the socket.]]
-
-]
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[boost::system::system_error][Thrown on failure.]]
-
-]
-
-[heading Example]
-
-Getting the value of the SOL\_SOCKET/SO\_KEEPALIVE option:
-
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::ip::tcp::socket::keep_alive option;
- socket.get_option(option);
- bool is_set = option.get();
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::get_option (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-Get an option from the socket.
-
- boost::system::error_code get_option(
- GettableSocketOption & option,
- boost::system::error_code & ec) const;
-
-
-This function is used to get the current value of an option on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The option value to be obtained from the socket.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-[heading Example]
-
-Getting the value of the SOL\_SOCKET/SO\_KEEPALIVE option:
-
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::ip::tcp::socket::keep_alive option;
- boost::system::error_code ec;
- socket.get_option(option, ec);
- if (ec)
- {
- // An error occurred.
- }
- bool is_set = option.get();
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:implementation_type basic_socket_streambuf::implementation_type]
-
-
-['Inherited from basic_io_object.]
-
-The underlying implementation type of I/O object.
-
- typedef service_type::implementation_type implementation_type;
-
-
-
-
-[endsect]
-
-
-[section:io_control basic_socket_streambuf::io_control]
-
-Perform an IO control command on the socket.
-
- void ``[link boost_asio.reference.basic_socket_streambuf.io_control.overload1 io_control]``(
- IoControlCommand & command);
-
- boost::system::error_code ``[link boost_asio.reference.basic_socket_streambuf.io_control.overload2 io_control]``(
- IoControlCommand & command,
- boost::system::error_code & ec);
-
-
-[section:overload1 basic_socket_streambuf::io_control (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-Perform an IO control command on the socket.
-
- void io_control(
- IoControlCommand & command);
-
-
-This function is used to execute an IO control command on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[command][The IO control command to be performed on the socket.]]
-
-]
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[boost::system::system_error][Thrown on failure.]]
-
-]
-
-[heading Example]
-
-Getting the number of bytes ready to read:
-
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::ip::tcp::socket::bytes_readable command;
- socket.io_control(command);
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::io_control (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-Perform an IO control command on the socket.
-
- boost::system::error_code io_control(
- IoControlCommand & command,
- boost::system::error_code & ec);
-
-
-This function is used to execute an IO control command on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[command][The IO control command to be performed on the socket.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-[heading Example]
-
-Getting the number of bytes ready to read:
-
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::ip::tcp::socket::bytes_readable command;
- boost::system::error_code ec;
- socket.io_control(command, ec);
- if (ec)
- {
- // An error occurred.
- }
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:io_service basic_socket_streambuf::io_service]
-
-
-['Inherited from basic_io_object.]
-
-(Deprecated: use get_io_service().) Get the io_service associated with the object.
-
- boost::asio::io_service & io_service();
-
-
-This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-[endsect]
-
-
-
-[section:is_open basic_socket_streambuf::is_open]
-
-
-['Inherited from basic_socket.]
-
-Determine whether the socket is open.
-
- bool is_open() const;
-
-
-
-[endsect]
-
-
-
-[section:keep_alive basic_socket_streambuf::keep_alive]
-
-
-['Inherited from socket_base.]
-
-Socket option to send keep-alives.
-
- typedef implementation_defined keep_alive;
-
-
-
-Implements the SOL\_SOCKET/SO\_KEEPALIVE socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::keep_alive option(true);
- socket.set_option(option);
-
-
-
-
-Getting the current option value:
-
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::keep_alive option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:linger basic_socket_streambuf::linger]
-
-
-['Inherited from socket_base.]
-
-Socket option to specify whether the socket lingers on close if unsent data is present.
-
- typedef implementation_defined linger;
-
-
-
-Implements the SOL\_SOCKET/SO\_LINGER socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::linger option(true, 30);
- socket.set_option(option);
-
-
-
-
-Getting the current option value:
-
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::linger option;
- socket.get_option(option);
- bool is_set = option.enabled();
- unsigned short timeout = option.timeout();
-
-
-
-
-
-
-[endsect]
-
-
-[section:local_endpoint basic_socket_streambuf::local_endpoint]
-
-Get the local endpoint of the socket.
-
- endpoint_type ``[link boost_asio.reference.basic_socket_streambuf.local_endpoint.overload1 local_endpoint]``() const;
-
- endpoint_type ``[link boost_asio.reference.basic_socket_streambuf.local_endpoint.overload2 local_endpoint]``(
- boost::system::error_code & ec) const;
-
-
-[section:overload1 basic_socket_streambuf::local_endpoint (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-Get the local endpoint of the socket.
-
- endpoint_type local_endpoint() const;
-
-
-This function is used to obtain the locally bound endpoint of the socket.
-
-
-[heading Return Value]
-
-An object that represents the local endpoint of the socket.
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[boost::system::system_error][Thrown on failure.]]
-
-]
-
-[heading Example]
-
-
-
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::ip::tcp::endpoint endpoint = socket.local_endpoint();
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::local_endpoint (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-Get the local endpoint of the socket.
-
- endpoint_type local_endpoint(
- boost::system::error_code & ec) const;
-
-
-This function is used to obtain the locally bound endpoint of the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-[heading Return Value]
-
-An object that represents the local endpoint of the socket. Returns a default-constructed endpoint object if an error occurred.
-
-[heading Example]
-
-
-
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::system::error_code ec;
- boost::asio::ip::tcp::endpoint endpoint = socket.local_endpoint(ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:lowest_layer basic_socket_streambuf::lowest_layer]
-
-
-['Inherited from basic_socket.]
-
-Get a reference to the lowest layer.
-
- lowest_layer_type & lowest_layer();
-
-
-This function returns a reference to the lowest layer in a stack of layers. Since a basic_socket cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-[endsect]
-
-
-
-[section:lowest_layer_type basic_socket_streambuf::lowest_layer_type]
-
-
-['Inherited from basic_socket.]
-
-A basic_socket is always the lowest layer.
-
- typedef basic_socket< Protocol, StreamSocketService > lowest_layer_type;
-
-
-[heading Types]
-[table
- [[Name][Description]]
+[heading Types]
+[table
+ [[Name][Description]]
 
   [
 
@@ -13917,6 +15372,17 @@
   
 ]
 
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_socket._basic_socket [*~basic_socket]]]
+ [Protected destructor to prevent deletion through this type. ]
+ ]
+
+]
+
 [heading Data Members]
 [table
   [[Name][Description]]
@@ -13943,12 +15409,28 @@
 
 ]
 
-The basic_socket class template provides functionality that is common to both stream-oriented and datagram-oriented sockets.
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.basic_socket.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
 
-[heading Thread Safety]
-
-[*Distinct] [*objects:] Safe.
+ [
+ [[link boost_asio.reference.basic_socket.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
+
+]
+
+The basic_socket class template provides functionality that is common to both stream-oriented and datagram-oriented sockets.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
 [*Shared] [*objects:] Unsafe.
 
@@ -13959,7 +15441,7 @@
 
 
 
-[section:max_connections basic_socket_streambuf::max_connections]
+[section:max_connections basic_socket::max_connections]
 
 
 ['Inherited from socket_base.]
@@ -13974,7 +15456,7 @@
 
 
 
-[section:message_do_not_route basic_socket_streambuf::message_do_not_route]
+[section:message_do_not_route basic_socket::message_do_not_route]
 
 
 ['Inherited from socket_base.]
@@ -13989,7 +15471,7 @@
 
 
 
-[section:message_flags basic_socket_streambuf::message_flags]
+[section:message_flags basic_socket::message_flags]
 
 
 ['Inherited from socket_base.]
@@ -14005,7 +15487,7 @@
 
 
 
-[section:message_out_of_band basic_socket_streambuf::message_out_of_band]
+[section:message_out_of_band basic_socket::message_out_of_band]
 
 
 ['Inherited from socket_base.]
@@ -14020,7 +15502,7 @@
 
 
 
-[section:message_peek basic_socket_streambuf::message_peek]
+[section:message_peek basic_socket::message_peek]
 
 
 ['Inherited from socket_base.]
@@ -14035,10 +15517,7 @@
 
 
 
-[section:native basic_socket_streambuf::native]
-
-
-['Inherited from basic_socket.]
+[section:native basic_socket::native]
 
 Get the native socket representation.
 
@@ -14052,14 +15531,11 @@
 
 
 
-[section:native_type basic_socket_streambuf::native_type]
-
-
-['Inherited from basic_socket.]
+[section:native_type basic_socket::native_type]
 
 The native representation of a socket.
 
- typedef StreamSocketService::native_type native_type;
+ typedef SocketService::native_type native_type;
 
 
 
@@ -14068,7 +15544,7 @@
 
 
 
-[section:non_blocking_io basic_socket_streambuf::non_blocking_io]
+[section:non_blocking_io basic_socket::non_blocking_io]
 
 
 ['Inherited from socket_base.]
@@ -14099,22 +15575,19 @@
 [endsect]
 
 
-[section:open basic_socket_streambuf::open]
+[section:open basic_socket::open]
 
 Open the socket using the specified protocol.
 
- void ``[link boost_asio.reference.basic_socket_streambuf.open.overload1 open]``(
+ void ``[link boost_asio.reference.basic_socket.open.overload1 open]``(
       const protocol_type & protocol = protocol_type());
 
- boost::system::error_code ``[link boost_asio.reference.basic_socket_streambuf.open.overload2 open]``(
+ boost::system::error_code ``[link boost_asio.reference.basic_socket.open.overload2 open]``(
       const protocol_type & protocol,
       boost::system::error_code & ec);
 
 
-[section:overload1 basic_socket_streambuf::open (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
+[section:overload1 basic_socket::open (1 of 2 overloads)]
 
 Open the socket using the specified protocol.
 
@@ -14159,10 +15632,7 @@
 
 
 
-[section:overload2 basic_socket_streambuf::open (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
+[section:overload2 basic_socket::open (2 of 2 overloads)]
 
 Open the socket using the specified protocol.
 
@@ -14208,10 +15678,7 @@
 [endsect]
 
 
-[section:protocol_type basic_socket_streambuf::protocol_type]
-
-
-['Inherited from basic_socket.]
+[section:protocol_type basic_socket::protocol_type]
 
 The protocol type.
 
@@ -14224,7 +15691,7 @@
 
 
 
-[section:receive_buffer_size basic_socket_streambuf::receive_buffer_size]
+[section:receive_buffer_size basic_socket::receive_buffer_size]
 
 
 ['Inherited from socket_base.]
@@ -14267,7 +15734,7 @@
 
 
 
-[section:receive_low_watermark basic_socket_streambuf::receive_low_watermark]
+[section:receive_low_watermark basic_socket::receive_low_watermark]
 
 
 ['Inherited from socket_base.]
@@ -14309,20 +15776,17 @@
 [endsect]
 
 
-[section:remote_endpoint basic_socket_streambuf::remote_endpoint]
+[section:remote_endpoint basic_socket::remote_endpoint]
 
 Get the remote endpoint of the socket.
 
- endpoint_type ``[link boost_asio.reference.basic_socket_streambuf.remote_endpoint.overload1 remote_endpoint]``() const;
+ endpoint_type ``[link boost_asio.reference.basic_socket.remote_endpoint.overload1 remote_endpoint]``() const;
 
- endpoint_type ``[link boost_asio.reference.basic_socket_streambuf.remote_endpoint.overload2 remote_endpoint]``(
+ endpoint_type ``[link boost_asio.reference.basic_socket.remote_endpoint.overload2 remote_endpoint]``(
       boost::system::error_code & ec) const;
 
 
-[section:overload1 basic_socket_streambuf::remote_endpoint (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
+[section:overload1 basic_socket::remote_endpoint (1 of 2 overloads)]
 
 Get the remote endpoint of the socket.
 
@@ -14362,10 +15826,7 @@
 
 
 
-[section:overload2 basic_socket_streambuf::remote_endpoint (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
+[section:overload2 basic_socket::remote_endpoint (2 of 2 overloads)]
 
 Get the remote endpoint of the socket.
 
@@ -14413,7 +15874,7 @@
 [endsect]
 
 
-[section:reuse_address basic_socket_streambuf::reuse_address]
+[section:reuse_address basic_socket::reuse_address]
 
 
 ['Inherited from socket_base.]
@@ -14456,7 +15917,7 @@
 
 
 
-[section:send_buffer_size basic_socket_streambuf::send_buffer_size]
+[section:send_buffer_size basic_socket::send_buffer_size]
 
 
 ['Inherited from socket_base.]
@@ -14499,7 +15960,7 @@
 
 
 
-[section:send_low_watermark basic_socket_streambuf::send_low_watermark]
+[section:send_low_watermark basic_socket::send_low_watermark]
 
 
 ['Inherited from socket_base.]
@@ -14542,14 +16003,29 @@
 
 
 
-[section:service_type basic_socket_streambuf::service_type]
+[section:service basic_socket::service]
+
+
+['Inherited from basic_io_object.]
+
+The service associated with the I/O object.
+
+ service_type & service;
+
+
+
+[endsect]
+
+
+
+[section:service_type basic_socket::service_type]
 
 
 ['Inherited from basic_io_object.]
 
 The type of the service that will be used to provide I/O operations.
 
- typedef StreamSocketService service_type;
+ typedef SocketService service_type;
 
 
 
@@ -14557,25 +16033,28 @@
 [endsect]
 
 
-[section:set_option basic_socket_streambuf::set_option]
+[section:set_option basic_socket::set_option]
 
 Set an option on the socket.
 
- void ``[link boost_asio.reference.basic_socket_streambuf.set_option.overload1 set_option]``(
+ template<
+ typename ``[link boost_asio.reference.SettableSocketOption SettableSocketOption]``>
+ void ``[link boost_asio.reference.basic_socket.set_option.overload1 set_option]``(
       const SettableSocketOption & option);
 
- boost::system::error_code ``[link boost_asio.reference.basic_socket_streambuf.set_option.overload2 set_option]``(
+ template<
+ typename ``[link boost_asio.reference.SettableSocketOption SettableSocketOption]``>
+ boost::system::error_code ``[link boost_asio.reference.basic_socket.set_option.overload2 set_option]``(
       const SettableSocketOption & option,
       boost::system::error_code & ec);
 
 
-[section:overload1 basic_socket_streambuf::set_option (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
+[section:overload1 basic_socket::set_option (1 of 2 overloads)]
 
 Set an option on the socket.
 
+ template<
+ typename ``[link boost_asio.reference.SettableSocketOption SettableSocketOption]``>
   void set_option(
       const SettableSocketOption & option);
 
@@ -14619,13 +16098,12 @@
 
 
 
-[section:overload2 basic_socket_streambuf::set_option (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
+[section:overload2 basic_socket::set_option (2 of 2 overloads)]
 
 Set an option on the socket.
 
+ template<
+ typename ``[link boost_asio.reference.SettableSocketOption SettableSocketOption]``>
   boost::system::error_code set_option(
       const SettableSocketOption & option,
       boost::system::error_code & ec);
@@ -14669,22 +16147,19 @@
 
 [endsect]
 
-[section:shutdown basic_socket_streambuf::shutdown]
+[section:shutdown basic_socket::shutdown]
 
 Disable sends or receives on the socket.
 
- void ``[link boost_asio.reference.basic_socket_streambuf.shutdown.overload1 shutdown]``(
+ void ``[link boost_asio.reference.basic_socket.shutdown.overload1 shutdown]``(
       shutdown_type what);
 
- boost::system::error_code ``[link boost_asio.reference.basic_socket_streambuf.shutdown.overload2 shutdown]``(
+ boost::system::error_code ``[link boost_asio.reference.basic_socket.shutdown.overload2 shutdown]``(
       shutdown_type what,
       boost::system::error_code & ec);
 
 
-[section:overload1 basic_socket_streambuf::shutdown (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
+[section:overload1 basic_socket::shutdown (1 of 2 overloads)]
 
 Disable sends or receives on the socket.
 
@@ -14730,10 +16205,7 @@
 
 
 
-[section:overload2 basic_socket_streambuf::shutdown (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
+[section:overload2 basic_socket::shutdown (2 of 2 overloads)]
 
 Disable sends or receives on the socket.
 
@@ -14780,7 +16252,7 @@
 [endsect]
 
 
-[section:shutdown_type basic_socket_streambuf::shutdown_type]
+[section:shutdown_type basic_socket::shutdown_type]
 
 
 ['Inherited from socket_base.]
@@ -14815,11 +16287,11 @@
 
 
 
-[section:_basic_socket_streambuf basic_socket_streambuf::~basic_socket_streambuf]
+[section:_basic_socket basic_socket::~basic_socket]
 
-Destructor flushes buffered data.
+Protected destructor to prevent deletion through this type.
 
- virtual ~basic_socket_streambuf();
+ ~basic_socket();
 
 
 
@@ -14829,15 +16301,16 @@
 
 [endsect]
 
-[section:basic_stream_socket basic_stream_socket]
+[section:basic_socket_acceptor basic_socket_acceptor]
 
-Provides stream-oriented socket functionality.
+Provides the ability to accept new connections.
 
   template<
       typename ``[link boost_asio.reference.Protocol Protocol]``,
- typename ``[link boost_asio.reference.StreamSocketService StreamSocketService]`` = stream_socket_service<Protocol>>
- class basic_stream_socket :
- public basic_socket< Protocol, StreamSocketService >
+ typename ``[link boost_asio.reference.SocketAcceptorService SocketAcceptorService]`` = socket_acceptor_service<Protocol>>
+ class basic_socket_acceptor :
+ public basic_io_object< SocketAcceptorService >,
+ public socket_base
 
 
 [heading Types]
@@ -14846,147 +16319,140 @@
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.broadcast [*broadcast]]]
+ [[link boost_asio.reference.basic_socket_acceptor.broadcast [*broadcast]]]
     [Socket option to permit sending of broadcast messages. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.bytes_readable [*bytes_readable]]]
+ [[link boost_asio.reference.basic_socket_acceptor.bytes_readable [*bytes_readable]]]
     [IO control command to get the amount of data that can be read without blocking. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.debug [*debug]]]
+ [[link boost_asio.reference.basic_socket_acceptor.debug [*debug]]]
     [Socket option to enable socket-level debugging. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.do_not_route [*do_not_route]]]
+ [[link boost_asio.reference.basic_socket_acceptor.do_not_route [*do_not_route]]]
     [Socket option to prevent routing, use local interfaces only. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.enable_connection_aborted [*enable_connection_aborted]]]
+ [[link boost_asio.reference.basic_socket_acceptor.enable_connection_aborted [*enable_connection_aborted]]]
     [Socket option to report aborted connections on accept. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.endpoint_type [*endpoint_type]]]
+ [[link boost_asio.reference.basic_socket_acceptor.endpoint_type [*endpoint_type]]]
     [The endpoint type. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.implementation_type [*implementation_type]]]
+ [[link boost_asio.reference.basic_socket_acceptor.implementation_type [*implementation_type]]]
     [The underlying implementation type of I/O object. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.keep_alive [*keep_alive]]]
+ [[link boost_asio.reference.basic_socket_acceptor.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.linger [*linger]]]
+ [[link boost_asio.reference.basic_socket_acceptor.linger [*linger]]]
     [Socket option to specify whether the socket lingers on close if unsent data is present. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
-
- ]
-
- [
-
- [[link boost_asio.reference.basic_stream_socket.message_flags [*message_flags]]]
+ [[link boost_asio.reference.basic_socket_acceptor.message_flags [*message_flags]]]
     [Bitmask type for flags that can be passed to send and receive operations. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.native_type [*native_type]]]
- [The native representation of a socket. ]
+ [[link boost_asio.reference.basic_socket_acceptor.native_type [*native_type]]]
+ [The native representation of an acceptor. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.non_blocking_io [*non_blocking_io]]]
+ [[link boost_asio.reference.basic_socket_acceptor.non_blocking_io [*non_blocking_io]]]
     [IO control command to set the blocking mode of the socket. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.protocol_type [*protocol_type]]]
+ [[link boost_asio.reference.basic_socket_acceptor.protocol_type [*protocol_type]]]
     [The protocol type. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.receive_buffer_size [*receive_buffer_size]]]
+ [[link boost_asio.reference.basic_socket_acceptor.receive_buffer_size [*receive_buffer_size]]]
     [Socket option for the receive buffer size of a socket. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.receive_low_watermark [*receive_low_watermark]]]
+ [[link boost_asio.reference.basic_socket_acceptor.receive_low_watermark [*receive_low_watermark]]]
     [Socket option for the receive low watermark. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.reuse_address [*reuse_address]]]
+ [[link boost_asio.reference.basic_socket_acceptor.reuse_address [*reuse_address]]]
     [Socket option to allow the socket to be bound to an address that is already in use. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.send_buffer_size [*send_buffer_size]]]
+ [[link boost_asio.reference.basic_socket_acceptor.send_buffer_size [*send_buffer_size]]]
     [Socket option for the send buffer size of a socket. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.send_low_watermark [*send_low_watermark]]]
+ [[link boost_asio.reference.basic_socket_acceptor.send_low_watermark [*send_low_watermark]]]
     [Socket option for the send low watermark. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.service_type [*service_type]]]
+ [[link boost_asio.reference.basic_socket_acceptor.service_type [*service_type]]]
     [The type of the service that will be used to provide I/O operations. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.shutdown_type [*shutdown_type]]]
+ [[link boost_asio.reference.basic_socket_acceptor.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
   ]
@@ -14998,148 +16464,83 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.basic_stream_socket.assign [*assign]]]
- [Assign an existing native socket to the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_stream_socket.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
- ]
-
- [
- [[link boost_asio.reference.basic_stream_socket.async_read_some [*async_read_some]]]
- [Start an asynchronous read. ]
- ]
-
- [
- [[link boost_asio.reference.basic_stream_socket.async_receive [*async_receive]]]
- [Start an asynchronous receive. ]
- ]
-
- [
- [[link boost_asio.reference.basic_stream_socket.async_send [*async_send]]]
- [Start an asynchronous send. ]
- ]
-
- [
- [[link boost_asio.reference.basic_stream_socket.async_write_some [*async_write_some]]]
- [Start an asynchronous write. ]
- ]
-
- [
- [[link boost_asio.reference.basic_stream_socket.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
+ [[link boost_asio.reference.basic_socket_acceptor.accept [*accept]]]
+ [Accept a new connection. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.available [*available]]]
- [Determine the number of bytes available for reading. ]
+ [[link boost_asio.reference.basic_socket_acceptor.assign [*assign]]]
+ [Assigns an existing native acceptor to the acceptor. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.basic_stream_socket [*basic_stream_socket]]]
- [Construct a basic_stream_socket without opening it. ]
+ [[link boost_asio.reference.basic_socket_acceptor.async_accept [*async_accept]]]
+ [Start an asynchronous accept. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.bind [*bind]]]
- [Bind the socket to the given local endpoint. ]
+ [[link boost_asio.reference.basic_socket_acceptor.basic_socket_acceptor [*basic_socket_acceptor]]]
+ [Construct an acceptor without opening it. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
+ [[link boost_asio.reference.basic_socket_acceptor.bind [*bind]]]
+ [Bind the acceptor to the given local endpoint. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.close [*close]]]
- [Close the socket. ]
+ [[link boost_asio.reference.basic_socket_acceptor.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the acceptor. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.connect [*connect]]]
- [Connect the socket to the specified endpoint. ]
+ [[link boost_asio.reference.basic_socket_acceptor.close [*close]]]
+ [Close the acceptor. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.get_io_service [*get_io_service]]]
+ [[link boost_asio.reference.basic_socket_acceptor.get_io_service [*get_io_service]]]
     [Get the io_service associated with the object. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.get_option [*get_option]]]
- [Get an option from the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_stream_socket.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
+ [[link boost_asio.reference.basic_socket_acceptor.get_option [*get_option]]]
+ [Get an option from the acceptor. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.io_service [*io_service]]]
+ [[link boost_asio.reference.basic_socket_acceptor.io_service [*io_service]]]
     [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.is_open [*is_open]]]
- [Determine whether the socket is open. ]
- ]
-
- [
- [[link boost_asio.reference.basic_stream_socket.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_stream_socket.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer. ]
- ]
-
- [
- [[link boost_asio.reference.basic_stream_socket.native [*native]]]
- [Get the native socket representation. ]
- ]
-
- [
- [[link boost_asio.reference.basic_stream_socket.open [*open]]]
- [Open the socket using the specified protocol. ]
- ]
-
- [
- [[link boost_asio.reference.basic_stream_socket.read_some [*read_some]]]
- [Read some data from the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_stream_socket.receive [*receive]]]
- [Receive some data on the socket. ]
+ [[link boost_asio.reference.basic_socket_acceptor.is_open [*is_open]]]
+ [Determine whether the acceptor is open. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint of the socket. ]
+ [[link boost_asio.reference.basic_socket_acceptor.listen [*listen]]]
+ [Place the acceptor into the state where it will listen for new connections. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.send [*send]]]
- [Send some data on the socket. ]
+ [[link boost_asio.reference.basic_socket_acceptor.local_endpoint [*local_endpoint]]]
+ [Get the local endpoint of the acceptor. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.set_option [*set_option]]]
- [Set an option on the socket. ]
+ [[link boost_asio.reference.basic_socket_acceptor.native [*native]]]
+ [Get the native acceptor representation. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
+ [[link boost_asio.reference.basic_socket_acceptor.open [*open]]]
+ [Open the acceptor using the specified protocol. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.write_some [*write_some]]]
- [Write some data to the socket. ]
+ [[link boost_asio.reference.basic_socket_acceptor.set_option [*set_option]]]
+ [Set an option on the acceptor. ]
   ]
   
 ]
@@ -15149,28 +16550,44 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.basic_stream_socket.max_connections [*max_connections]]]
+ [[link boost_asio.reference.basic_socket_acceptor.max_connections [*max_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
   [
- [[link boost_asio.reference.basic_stream_socket.message_do_not_route [*message_do_not_route]]]
+ [[link boost_asio.reference.basic_socket_acceptor.message_do_not_route [*message_do_not_route]]]
     [Specify that the data should not be subject to routing. ]
   ]
 
   [
- [[link boost_asio.reference.basic_stream_socket.message_out_of_band [*message_out_of_band]]]
+ [[link boost_asio.reference.basic_socket_acceptor.message_out_of_band [*message_out_of_band]]]
     [Process out-of-band data. ]
   ]
 
   [
- [[link boost_asio.reference.basic_stream_socket.message_peek [*message_peek]]]
+ [[link boost_asio.reference.basic_socket_acceptor.message_peek [*message_peek]]]
     [Peek at incoming data without removing it from the input queue. ]
   ]
 
 ]
 
-The basic_stream_socket class template provides asynchronous and blocking stream-oriented socket functionality.
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
+
+]
+
+The basic_socket_acceptor class template is used for accepting new socket connections.
 
 
 [heading Thread Safety]
@@ -15179,73 +16596,111 @@
 
 [*Shared] [*objects:] Unsafe.
 
+[heading Example]
+
+Opening a socket acceptor with the SO\_REUSEADDR option enabled:
+
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::tcp::v4(), port);
+ acceptor.open(endpoint.protocol());
+ acceptor.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true));
+ acceptor.bind(endpoint);
+ acceptor.listen();
 
-[section:assign basic_stream_socket::assign]
 
-Assign an existing native socket to the socket.
 
- void ``[link boost_asio.reference.basic_stream_socket.assign.overload1 assign]``(
- const protocol_type & protocol,
- const native_type & native_socket);
 
- boost::system::error_code ``[link boost_asio.reference.basic_stream_socket.assign.overload2 assign]``(
- const protocol_type & protocol,
- const native_type & native_socket,
+
+[section:accept basic_socket_acceptor::accept]
+
+Accept a new connection.
+
+ template<
+ typename ``[link boost_asio.reference.SocketService SocketService]``>
+ void ``[link boost_asio.reference.basic_socket_acceptor.accept.overload1 accept]``(
+ basic_socket< protocol_type, SocketService > & peer);
+
+ template<
+ typename ``[link boost_asio.reference.SocketService SocketService]``>
+ boost::system::error_code ``[link boost_asio.reference.basic_socket_acceptor.accept.overload2 accept]``(
+ basic_socket< protocol_type, SocketService > & peer,
       boost::system::error_code & ec);
 
+ template<
+ typename ``[link boost_asio.reference.SocketService SocketService]``>
+ void ``[link boost_asio.reference.basic_socket_acceptor.accept.overload3 accept]``(
+ basic_socket< protocol_type, SocketService > & peer,
+ endpoint_type & peer_endpoint);
+
+ template<
+ typename ``[link boost_asio.reference.SocketService SocketService]``>
+ boost::system::error_code ``[link boost_asio.reference.basic_socket_acceptor.accept.overload4 accept]``(
+ basic_socket< protocol_type, SocketService > & peer,
+ endpoint_type & peer_endpoint,
+ boost::system::error_code & ec);
 
-[section:overload1 basic_stream_socket::assign (1 of 2 overloads)]
 
+[section:overload1 basic_socket_acceptor::accept (1 of 4 overloads)]
 
-['Inherited from basic_socket.]
+Accept a new connection.
 
-Assign an existing native socket to the socket.
+ template<
+ typename ``[link boost_asio.reference.SocketService SocketService]``>
+ void accept(
+ basic_socket< protocol_type, SocketService > & peer);
 
- void assign(
- const protocol_type & protocol,
- const native_type & native_socket);
 
+This function is used to accept a new connection from a peer into the given socket. The function call will block until a new connection has been accepted successfully or an error occurs.
 
 
-[endsect]
+[heading Parameters]
+
 
+[variablelist
+
+[[peer][The socket into which the new connection will be accepted.]]
 
+]
 
-[section:overload2 basic_stream_socket::assign (2 of 2 overloads)]
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
 
-['Inherited from basic_socket.]
+]
 
-Assign an existing native socket to the socket.
+[heading Example]
+
 
- boost::system::error_code assign(
- const protocol_type & protocol,
- const native_type & native_socket,
- boost::system::error_code & ec);
 
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
+ boost::asio::ip::tcp::socket socket(io_service);
+ acceptor.accept(socket);
 
 
-[endsect]
 
 
-[endsect]
 
 
-[section:async_connect basic_stream_socket::async_connect]
+[endsect]
 
 
-['Inherited from basic_socket.]
 
-Start an asynchronous connect.
+[section:overload2 basic_socket_acceptor::accept (2 of 4 overloads)]
 
- void async_connect(
- const endpoint_type & peer_endpoint,
- ConnectHandler handler);
+Accept a new connection.
 
+ template<
+ typename ``[link boost_asio.reference.SocketService SocketService]``>
+ boost::system::error_code accept(
+ basic_socket< protocol_type, SocketService > & peer,
+ boost::system::error_code & ec);
 
-This function is used to asynchronously connect a socket to the specified remote endpoint. The function call always returns immediately.
 
-The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is returned to the closed state.
+This function is used to accept a new connection from a peer into the given socket. The function call will block until a new connection has been accepted successfully or an error occurs.
 
 
 [heading Parameters]
@@ -15253,16 +16708,9 @@
 
 [variablelist
   
-[[peer_endpoint][The remote endpoint to which the socket will be connected. Copies will be made of the endpoint object as required.]]
-
-[[handler][The handler to be called when the connection operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const boost::system::error_code& error // Result of operation
- );
+[[peer][The socket into which the new connection will be accepted.]]
 
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
+[[ec][Set to indicate what error occurred, if any.]]
 
 ]
 
@@ -15270,21 +16718,16 @@
   
 
 
- void connect_handler(const boost::system::error_code& error)
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
+ boost::asio::ip::tcp::soocket socket(io_service);
+ boost::system::error_code ec;
+ acceptor.accept(socket, ec);
+ if (ec)
    {
- if (!error)
- {
- // Connect succeeded.
- }
+ // An error occurred.
    }
 
- ...
-
- boost::asio::ip::tcp::socket socket(io_service);
- boost::asio::ip::tcp::endpoint endpoint(
- boost::asio::ip::address::from_string("1.2.3.4"), 12345);
- socket.async_connect(endpoint, connect_handler);
-
 
 
 
@@ -15294,19 +16737,18 @@
 
 
 
-[section:async_read_some basic_stream_socket::async_read_some]
+[section:overload3 basic_socket_acceptor::accept (3 of 4 overloads)]
 
-Start an asynchronous read.
+Accept a new connection and obtain the endpoint of the peer.
 
   template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
- void async_read_some(
- const MutableBufferSequence & buffers,
- ReadHandler handler);
+ typename ``[link boost_asio.reference.SocketService SocketService]``>
+ void accept(
+ basic_socket< protocol_type, SocketService > & peer,
+ endpoint_type & peer_endpoint);
 
 
-This function is used to asynchronously read data from the stream socket. The function call always returns immediately.
+This function is used to accept a new connection from a peer into the given socket, and additionally provide the endpoint of the remote peer. The function call will block until a new connection has been accepted successfully or an error occurs.
 
 
 [heading Parameters]
@@ -15314,74 +16756,53 @@
 
 [variablelist
   
-[[buffers][One or more buffers into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const boost::system::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes read.
- );
+[[peer][The socket into which the new connection will be accepted.]]
 
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
+[[peer_endpoint][An endpoint object which will receive the endpoint of the remote peer.]]
 
 ]
 
-[heading Remarks]
-
-The read operation may not read all of the requested number of bytes. Consider using the
-[link boost_asio.reference.async_read async_read] function if you need to ensure that the requested amount of data is read before the asynchronous operation completes.
+[heading Exceptions]
+
 
-[heading Example]
+[variablelist
   
-To read into a single data buffer use the
-[link boost_asio.reference.buffer buffer] function as follows:
+[[boost::system::system_error][Thrown on failure.]]
 
- socket.async_read_some(boost::asio::buffer(data, size), handler);
+]
 
+[heading Example]
+
 
-See the
-[link boost_asio.reference.buffer buffer] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
+ boost::asio::ip::tcp::socket socket(io_service);
+ boost::asio::ip::tcp::endpoint endpoint;
+ acceptor.accept(socket, endpoint);
 
 
-[endsect]
 
 
-[section:async_receive basic_stream_socket::async_receive]
 
-Start an asynchronous receive.
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
- void ``[link boost_asio.reference.basic_stream_socket.async_receive.overload1 async_receive]``(
- const MutableBufferSequence & buffers,
- ReadHandler handler);
+[endsect]
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
- void ``[link boost_asio.reference.basic_stream_socket.async_receive.overload2 async_receive]``(
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags,
- ReadHandler handler);
 
 
-[section:overload1 basic_stream_socket::async_receive (1 of 2 overloads)]
+[section:overload4 basic_socket_acceptor::accept (4 of 4 overloads)]
 
-Start an asynchronous receive.
+Accept a new connection and obtain the endpoint of the peer.
 
   template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
- void async_receive(
- const MutableBufferSequence & buffers,
- ReadHandler handler);
+ typename ``[link boost_asio.reference.SocketService SocketService]``>
+ boost::system::error_code accept(
+ basic_socket< protocol_type, SocketService > & peer,
+ endpoint_type & peer_endpoint,
+ boost::system::error_code & ec);
 
 
-This function is used to asynchronously receive data from the stream socket. The function call always returns immediately.
+This function is used to accept a new connection from a peer into the given socket, and additionally provide the endpoint of the remote peer. The function call will block until a new connection has been accepted successfully or an error occurs.
 
 
 [heading Parameters]
@@ -15389,94 +16810,75 @@
 
 [variablelist
   
-[[buffers][One or more buffers into which the data will be received. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+[[peer][The socket into which the new connection will be accepted.]]
 
-[[handler][The handler to be called when the receive operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const boost::system::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes received.
- );
+[[peer_endpoint][An endpoint object which will receive the endpoint of the remote peer.]]
 
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
+[[ec][Set to indicate what error occurred, if any.]]
 
 ]
 
-[heading Remarks]
-
-The receive operation may not receive all of the requested number of bytes. Consider using the
-[link boost_asio.reference.async_read async_read] function if you need to ensure that the requested amount of data is received before the asynchronous operation completes.
-
 [heading Example]
   
-To receive into a single data buffer use the
-[link boost_asio.reference.buffer buffer] function as follows:
 
- socket.async_receive(boost::asio::buffer(data, size), handler);
 
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
+ boost::asio::ip::tcp::socket socket(io_service);
+ boost::asio::ip::tcp::endpoint endpoint;
+ boost::system::error_code ec;
+ acceptor.accept(socket, endpoint, ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
 
-See the
-[link boost_asio.reference.buffer buffer] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
 
 
-[endsect]
 
 
+[endsect]
 
-[section:overload2 basic_stream_socket::async_receive (2 of 2 overloads)]
 
-Start an asynchronous receive.
+[endsect]
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
- void async_receive(
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags,
- ReadHandler handler);
+[section:assign basic_socket_acceptor::assign]
 
+Assigns an existing native acceptor to the acceptor.
 
-This function is used to asynchronously receive data from the stream socket. The function call always returns immediately.
+ void ``[link boost_asio.reference.basic_socket_acceptor.assign.overload1 assign]``(
+ const protocol_type & protocol,
+ const native_type & native_acceptor);
 
+ boost::system::error_code ``[link boost_asio.reference.basic_socket_acceptor.assign.overload2 assign]``(
+ const protocol_type & protocol,
+ const native_type & native_acceptor,
+ boost::system::error_code & ec);
 
-[heading Parameters]
-
 
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+[section:overload1 basic_socket_acceptor::assign (1 of 2 overloads)]
 
-[[flags][Flags specifying how the receive call is to be made.]]
+Assigns an existing native acceptor to the acceptor.
 
-[[handler][The handler to be called when the receive operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const boost::system::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes received.
- );
+ void assign(
+ const protocol_type & protocol,
+ const native_type & native_acceptor);
 
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
 
-]
 
-[heading Remarks]
-
-The receive operation may not receive all of the requested number of bytes. Consider using the
-[link boost_asio.reference.async_read async_read] function if you need to ensure that the requested amount of data is received before the asynchronous operation completes.
+[endsect]
 
-[heading Example]
-
-To receive into a single data buffer use the
-[link boost_asio.reference.buffer buffer] function as follows:
 
- socket.async_receive(boost::asio::buffer(data, size), 0, handler);
 
+[section:overload2 basic_socket_acceptor::assign (2 of 2 overloads)]
+
+Assigns an existing native acceptor to the acceptor.
 
-See the
-[link boost_asio.reference.buffer buffer] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+ boost::system::error_code assign(
+ const protocol_type & protocol,
+ const native_type & native_acceptor,
+ boost::system::error_code & ec);
 
 
 
@@ -15485,39 +16887,39 @@
 
 [endsect]
 
-[section:async_send basic_stream_socket::async_send]
+[section:async_accept basic_socket_acceptor::async_accept]
 
-Start an asynchronous send.
+Start an asynchronous accept.
 
   template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
- void ``[link boost_asio.reference.basic_stream_socket.async_send.overload1 async_send]``(
- const ConstBufferSequence & buffers,
- WriteHandler handler);
+ typename ``[link boost_asio.reference.SocketService SocketService]``,
+ typename ``[link boost_asio.reference.AcceptHandler AcceptHandler]``>
+ void ``[link boost_asio.reference.basic_socket_acceptor.async_accept.overload1 async_accept]``(
+ basic_socket< protocol_type, SocketService > & peer,
+ AcceptHandler handler);
 
   template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
- void ``[link boost_asio.reference.basic_stream_socket.async_send.overload2 async_send]``(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags,
- WriteHandler handler);
+ typename ``[link boost_asio.reference.SocketService SocketService]``,
+ typename ``[link boost_asio.reference.AcceptHandler AcceptHandler]``>
+ void ``[link boost_asio.reference.basic_socket_acceptor.async_accept.overload2 async_accept]``(
+ basic_socket< protocol_type, SocketService > & peer,
+ endpoint_type & peer_endpoint,
+ AcceptHandler handler);
 
 
-[section:overload1 basic_stream_socket::async_send (1 of 2 overloads)]
+[section:overload1 basic_socket_acceptor::async_accept (1 of 2 overloads)]
 
-Start an asynchronous send.
+Start an asynchronous accept.
 
   template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
- void async_send(
- const ConstBufferSequence & buffers,
- WriteHandler handler);
+ typename ``[link boost_asio.reference.SocketService SocketService]``,
+ typename ``[link boost_asio.reference.AcceptHandler AcceptHandler]``>
+ void async_accept(
+ basic_socket< protocol_type, SocketService > & peer,
+ AcceptHandler handler);
 
 
-This function is used to asynchronously send data on the stream socket. The function call always returns immediately.
+This function is used to asynchronously accept a new connection into a socket. The function call always returns immediately.
 
 
 [heading Parameters]
@@ -15525,13 +16927,12 @@
 
 [variablelist
   
-[[buffers][One or more data buffers to be sent on the socket. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+[[peer][The socket into which the new connection will be accepted. Ownership of the peer object is retained by the caller, which must guarantee that it is valid until the handler is called.]]
 
-[[handler][The handler to be called when the send operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+[[handler][The handler to be called when the accept operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
 ``
    void handler(
- const boost::system::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes sent.
+ const boost::system::error_code& error // Result of operation.
    );
 
 ``
@@ -15539,21 +16940,27 @@
 
 ]
 
-[heading Remarks]
-
-The send operation may not transmit all of the data to the peer. Consider using the
-[link boost_asio.reference.async_write async_write] function if you need to ensure that all data is written before the asynchronous operation completes.
-
 [heading Example]
   
-To send a single data buffer use the
-[link boost_asio.reference.buffer buffer] function as follows:
 
- socket.async_send(boost::asio::buffer(data, size), handler);
+
+ void accept_handler(const boost::system::error_code& error)
+ {
+ if (!error)
+ {
+ // Accept succeeded.
+ }
+ }
+
+ ...
+
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
+ boost::asio::ip::tcp::socket socket(io_service);
+ acceptor.async_accept(socket, accept_handler);
+
 
 
-See the
-[link boost_asio.reference.buffer buffer] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
 
 
@@ -15561,20 +16968,20 @@
 
 
 
-[section:overload2 basic_stream_socket::async_send (2 of 2 overloads)]
+[section:overload2 basic_socket_acceptor::async_accept (2 of 2 overloads)]
 
-Start an asynchronous send.
+Start an asynchronous accept.
 
   template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
- void async_send(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags,
- WriteHandler handler);
+ typename ``[link boost_asio.reference.SocketService SocketService]``,
+ typename ``[link boost_asio.reference.AcceptHandler AcceptHandler]``>
+ void async_accept(
+ basic_socket< protocol_type, SocketService > & peer,
+ endpoint_type & peer_endpoint,
+ AcceptHandler handler);
 
 
-This function is used to asynchronously send data on the stream socket. The function call always returns immediately.
+This function is used to asynchronously accept a new connection into a socket, and additionally obtain the endpoint of the remote peer. The function call always returns immediately.
 
 
 [heading Parameters]
@@ -15582,59 +16989,59 @@
 
 [variablelist
   
-[[buffers][One or more data buffers to be sent on the socket. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+[[peer][The socket into which the new connection will be accepted. Ownership of the peer object is retained by the caller, which must guarantee that it is valid until the handler is called.]]
 
-[[flags][Flags specifying how the send call is to be made.]]
+[[peer_endpoint][An endpoint object into which the endpoint of the remote peer will be written. Ownership of the peer\_endpoint object is retained by the caller, which must guarantee that it is valid until the handler is called.]]
 
-[[handler][The handler to be called when the send operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+[[handler][The handler to be called when the accept operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
 ``
    void handler(
- const boost::system::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes sent.
+ const boost::system::error_code& error // Result of operation.
    );
 
 ``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post(). ]]
 
 ]
 
-[heading Remarks]
-
-The send operation may not transmit all of the data to the peer. Consider using the
-[link boost_asio.reference.async_write async_write] function if you need to ensure that all data is written before the asynchronous operation completes.
 
-[heading Example]
-
-To send a single data buffer use the
-[link boost_asio.reference.buffer buffer] function as follows:
 
- socket.async_send(boost::asio::buffer(data, size), 0, handler);
+[endsect]
 
 
-See the
-[link boost_asio.reference.buffer buffer] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+[endsect]
 
+[section:basic_socket_acceptor basic_socket_acceptor::basic_socket_acceptor]
 
+Construct an acceptor without opening it.
 
-[endsect]
+ ``[link boost_asio.reference.basic_socket_acceptor.basic_socket_acceptor.overload1 basic_socket_acceptor]``(
+ boost::asio::io_service & io_service);
 
+ ``[link boost_asio.reference.basic_socket_acceptor.basic_socket_acceptor.overload2 basic_socket_acceptor]``(
+ boost::asio::io_service & io_service,
+ const protocol_type & protocol);
 
-[endsect]
+ ``[link boost_asio.reference.basic_socket_acceptor.basic_socket_acceptor.overload3 basic_socket_acceptor]``(
+ boost::asio::io_service & io_service,
+ const endpoint_type & endpoint,
+ bool reuse_addr = true);
 
+ ``[link boost_asio.reference.basic_socket_acceptor.basic_socket_acceptor.overload4 basic_socket_acceptor]``(
+ boost::asio::io_service & io_service,
+ const protocol_type & protocol,
+ const native_type & native_acceptor);
 
-[section:async_write_some basic_stream_socket::async_write_some]
 
-Start an asynchronous write.
+[section:overload1 basic_socket_acceptor::basic_socket_acceptor (1 of 4 overloads)]
 
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
- void async_write_some(
- const ConstBufferSequence & buffers,
- WriteHandler handler);
+Construct an acceptor without opening it.
 
+ basic_socket_acceptor(
+ boost::asio::io_service & io_service);
 
-This function is used to asynchronously write data to the stream socket. The function call always returns immediately.
+
+This constructor creates an acceptor without opening it to listen for new connections. The open() function must be called before the acceptor can accept new socket connections.
 
 
 [heading Parameters]
@@ -15642,67 +17049,38 @@
 
 [variablelist
   
-[[buffers][One or more data buffers to be written to the socket. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const boost::system::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes written.
- );
-
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
+[[io_service][The io\_service object that the acceptor will use to dispatch handlers for any asynchronous operations performed on the acceptor. ]]
 
 ]
 
-[heading Remarks]
-
-The write operation may not transmit all of the data to the peer. Consider using the
-[link boost_asio.reference.async_write async_write] function if you need to ensure that all data is written before the asynchronous operation completes.
-
-[heading Example]
-
-To write a single data buffer use the
-[link boost_asio.reference.buffer buffer] function as follows:
-
- socket.async_write_some(boost::asio::buffer(data, size), handler);
-
-
-See the
-[link boost_asio.reference.buffer buffer] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
 
 
 [endsect]
 
 
-[section:at_mark basic_stream_socket::at_mark]
-
-Determine whether the socket is at the out-of-band data mark.
-
- bool ``[link boost_asio.reference.basic_stream_socket.at_mark.overload1 at_mark]``() const;
-
- bool ``[link boost_asio.reference.basic_stream_socket.at_mark.overload2 at_mark]``(
- boost::system::error_code & ec) const;
 
+[section:overload2 basic_socket_acceptor::basic_socket_acceptor (2 of 4 overloads)]
 
-[section:overload1 basic_stream_socket::at_mark (1 of 2 overloads)]
+Construct an open acceptor.
 
+ basic_socket_acceptor(
+ boost::asio::io_service & io_service,
+ const protocol_type & protocol);
 
-['Inherited from basic_socket.]
 
-Determine whether the socket is at the out-of-band data mark.
+This constructor creates an acceptor and automatically opens it.
 
- bool at_mark() const;
 
+[heading Parameters]
+
 
-This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
+[variablelist
+
+[[io_service][The io\_service object that the acceptor will use to dispatch handlers for any asynchronous operations performed on the acceptor.]]
 
+[[protocol][An object specifying protocol parameters to be used.]]
 
-[heading Return Value]
-
-A bool indicating whether the socket is at the out-of-band data mark.
+]
 
 [heading Exceptions]
     
@@ -15719,66 +17097,86 @@
 
 
 
-[section:overload2 basic_stream_socket::at_mark (2 of 2 overloads)]
+[section:overload3 basic_socket_acceptor::basic_socket_acceptor (3 of 4 overloads)]
 
+Construct an acceptor opened on the given endpoint.
 
-['Inherited from basic_socket.]
+ basic_socket_acceptor(
+ boost::asio::io_service & io_service,
+ const endpoint_type & endpoint,
+ bool reuse_addr = true);
 
-Determine whether the socket is at the out-of-band data mark.
 
- bool at_mark(
- boost::system::error_code & ec) const;
+This constructor creates an acceptor and automatically opens it to listen for new connections on the specified endpoint.
 
 
-This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
+[heading Parameters]
+
+
+[variablelist
+
+[[io_service][The io\_service object that the acceptor will use to dispatch handlers for any asynchronous operations performed on the acceptor.]]
 
+[[endpoint][An endpoint on the local machine on which the acceptor will listen for new connections.]]
 
-[heading Parameters]
+[[reuse_addr][Whether the constructor should set the socket option socket\_base::reuse\_address.]]
+
+]
+
+[heading Exceptions]
     
 
 [variablelist
   
-[[ec][Set to indicate what error occurred, if any.]]
+[[boost::system::system_error][Thrown on failure.]]
 
 ]
 
-[heading Return Value]
+[heading Remarks]
       
-A bool indicating whether the socket is at the out-of-band data mark.
+This constructor is equivalent to the following code:
+
+ basic_socket_acceptor<Protocol> acceptor(io_service);
+ acceptor.open(endpoint.protocol());
+ if (reuse_addr)
+ acceptor.set_option(socket_base::reuse_address(true));
+ acceptor.bind(endpoint);
+ acceptor.listen(listen_backlog);
 
 
 
-[endsect]
 
 
-[endsect]
 
-[section:available basic_stream_socket::available]
+[endsect]
 
-Determine the number of bytes available for reading.
 
- std::size_t ``[link boost_asio.reference.basic_stream_socket.available.overload1 available]``() const;
 
- std::size_t ``[link boost_asio.reference.basic_stream_socket.available.overload2 available]``(
- boost::system::error_code & ec) const;
+[section:overload4 basic_socket_acceptor::basic_socket_acceptor (4 of 4 overloads)]
 
+Construct a basic_socket_acceptor on an existing native acceptor.
 
-[section:overload1 basic_stream_socket::available (1 of 2 overloads)]
+ basic_socket_acceptor(
+ boost::asio::io_service & io_service,
+ const protocol_type & protocol,
+ const native_type & native_acceptor);
 
 
-['Inherited from basic_socket.]
+This constructor creates an acceptor object to hold an existing native acceptor.
 
-Determine the number of bytes available for reading.
 
- std::size_t available() const;
+[heading Parameters]
+
 
+[variablelist
+
+[[io_service][The io\_service object that the acceptor will use to dispatch handlers for any asynchronous operations performed on the acceptor.]]
 
-This function is used to determine the number of bytes that may be read without blocking.
+[[protocol][An object specifying protocol parameters to be used.]]
 
+[[native_acceptor][A native acceptor.]]
 
-[heading Return Value]
-
-The number of bytes that may be read without blocking, or 0 if an error occurs.
+]
 
 [heading Exceptions]
     
@@ -15794,19 +17192,29 @@
 [endsect]
 
 
+[endsect]
 
-[section:overload2 basic_stream_socket::available (2 of 2 overloads)]
+[section:bind basic_socket_acceptor::bind]
 
+Bind the acceptor to the given local endpoint.
 
-['Inherited from basic_socket.]
+ void ``[link boost_asio.reference.basic_socket_acceptor.bind.overload1 bind]``(
+ const endpoint_type & endpoint);
 
-Determine the number of bytes available for reading.
+ boost::system::error_code ``[link boost_asio.reference.basic_socket_acceptor.bind.overload2 bind]``(
+ const endpoint_type & endpoint,
+ boost::system::error_code & ec);
 
- std::size_t available(
- boost::system::error_code & ec) const;
 
+[section:overload1 basic_socket_acceptor::bind (1 of 2 overloads)]
+
+Bind the acceptor to the given local endpoint.
+
+ void bind(
+ const endpoint_type & endpoint);
 
-This function is used to determine the number of bytes that may be read without blocking.
+
+This function binds the socket acceptor to the specified endpoint on the local machine.
 
 
 [heading Parameters]
@@ -15814,51 +17222,46 @@
 
 [variablelist
   
-[[ec][Set to indicate what error occurred, if any.]]
+[[endpoint][An endpoint on the local machine to which the socket acceptor will be bound.]]
 
 ]
 
-[heading Return Value]
-
-The number of bytes that may be read without blocking, or 0 if an error occurs.
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
 
+]
 
-[endsect]
+[heading Example]
+
 
 
-[endsect]
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ acceptor.open(boost::asio::ip::tcp::v4());
+ acceptor.bind(boost::asio::ip::tcp::endpoint(12345));
 
-[section:basic_stream_socket basic_stream_socket::basic_stream_socket]
 
-Construct a basic_stream_socket without opening it.
 
- ``[link boost_asio.reference.basic_stream_socket.basic_stream_socket.overload1 basic_stream_socket]``(
- boost::asio::io_service & io_service);
 
- ``[link boost_asio.reference.basic_stream_socket.basic_stream_socket.overload2 basic_stream_socket]``(
- boost::asio::io_service & io_service,
- const protocol_type & protocol);
 
- ``[link boost_asio.reference.basic_stream_socket.basic_stream_socket.overload3 basic_stream_socket]``(
- boost::asio::io_service & io_service,
- const endpoint_type & endpoint);
 
- ``[link boost_asio.reference.basic_stream_socket.basic_stream_socket.overload4 basic_stream_socket]``(
- boost::asio::io_service & io_service,
- const protocol_type & protocol,
- const native_type & native_socket);
+[endsect]
 
 
-[section:overload1 basic_stream_socket::basic_stream_socket (1 of 4 overloads)]
 
-Construct a basic_stream_socket without opening it.
+[section:overload2 basic_socket_acceptor::bind (2 of 2 overloads)]
 
- basic_stream_socket(
- boost::asio::io_service & io_service);
+Bind the acceptor to the given local endpoint.
+
+ boost::system::error_code bind(
+ const endpoint_type & endpoint,
+ boost::system::error_code & ec);
 
 
-This constructor creates a stream socket without opening it. The socket needs to be opened and then connected or accepted before data can be sent or received on it.
+This function binds the socket acceptor to the specified endpoint on the local machine.
 
 
 [heading Parameters]
@@ -15866,248 +17269,37 @@
 
 [variablelist
   
-[[io_service][The io\_service object that the stream socket will use to dispatch handlers for any asynchronous operations performed on the socket. ]]
+[[endpoint][An endpoint on the local machine to which the socket acceptor will be bound.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
 
 ]
 
+[heading Example]
+
 
 
-[endsect]
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ acceptor.open(boost::asio::ip::tcp::v4());
+ boost::system::error_code ec;
+ acceptor.bind(boost::asio::ip::tcp::endpoint(12345), ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
 
 
 
-[section:overload2 basic_stream_socket::basic_stream_socket (2 of 4 overloads)]
 
-Construct and open a basic_stream_socket.
 
- basic_stream_socket(
- boost::asio::io_service & io_service,
- const protocol_type & protocol);
 
+[endsect]
 
-This constructor creates and opens a stream socket. The socket needs to be connected or accepted before data can be sent or received on it.
 
+[endsect]
 
-[heading Parameters]
-
 
-[variablelist
-
-[[io_service][The io\_service object that the stream socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
-
-[[protocol][An object specifying protocol parameters to be used.]]
-
-]
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[boost::system::system_error][Thrown on failure. ]]
-
-]
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_stream_socket::basic_stream_socket (3 of 4 overloads)]
-
-Construct a basic_stream_socket, opening it and binding it to the given local endpoint.
-
- basic_stream_socket(
- boost::asio::io_service & io_service,
- const endpoint_type & endpoint);
-
-
-This constructor creates a stream socket and automatically opens it bound to the specified endpoint on the local machine. The protocol used is the protocol associated with the given endpoint.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_service][The io\_service object that the stream socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
-
-[[endpoint][An endpoint on the local machine to which the stream socket will be bound.]]
-
-]
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[boost::system::system_error][Thrown on failure. ]]
-
-]
-
-
-
-[endsect]
-
-
-
-[section:overload4 basic_stream_socket::basic_stream_socket (4 of 4 overloads)]
-
-Construct a basic_stream_socket on an existing native socket.
-
- basic_stream_socket(
- boost::asio::io_service & io_service,
- const protocol_type & protocol,
- const native_type & native_socket);
-
-
-This constructor creates a stream socket object to hold an existing native socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_service][The io\_service object that the stream socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
-
-[[protocol][An object specifying protocol parameters to be used.]]
-
-[[native_socket][The new underlying socket implementation.]]
-
-]
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[boost::system::system_error][Thrown on failure. ]]
-
-]
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:bind basic_stream_socket::bind]
-
-Bind the socket to the given local endpoint.
-
- void ``[link boost_asio.reference.basic_stream_socket.bind.overload1 bind]``(
- const endpoint_type & endpoint);
-
- boost::system::error_code ``[link boost_asio.reference.basic_stream_socket.bind.overload2 bind]``(
- const endpoint_type & endpoint,
- boost::system::error_code & ec);
-
-
-[section:overload1 basic_stream_socket::bind (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-Bind the socket to the given local endpoint.
-
- void bind(
- const endpoint_type & endpoint);
-
-
-This function binds the socket to the specified endpoint on the local machine.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
-
-]
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[boost::system::system_error][Thrown on failure.]]
-
-]
-
-[heading Example]
-
-
-
- boost::asio::ip::tcp::socket socket(io_service);
- socket.open(boost::asio::ip::tcp::v4());
- socket.bind(boost::asio::ip::tcp::endpoint(
- boost::asio::ip::tcp::v4(), 12345));
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::bind (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-Bind the socket to the given local endpoint.
-
- boost::system::error_code bind(
- const endpoint_type & endpoint,
- boost::system::error_code & ec);
-
-
-This function binds the socket to the specified endpoint on the local machine.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-[heading Example]
-
-
-
- boost::asio::ip::tcp::socket socket(io_service);
- socket.open(boost::asio::ip::tcp::v4());
- boost::system::error_code ec;
- socket.bind(boost::asio::ip::tcp::endpoint(
- boost::asio::ip::tcp::v4(), 12345), ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:broadcast basic_stream_socket::broadcast]
+[section:broadcast basic_socket_acceptor::broadcast]
 
 
 ['Inherited from socket_base.]
@@ -16150,7 +17342,7 @@
 
 
 
-[section:bytes_readable basic_stream_socket::bytes_readable]
+[section:bytes_readable basic_socket_acceptor::bytes_readable]
 
 
 ['Inherited from socket_base.]
@@ -16182,22 +17374,19 @@
 [endsect]
 
 
-[section:cancel basic_stream_socket::cancel]
+[section:cancel basic_socket_acceptor::cancel]
 
-Cancel all asynchronous operations associated with the socket.
+Cancel all asynchronous operations associated with the acceptor.
 
- void ``[link boost_asio.reference.basic_stream_socket.cancel.overload1 cancel]``();
+ void ``[link boost_asio.reference.basic_socket_acceptor.cancel.overload1 cancel]``();
 
- boost::system::error_code ``[link boost_asio.reference.basic_stream_socket.cancel.overload2 cancel]``(
+ boost::system::error_code ``[link boost_asio.reference.basic_socket_acceptor.cancel.overload2 cancel]``(
       boost::system::error_code & ec);
 
 
-[section:overload1 basic_stream_socket::cancel (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
+[section:overload1 basic_socket_acceptor::cancel (1 of 2 overloads)]
 
-Cancel all asynchronous operations associated with the socket.
+Cancel all asynchronous operations associated with the acceptor.
 
   void cancel();
 
@@ -16210,38 +17399,19 @@
 
 [variablelist
   
-[[boost::system::system_error][Thrown on failure.]]
+[[boost::system::system_error][Thrown on failure. ]]
 
 ]
 
-[heading Remarks]
-
-Calls to cancel() will always fail with boost::asio::error::operation\_not\_supported when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless BOOST\_ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use:
-
-* It will only cancel asynchronous operations that were initiated in the current thread.
-
-* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed.
-
-For portable cancellation, consider using one of the following alternatives:
-
-
-* Disable asio's I/O completion port backend by defining BOOST_ASIO_DISABLE_IOCP.
-
-* Use the close() function to simultaneously cancel the outstanding operations and close the socket.
-
-When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above.
 
 
 [endsect]
 
 
 
-[section:overload2 basic_stream_socket::cancel (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
+[section:overload2 basic_socket_acceptor::cancel (2 of 2 overloads)]
 
-Cancel all asynchronous operations associated with the socket.
+Cancel all asynchronous operations associated with the acceptor.
 
   boost::system::error_code cancel(
       boost::system::error_code & ec);
@@ -16255,26 +17425,10 @@
 
 [variablelist
   
-[[ec][Set to indicate what error occurred, if any.]]
+[[ec][Set to indicate what error occurred, if any. ]]
 
 ]
 
-[heading Remarks]
-
-Calls to cancel() will always fail with boost::asio::error::operation\_not\_supported when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless BOOST\_ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use:
-
-* It will only cancel asynchronous operations that were initiated in the current thread.
-
-* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed.
-
-For portable cancellation, consider using one of the following alternatives:
-
-
-* Disable asio's I/O completion port backend by defining BOOST_ASIO_DISABLE_IOCP.
-
-* Use the close() function to simultaneously cancel the outstanding operations and close the socket.
-
-When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above.
 
 
 [endsect]
@@ -16282,177 +17436,54 @@
 
 [endsect]
 
-[section:close basic_stream_socket::close]
+[section:close basic_socket_acceptor::close]
 
-Close the socket.
+Close the acceptor.
 
- void ``[link boost_asio.reference.basic_stream_socket.close.overload1 close]``();
+ void ``[link boost_asio.reference.basic_socket_acceptor.close.overload1 close]``();
 
- boost::system::error_code ``[link boost_asio.reference.basic_stream_socket.close.overload2 close]``(
+ boost::system::error_code ``[link boost_asio.reference.basic_socket_acceptor.close.overload2 close]``(
       boost::system::error_code & ec);
 
 
-[section:overload1 basic_stream_socket::close (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
+[section:overload1 basic_socket_acceptor::close (1 of 2 overloads)]
 
-Close the socket.
+Close the acceptor.
 
   void close();
 
 
-This function is used to close the socket. Any asynchronous send, receive or connect operations will be cancelled immediately, and will complete with the boost::asio::error::operation\_aborted error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[boost::system::system_error][Thrown on failure.]]
-
-]
-
-[heading Remarks]
-
-For portable behaviour with respect to graceful closure of a connected socket, call shutdown() before closing the socket.
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::close (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-Close the socket.
-
- boost::system::error_code close(
- boost::system::error_code & ec);
-
-
-This function is used to close the socket. Any asynchronous send, receive or connect operations will be cancelled immediately, and will complete with the boost::asio::error::operation\_aborted error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-[heading Example]
-
-
-
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::system::error_code ec;
- socket.close(ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-[heading Remarks]
-
-For portable behaviour with respect to graceful closure of a connected socket, call shutdown() before closing the socket.
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:connect basic_stream_socket::connect]
-
-Connect the socket to the specified endpoint.
-
- void ``[link boost_asio.reference.basic_stream_socket.connect.overload1 connect]``(
- const endpoint_type & peer_endpoint);
-
- boost::system::error_code ``[link boost_asio.reference.basic_stream_socket.connect.overload2 connect]``(
- const endpoint_type & peer_endpoint,
- boost::system::error_code & ec);
-
-
-[section:overload1 basic_stream_socket::connect (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-Connect the socket to the specified endpoint.
-
- void connect(
- const endpoint_type & peer_endpoint);
-
-
-This function is used to connect a socket to the specified remote endpoint. The function call will block until the connection is successfully made or an error occurs.
-
-The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is returned to the closed state.
-
-
-[heading Parameters]
-
+This function is used to close the acceptor. Any asynchronous accept operations will be cancelled immediately.
 
-[variablelist
-
-[[peer_endpoint][The remote endpoint to which the socket will be connected.]]
+A subsequent call to open() is required before the acceptor can again be used to again perform socket accept operations.
 
-]
 
 [heading Exceptions]
     
 
 [variablelist
   
-[[boost::system::system_error][Thrown on failure.]]
+[[boost::system::system_error][Thrown on failure. ]]
 
 ]
 
-[heading Example]
-
-
-
- boost::asio::ip::tcp::socket socket(io_service);
- boost::asio::ip::tcp::endpoint endpoint(
- boost::asio::ip::address::from_string("1.2.3.4"), 12345);
- socket.connect(endpoint);
-
-
-
-
 
 
 [endsect]
 
 
 
-[section:overload2 basic_stream_socket::connect (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
+[section:overload2 basic_socket_acceptor::close (2 of 2 overloads)]
 
-Connect the socket to the specified endpoint.
+Close the acceptor.
 
- boost::system::error_code connect(
- const endpoint_type & peer_endpoint,
+ boost::system::error_code close(
       boost::system::error_code & ec);
 
 
-This function is used to connect a socket to the specified remote endpoint. The function call will block until the connection is successfully made or an error occurs.
+This function is used to close the acceptor. Any asynchronous accept operations will be cancelled immediately.
 
-The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is returned to the closed state.
+A subsequent call to open() is required before the acceptor can again be used to again perform socket accept operations.
 
 
 [heading Parameters]
@@ -16460,8 +17491,6 @@
 
 [variablelist
   
-[[peer_endpoint][The remote endpoint to which the socket will be connected.]]
-
 [[ec][Set to indicate what error occurred, if any.]]
 
 ]
@@ -16470,11 +17499,10 @@
   
 
 
- boost::asio::ip::tcp::socket socket(io_service);
- boost::asio::ip::tcp::endpoint endpoint(
- boost::asio::ip::address::from_string("1.2.3.4"), 12345);
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
    boost::system::error_code ec;
- socket.connect(endpoint, ec);
+ acceptor.close(ec);
    if (ec)
    {
      // An error occurred.
@@ -16491,7 +17519,7 @@
 [endsect]
 
 
-[section:debug basic_stream_socket::debug]
+[section:debug basic_socket_acceptor::debug]
 
 
 ['Inherited from socket_base.]
@@ -16534,7 +17562,7 @@
 
 
 
-[section:do_not_route basic_stream_socket::do_not_route]
+[section:do_not_route basic_socket_acceptor::do_not_route]
 
 
 ['Inherited from socket_base.]
@@ -16577,7 +17605,7 @@
 
 
 
-[section:enable_connection_aborted basic_stream_socket::enable_connection_aborted]
+[section:enable_connection_aborted basic_socket_acceptor::enable_connection_aborted]
 
 
 ['Inherited from socket_base.]
@@ -16620,7 +17648,7 @@
 
 
 
-[section:endpoint_type basic_stream_socket::endpoint_type]
+[section:endpoint_type basic_socket_acceptor::endpoint_type]
 
 The endpoint type.
 
@@ -16633,7 +17661,7 @@
 
 
 
-[section:get_io_service basic_stream_socket::get_io_service]
+[section:get_io_service basic_socket_acceptor::get_io_service]
 
 
 ['Inherited from basic_io_object.]
@@ -16655,30 +17683,33 @@
 [endsect]
 
 
-[section:get_option basic_stream_socket::get_option]
+[section:get_option basic_socket_acceptor::get_option]
 
-Get an option from the socket.
+Get an option from the acceptor.
 
- void ``[link boost_asio.reference.basic_stream_socket.get_option.overload1 get_option]``(
- GettableSocketOption & option) const;
+ template<
+ typename ``[link boost_asio.reference.GettableSocketOption GettableSocketOption]``>
+ void ``[link boost_asio.reference.basic_socket_acceptor.get_option.overload1 get_option]``(
+ GettableSocketOption & option);
 
- boost::system::error_code ``[link boost_asio.reference.basic_stream_socket.get_option.overload2 get_option]``(
+ template<
+ typename ``[link boost_asio.reference.GettableSocketOption GettableSocketOption]``>
+ boost::system::error_code ``[link boost_asio.reference.basic_socket_acceptor.get_option.overload2 get_option]``(
       GettableSocketOption & option,
- boost::system::error_code & ec) const;
-
-
-[section:overload1 basic_stream_socket::get_option (1 of 2 overloads)]
+ boost::system::error_code & ec);
 
 
-['Inherited from basic_socket.]
+[section:overload1 basic_socket_acceptor::get_option (1 of 2 overloads)]
 
-Get an option from the socket.
+Get an option from the acceptor.
 
+ template<
+ typename ``[link boost_asio.reference.GettableSocketOption GettableSocketOption]``>
   void get_option(
- GettableSocketOption & option) const;
+ GettableSocketOption & option);
 
 
-This function is used to get the current value of an option on the socket.
+This function is used to get the current value of an option on the acceptor.
 
 
 [heading Parameters]
@@ -16686,7 +17717,7 @@
 
 [variablelist
   
-[[option][The option value to be obtained from the socket.]]
+[[option][The option value to be obtained from the acceptor.]]
 
 ]
 
@@ -16701,12 +17732,12 @@
 
 [heading Example]
   
-Getting the value of the SOL\_SOCKET/SO\_KEEPALIVE option:
+Getting the value of the SOL\_SOCKET/SO\_REUSEADDR option:
 
- boost::asio::ip::tcp::socket socket(io_service);
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
    ...
- boost::asio::ip::tcp::socket::keep_alive option;
- socket.get_option(option);
+ boost::asio::ip::tcp::acceptor::reuse_address option;
+ acceptor.get_option(option);
    bool is_set = option.get();
 
 
@@ -16718,19 +17749,18 @@
 
 
 
-[section:overload2 basic_stream_socket::get_option (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
+[section:overload2 basic_socket_acceptor::get_option (2 of 2 overloads)]
 
-Get an option from the socket.
+Get an option from the acceptor.
 
+ template<
+ typename ``[link boost_asio.reference.GettableSocketOption GettableSocketOption]``>
   boost::system::error_code get_option(
       GettableSocketOption & option,
- boost::system::error_code & ec) const;
+ boost::system::error_code & ec);
 
 
-This function is used to get the current value of an option on the socket.
+This function is used to get the current value of an option on the acceptor.
 
 
 [heading Parameters]
@@ -16738,7 +17768,7 @@
 
 [variablelist
   
-[[option][The option value to be obtained from the socket.]]
+[[option][The option value to be obtained from the acceptor.]]
 
 [[ec][Set to indicate what error occurred, if any.]]
 
@@ -16746,13 +17776,13 @@
 
 [heading Example]
   
-Getting the value of the SOL\_SOCKET/SO\_KEEPALIVE option:
+Getting the value of the SOL\_SOCKET/SO\_REUSEADDR option:
 
- boost::asio::ip::tcp::socket socket(io_service);
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
    ...
- boost::asio::ip::tcp::socket::keep_alive option;
+ boost::asio::ip::tcp::acceptor::reuse_address option;
    boost::system::error_code ec;
- socket.get_option(option, ec);
+ acceptor.get_option(option, ec);
    if (ec)
    {
      // An error occurred.
@@ -16770,77 +17800,14 @@
 [endsect]
 
 
-[section:implementation_type basic_stream_socket::implementation_type]
+[section:implementation basic_socket_acceptor::implementation]
 
 
 ['Inherited from basic_io_object.]
 
-The underlying implementation type of I/O object.
-
- typedef service_type::implementation_type implementation_type;
-
-
-
-
-[endsect]
-
-
-[section:io_control basic_stream_socket::io_control]
-
-Perform an IO control command on the socket.
-
- void ``[link boost_asio.reference.basic_stream_socket.io_control.overload1 io_control]``(
- IoControlCommand & command);
-
- boost::system::error_code ``[link boost_asio.reference.basic_stream_socket.io_control.overload2 io_control]``(
- IoControlCommand & command,
- boost::system::error_code & ec);
-
-
-[section:overload1 basic_stream_socket::io_control (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-Perform an IO control command on the socket.
-
- void io_control(
- IoControlCommand & command);
-
-
-This function is used to execute an IO control command on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[command][The IO control command to be performed on the socket.]]
-
-]
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[boost::system::system_error][Thrown on failure.]]
-
-]
-
-[heading Example]
-
-Getting the number of bytes ready to read:
-
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::ip::tcp::socket::bytes_readable command;
- socket.io_control(command);
- std::size_t bytes_readable = command.get();
-
-
+The underlying implementation of the I/O object.
 
+ implementation_type implementation;
 
 
 
@@ -16848,48 +17815,14 @@
 
 
 
-[section:overload2 basic_stream_socket::io_control (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-Perform an IO control command on the socket.
-
- boost::system::error_code io_control(
- IoControlCommand & command,
- boost::system::error_code & ec);
-
-
-This function is used to execute an IO control command on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[command][The IO control command to be performed on the socket.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
+[section:implementation_type basic_socket_acceptor::implementation_type]
 
-[heading Example]
-
-Getting the number of bytes ready to read:
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::ip::tcp::socket::bytes_readable command;
- boost::system::error_code ec;
- socket.io_control(command, ec);
- if (ec)
- {
- // An error occurred.
- }
- std::size_t bytes_readable = command.get();
+['Inherited from basic_io_object.]
 
+The underlying implementation type of I/O object.
 
+ typedef service_type::implementation_type implementation_type;
 
 
 
@@ -16897,10 +17830,8 @@
 [endsect]
 
 
-[endsect]
-
 
-[section:io_service basic_stream_socket::io_service]
+[section:io_service basic_socket_acceptor::io_service]
 
 
 ['Inherited from basic_io_object.]
@@ -16923,12 +17854,9 @@
 
 
 
-[section:is_open basic_stream_socket::is_open]
-
-
-['Inherited from basic_socket.]
+[section:is_open basic_socket_acceptor::is_open]
 
-Determine whether the socket is open.
+Determine whether the acceptor is open.
 
   bool is_open() const;
 
@@ -16938,7 +17866,7 @@
 
 
 
-[section:keep_alive basic_stream_socket::keep_alive]
+[section:keep_alive basic_socket_acceptor::keep_alive]
 
 
 ['Inherited from socket_base.]
@@ -16981,7 +17909,7 @@
 
 
 
-[section:linger basic_stream_socket::linger]
+[section:linger basic_socket_acceptor::linger]
 
 
 ['Inherited from socket_base.]
@@ -17024,32 +17952,122 @@
 [endsect]
 
 
-[section:local_endpoint basic_stream_socket::local_endpoint]
+[section:listen basic_socket_acceptor::listen]
 
-Get the local endpoint of the socket.
+Place the acceptor into the state where it will listen for new connections.
 
- endpoint_type ``[link boost_asio.reference.basic_stream_socket.local_endpoint.overload1 local_endpoint]``() const;
+ void ``[link boost_asio.reference.basic_socket_acceptor.listen.overload1 listen]``(
+ int backlog = socket_base::max_connections);
 
- endpoint_type ``[link boost_asio.reference.basic_stream_socket.local_endpoint.overload2 local_endpoint]``(
- boost::system::error_code & ec) const;
+ boost::system::error_code ``[link boost_asio.reference.basic_socket_acceptor.listen.overload2 listen]``(
+ int backlog,
+ boost::system::error_code & ec);
 
 
-[section:overload1 basic_stream_socket::local_endpoint (1 of 2 overloads)]
+[section:overload1 basic_socket_acceptor::listen (1 of 2 overloads)]
+
+Place the acceptor into the state where it will listen for new connections.
 
+ void listen(
+ int backlog = socket_base::max_connections);
 
-['Inherited from basic_socket.]
 
-Get the local endpoint of the socket.
+This function puts the socket acceptor into the state where it may accept new connections.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[backlog][The maximum length of the queue of pending connections.]]
+
+]
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_socket_acceptor::listen (2 of 2 overloads)]
+
+Place the acceptor into the state where it will listen for new connections.
+
+ boost::system::error_code listen(
+ int backlog,
+ boost::system::error_code & ec);
+
+
+This function puts the socket acceptor into the state where it may accept new connections.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[backlog][The maximum length of the queue of pending connections.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
+ boost::system::error_code ec;
+ acceptor.listen(boost::asio::socket_base::max_connections, ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
+
+
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:local_endpoint basic_socket_acceptor::local_endpoint]
+
+Get the local endpoint of the acceptor.
+
+ endpoint_type ``[link boost_asio.reference.basic_socket_acceptor.local_endpoint.overload1 local_endpoint]``() const;
+
+ endpoint_type ``[link boost_asio.reference.basic_socket_acceptor.local_endpoint.overload2 local_endpoint]``(
+ boost::system::error_code & ec) const;
+
+
+[section:overload1 basic_socket_acceptor::local_endpoint (1 of 2 overloads)]
+
+Get the local endpoint of the acceptor.
 
   endpoint_type local_endpoint() const;
 
 
-This function is used to obtain the locally bound endpoint of the socket.
+This function is used to obtain the locally bound endpoint of the acceptor.
 
 
 [heading Return Value]
       
-An object that represents the local endpoint of the socket.
+An object that represents the local endpoint of the acceptor.
 
 [heading Exceptions]
     
@@ -17064,9 +18082,9 @@
   
 
 
- boost::asio::ip::tcp::socket socket(io_service);
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
    ...
- boost::asio::ip::tcp::endpoint endpoint = socket.local_endpoint();
+ boost::asio::ip::tcp::endpoint endpoint = acceptor.local_endpoint();
 
 
 
@@ -17077,18 +18095,15 @@
 
 
 
-[section:overload2 basic_stream_socket::local_endpoint (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
+[section:overload2 basic_socket_acceptor::local_endpoint (2 of 2 overloads)]
 
-Get the local endpoint of the socket.
+Get the local endpoint of the acceptor.
 
   endpoint_type local_endpoint(
       boost::system::error_code & ec) const;
 
 
-This function is used to obtain the locally bound endpoint of the socket.
+This function is used to obtain the locally bound endpoint of the acceptor.
 
 
 [heading Parameters]
@@ -17102,16 +18117,16 @@
 
 [heading Return Value]
       
-An object that represents the local endpoint of the socket. Returns a default-constructed endpoint object if an error occurred.
+An object that represents the local endpoint of the acceptor. Returns a default-constructed endpoint object if an error occurred and the error handler did not throw an exception.
 
 [heading Example]
   
 
 
- boost::asio::ip::tcp::socket socket(io_service);
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
    ...
    boost::system::error_code ec;
- boost::asio::ip::tcp::endpoint endpoint = socket.local_endpoint(ec);
+ boost::asio::ip::tcp::endpoint endpoint = acceptor.local_endpoint(ec);
    if (ec)
    {
      // An error occurred.
@@ -17128,22 +18143,29 @@
 [endsect]
 
 
-[section:lowest_layer basic_stream_socket::lowest_layer]
+[section:max_connections basic_socket_acceptor::max_connections]
 
 
-['Inherited from basic_socket.]
+['Inherited from socket_base.]
 
-Get a reference to the lowest layer.
+The maximum length of the queue of pending incoming connections.
 
- lowest_layer_type & lowest_layer();
+ static const int max_connections = implementation_defined;
 
 
-This function returns a reference to the lowest layer in a stack of layers. Since a basic_socket cannot contain any further layers, it simply returns a reference to itself.
+
+[endsect]
 
 
-[heading Return Value]
-
-A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
+
+[section:message_do_not_route basic_socket_acceptor::message_do_not_route]
+
+
+['Inherited from socket_base.]
+
+Specify that the data should not be subject to routing.
+
+ static const int message_do_not_route = implementation_defined;
 
 
 
@@ -17151,420 +18173,304 @@
 
 
 
-[section:lowest_layer_type basic_stream_socket::lowest_layer_type]
+[section:message_flags basic_socket_acceptor::message_flags]
 
 
-['Inherited from basic_socket.]
+['Inherited from socket_base.]
 
-A basic_socket is always the lowest layer.
+Bitmask type for flags that can be passed to send and receive operations.
 
- typedef basic_socket< Protocol, StreamSocketService > lowest_layer_type;
+ typedef int message_flags;
 
 
-[heading Types]
-[table
- [[Name][Description]]
 
- [
 
- [[link boost_asio.reference.basic_socket.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
+[endsect]
 
- [
 
- [[link boost_asio.reference.basic_socket.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
 
- [
+[section:message_out_of_band basic_socket_acceptor::message_out_of_band]
 
- [[link boost_asio.reference.basic_socket.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
 
- [
+['Inherited from socket_base.]
 
- [[link boost_asio.reference.basic_socket.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
+Process out-of-band data.
 
- [
+ static const int message_out_of_band = implementation_defined;
 
- [[link boost_asio.reference.basic_socket.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.basic_socket.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
+[endsect]
 
- [
 
- [[link boost_asio.reference.basic_socket.implementation_type [*implementation_type]]]
- [The underlying implementation type of I/O object. ]
-
- ]
 
- [
+[section:message_peek basic_socket_acceptor::message_peek]
 
- [[link boost_asio.reference.basic_socket.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
 
- [
+['Inherited from socket_base.]
 
- [[link boost_asio.reference.basic_socket.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
+Peek at incoming data without removing it from the input queue.
 
- [
+ static const int message_peek = implementation_defined;
 
- [[link boost_asio.reference.basic_socket.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.basic_socket.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
+[endsect]
 
- [
 
- [[link boost_asio.reference.basic_socket.native_type [*native_type]]]
- [The native representation of a socket. ]
-
- ]
 
- [
+[section:native basic_socket_acceptor::native]
 
- [[link boost_asio.reference.basic_socket.non_blocking_io [*non_blocking_io]]]
- [IO control command to set the blocking mode of the socket. ]
-
- ]
+Get the native acceptor representation.
 
- [
+ native_type native();
 
- [[link boost_asio.reference.basic_socket.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
 
- [
+This function may be used to obtain the underlying representation of the acceptor. This is intended to allow access to native acceptor functionality that is not otherwise provided.
 
- [[link boost_asio.reference.basic_socket.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
 
- [
+[endsect]
 
- [[link boost_asio.reference.basic_socket.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.basic_socket.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
+[section:native_type basic_socket_acceptor::native_type]
 
- [
+The native representation of an acceptor.
 
- [[link boost_asio.reference.basic_socket.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
+ typedef SocketAcceptorService::native_type native_type;
 
- [
 
- [[link boost_asio.reference.basic_socket.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.basic_socket.service_type [*service_type]]]
- [The type of the service that will be used to provide I/O operations. ]
+[endsect]
+
+
+
+[section:non_blocking_io basic_socket_acceptor::non_blocking_io]
+
+
+['Inherited from socket_base.]
+
+IO control command to set the blocking mode of the socket.
+
+ typedef implementation_defined non_blocking_io;
+
+
+
+Implements the FIONBIO IO control command.
+
+
+[heading Example]
   
- ]
 
- [
 
- [[link boost_asio.reference.basic_socket.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::non_blocking_io command(true);
+ socket.io_control(command);
+
+
+
+
+
+
+[endsect]
+
+
+[section:open basic_socket_acceptor::open]
+
+Open the acceptor using the specified protocol.
+
+ void ``[link boost_asio.reference.basic_socket_acceptor.open.overload1 open]``(
+ const protocol_type & protocol = protocol_type());
+
+ boost::system::error_code ``[link boost_asio.reference.basic_socket_acceptor.open.overload2 open]``(
+ const protocol_type & protocol,
+ boost::system::error_code & ec);
+
+
+[section:overload1 basic_socket_acceptor::open (1 of 2 overloads)]
+
+Open the acceptor using the specified protocol.
+
+ void open(
+ const protocol_type & protocol = protocol_type());
+
+
+This function opens the socket acceptor so that it will use the specified protocol.
+
+
+[heading Parameters]
+
+
+[variablelist
   
- ]
+[[protocol][An object specifying which protocol is to be used.]]
 
 ]
 
-[heading Member Functions]
-[table
- [[Name][Description]]
+[heading Exceptions]
+
 
- [
- [[link boost_asio.reference.basic_socket.assign [*assign]]]
- [Assign an existing native socket to the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket.available [*available]]]
- [Determine the number of bytes available for reading. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket.basic_socket [*basic_socket]]]
- [Construct a basic_socket without opening it. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket.bind [*bind]]]
- [Bind the socket to the given local endpoint. ]
- ]
+[variablelist
   
- [
- [[link boost_asio.reference.basic_socket.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
- ]
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Example]
   
- [
- [[link boost_asio.reference.basic_socket.close [*close]]]
- [Close the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket.connect [*connect]]]
- [Connect the socket to the specified endpoint. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket.get_io_service [*get_io_service]]]
- [Get the io_service associated with the object. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket.get_option [*get_option]]]
- [Get an option from the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket.io_service [*io_service]]]
- [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket.is_open [*is_open]]]
- [Determine whether the socket is open. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket.native [*native]]]
- [Get the native socket representation. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket.open [*open]]]
- [Open the socket using the specified protocol. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint of the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket.set_option [*set_option]]]
- [Set an option on the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
- ]
-
-]
 
-[heading Data Members]
-[table
- [[Name][Description]]
 
- [
- [[link boost_asio.reference.basic_socket.max_connections [*max_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ acceptor.open(boost::asio::ip::tcp::v4());
 
- [
- [[link boost_asio.reference.basic_socket.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
 
- [
- [[link boost_asio.reference.basic_socket.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
 
- [
- [[link boost_asio.reference.basic_socket.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
 
-]
 
-The basic_socket class template provides functionality that is common to both stream-oriented and datagram-oriented sockets.
 
+[endsect]
 
-[heading Thread Safety]
-
-[*Distinct] [*objects:] Safe.
 
-[*Shared] [*objects:] Unsafe.
 
+[section:overload2 basic_socket_acceptor::open (2 of 2 overloads)]
 
+Open the acceptor using the specified protocol.
 
+ boost::system::error_code open(
+ const protocol_type & protocol,
+ boost::system::error_code & ec);
 
-[endsect]
 
+This function opens the socket acceptor so that it will use the specified protocol.
 
 
-[section:max_connections basic_stream_socket::max_connections]
+[heading Parameters]
+
 
+[variablelist
+
+[[protocol][An object specifying which protocol is to be used.]]
 
-['Inherited from socket_base.]
+[[ec][Set to indicate what error occurred, if any.]]
 
-The maximum length of the queue of pending incoming connections.
+]
 
- static const int max_connections = implementation_defined;
+[heading Example]
+
 
 
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ boost::system::error_code ec;
+ acceptor.open(boost::asio::ip::tcp::v4(), ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
 
-[endsect]
 
 
 
-[section:message_do_not_route basic_stream_socket::message_do_not_route]
 
 
-['Inherited from socket_base.]
+[endsect]
 
-Specify that the data should not be subject to routing.
 
- static const int message_do_not_route = implementation_defined;
+[endsect]
 
 
+[section:protocol_type basic_socket_acceptor::protocol_type]
 
-[endsect]
+The protocol type.
 
+ typedef Protocol protocol_type;
 
 
-[section:message_flags basic_stream_socket::message_flags]
 
 
-['Inherited from socket_base.]
+[endsect]
 
-Bitmask type for flags that can be passed to send and receive operations.
 
- typedef int message_flags;
 
+[section:receive_buffer_size basic_socket_acceptor::receive_buffer_size]
 
 
+['Inherited from socket_base.]
 
-[endsect]
+Socket option for the receive buffer size of a socket.
 
+ typedef implementation_defined receive_buffer_size;
 
 
-[section:message_out_of_band basic_stream_socket::message_out_of_band]
 
+Implements the SOL\_SOCKET/SO\_RCVBUF socket option.
 
-['Inherited from socket_base.]
 
-Process out-of-band data.
+[heading Examples]
+
+Setting the option:
 
- static const int message_out_of_band = implementation_defined;
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::receive_buffer_size option(8192);
+ socket.set_option(option);
 
 
 
-[endsect]
 
+Getting the current option value:
 
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::receive_buffer_size option;
+ socket.get_option(option);
+ int size = option.value();
 
-[section:message_peek basic_stream_socket::message_peek]
 
 
-['Inherited from socket_base.]
 
-Peek at incoming data without removing it from the input queue.
 
- static const int message_peek = implementation_defined;
 
+[endsect]
 
 
-[endsect]
 
+[section:receive_low_watermark basic_socket_acceptor::receive_low_watermark]
 
 
-[section:native basic_stream_socket::native]
+['Inherited from socket_base.]
 
+Socket option for the receive low watermark.
 
-['Inherited from basic_socket.]
+ typedef implementation_defined receive_low_watermark;
 
-Get the native socket representation.
 
- native_type native();
 
+Implements the SOL\_SOCKET/SO\_RCVLOWAT socket option.
 
-This function may be used to obtain the underlying representation of the socket. This is intended to allow access to native socket functionality that is not otherwise provided.
 
+[heading Examples]
+
+Setting the option:
 
-[endsect]
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::receive_low_watermark option(1024);
+ socket.set_option(option);
 
 
 
-[section:native_type basic_stream_socket::native_type]
 
-The native representation of a socket.
+Getting the current option value:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::receive_low_watermark option;
+ socket.get_option(option);
+ int size = option.value();
+
 
- typedef StreamSocketService::native_type native_type;
 
 
 
@@ -17573,87 +18479,82 @@
 
 
 
-[section:non_blocking_io basic_stream_socket::non_blocking_io]
+[section:reuse_address basic_socket_acceptor::reuse_address]
 
 
 ['Inherited from socket_base.]
 
-IO control command to set the blocking mode of the socket.
+Socket option to allow the socket to be bound to an address that is already in use.
 
- typedef implementation_defined non_blocking_io;
+ typedef implementation_defined reuse_address;
 
 
 
-Implements the FIONBIO IO control command.
+Implements the SOL\_SOCKET/SO\_REUSEADDR socket option.
 
 
-[heading Example]
+[heading Examples]
   
+Setting the option:
 
-
- boost::asio::ip::tcp::socket socket(io_service);
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
    ...
- boost::asio::socket_base::non_blocking_io command(true);
- socket.io_control(command);
+ boost::asio::socket_base::reuse_address option(true);
+ acceptor.set_option(option);
 
 
 
 
+Getting the current option value:
 
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
+ boost::asio::socket_base::reuse_address option;
+ acceptor.get_option(option);
+ bool is_set = option.value();
 
-[endsect]
 
 
-[section:open basic_stream_socket::open]
 
-Open the socket using the specified protocol.
 
- void ``[link boost_asio.reference.basic_stream_socket.open.overload1 open]``(
- const protocol_type & protocol = protocol_type());
 
- boost::system::error_code ``[link boost_asio.reference.basic_stream_socket.open.overload2 open]``(
- const protocol_type & protocol,
- boost::system::error_code & ec);
+[endsect]
 
 
-[section:overload1 basic_stream_socket::open (1 of 2 overloads)]
 
+[section:send_buffer_size basic_socket_acceptor::send_buffer_size]
 
-['Inherited from basic_socket.]
 
-Open the socket using the specified protocol.
+['Inherited from socket_base.]
 
- void open(
- const protocol_type & protocol = protocol_type());
+Socket option for the send buffer size of a socket.
 
+ typedef implementation_defined send_buffer_size;
 
-This function opens the socket so that it will use the specified protocol.
 
 
-[heading Parameters]
-
+Implements the SOL\_SOCKET/SO\_SNDBUF socket option.
 
-[variablelist
-
-[[protocol][An object specifying protocol parameters to be used.]]
 
-]
+[heading Examples]
+
+Setting the option:
 
-[heading Exceptions]
-
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::send_buffer_size option(8192);
+ socket.set_option(option);
 
-[variablelist
-
-[[boost::system::system_error][Thrown on failure.]]
 
-]
 
-[heading Example]
-
 
+Getting the current option value:
 
- boost::asio::ip::tcp::socket socket(io_service);
- socket.open(boost::asio::ip::tcp::v4());
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::send_buffer_size option;
+ socket.get_option(option);
+ int size = option.value();
 
 
 
@@ -17664,43 +18565,39 @@
 
 
 
-[section:overload2 basic_stream_socket::open (2 of 2 overloads)]
+[section:send_low_watermark basic_socket_acceptor::send_low_watermark]
 
 
-['Inherited from basic_socket.]
+['Inherited from socket_base.]
 
-Open the socket using the specified protocol.
+Socket option for the send low watermark.
 
- boost::system::error_code open(
- const protocol_type & protocol,
- boost::system::error_code & ec);
+ typedef implementation_defined send_low_watermark;
 
 
-This function opens the socket so that it will use the specified protocol.
 
+Implements the SOL\_SOCKET/SO\_SNDLOWAT socket option.
 
-[heading Parameters]
-
 
-[variablelist
+[heading Examples]
   
-[[protocol][An object specifying which protocol is to be used.]]
+Setting the option:
 
-[[ec][Set to indicate what error occurred, if any.]]
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::send_low_watermark option(1024);
+ socket.set_option(option);
 
-]
 
-[heading Example]
-
 
 
- boost::asio::ip::tcp::socket socket(io_service);
- boost::system::error_code ec;
- socket.open(boost::asio::ip::tcp::v4(), ec);
- if (ec)
- {
- // An error occurred.
- }
+Getting the current option value:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::send_low_watermark option;
+ socket.get_option(option);
+ int size = option.value();
 
 
 
@@ -17710,14 +18607,30 @@
 [endsect]
 
 
+
+[section:service basic_socket_acceptor::service]
+
+
+['Inherited from basic_io_object.]
+
+The service associated with the I/O object.
+
+ service_type & service;
+
+
+
 [endsect]
 
 
-[section:protocol_type basic_stream_socket::protocol_type]
 
-The protocol type.
+[section:service_type basic_socket_acceptor::service_type]
 
- typedef Protocol protocol_type;
+
+['Inherited from basic_io_object.]
+
+The type of the service that will be used to provide I/O operations.
+
+ typedef SocketAcceptorService service_type;
 
 
 
@@ -17725,33 +18638,33 @@
 [endsect]
 
 
-[section:read_some basic_stream_socket::read_some]
+[section:set_option basic_socket_acceptor::set_option]
 
-Read some data from the socket.
+Set an option on the acceptor.
 
   template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link boost_asio.reference.basic_stream_socket.read_some.overload1 read_some]``(
- const MutableBufferSequence & buffers);
+ typename ``[link boost_asio.reference.SettableSocketOption SettableSocketOption]``>
+ void ``[link boost_asio.reference.basic_socket_acceptor.set_option.overload1 set_option]``(
+ const SettableSocketOption & option);
 
   template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link boost_asio.reference.basic_stream_socket.read_some.overload2 read_some]``(
- const MutableBufferSequence & buffers,
+ typename ``[link boost_asio.reference.SettableSocketOption SettableSocketOption]``>
+ boost::system::error_code ``[link boost_asio.reference.basic_socket_acceptor.set_option.overload2 set_option]``(
+ const SettableSocketOption & option,
       boost::system::error_code & ec);
 
 
-[section:overload1 basic_stream_socket::read_some (1 of 2 overloads)]
+[section:overload1 basic_socket_acceptor::set_option (1 of 2 overloads)]
 
-Read some data from the socket.
+Set an option on the acceptor.
 
   template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers);
+ typename ``[link boost_asio.reference.SettableSocketOption SettableSocketOption]``>
+ void set_option(
+ const SettableSocketOption & option);
 
 
-This function is used to read data from the stream socket. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
+This function is used to set an option on the acceptor.
 
 
 [heading Parameters]
@@ -17759,38 +18672,30 @@
 
 [variablelist
   
-[[buffers][One or more buffers into which the data will be read.]]
+[[option][The new option value to be set on the acceptor.]]
 
 ]
 
-[heading Return Value]
-
-The number of bytes read.
-
 [heading Exceptions]
     
 
 [variablelist
   
-[[boost::system::system_error][Thrown on failure. An error code of boost::asio::error::eof indicates that the connection was closed by the peer.]]
+[[boost::system::system_error][Thrown on failure.]]
 
 ]
 
-[heading Remarks]
-
-The read\_some operation may not read all of the requested number of bytes. Consider using the
-[link boost_asio.reference.read read] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
-
 [heading Example]
   
-To read into a single data buffer use the
-[link boost_asio.reference.buffer buffer] function as follows:
+Setting the SOL\_SOCKET/SO\_REUSEADDR option:
+
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
+ boost::asio::ip::tcp::acceptor::reuse_address option(true);
+ acceptor.set_option(option);
 
- socket.read_some(boost::asio::buffer(data, size));
 
 
-See the
-[link boost_asio.reference.buffer buffer] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
 
 
@@ -17798,18 +18703,18 @@
 
 
 
-[section:overload2 basic_stream_socket::read_some (2 of 2 overloads)]
+[section:overload2 basic_socket_acceptor::set_option (2 of 2 overloads)]
 
-Read some data from the socket.
+Set an option on the acceptor.
 
   template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers,
+ typename ``[link boost_asio.reference.SettableSocketOption SettableSocketOption]``>
+ boost::system::error_code set_option(
+ const SettableSocketOption & option,
       boost::system::error_code & ec);
 
 
-This function is used to read data from the stream socket. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
+This function is used to set an option on the acceptor.
 
 
 [heading Parameters]
@@ -17817,161 +18722,131 @@
 
 [variablelist
   
-[[buffers][One or more buffers into which the data will be read.]]
+[[option][The new option value to be set on the acceptor.]]
 
 [[ec][Set to indicate what error occurred, if any.]]
 
 ]
 
-[heading Return Value]
-
-The number of bytes read. Returns 0 if an error occurred.
-
-[heading Remarks]
-
-The read\_some operation may not read all of the requested number of bytes. Consider using the
-[link boost_asio.reference.read read] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
-
-
-
-[endsect]
+[heading Example]
+
+Setting the SOL\_SOCKET/SO\_REUSEADDR option:
 
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
+ boost::asio::ip::tcp::acceptor::reuse_address option(true);
+ boost::system::error_code ec;
+ acceptor.set_option(option, ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
 
-[endsect]
 
-[section:receive basic_stream_socket::receive]
 
-Receive some data on the socket.
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link boost_asio.reference.basic_stream_socket.receive.overload1 receive]``(
- const MutableBufferSequence & buffers);
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link boost_asio.reference.basic_stream_socket.receive.overload2 receive]``(
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags);
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link boost_asio.reference.basic_stream_socket.receive.overload3 receive]``(
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags,
- boost::system::error_code & ec);
+[endsect]
 
 
-[section:overload1 basic_stream_socket::receive (1 of 3 overloads)]
+[endsect]
 
-Receive some data on the socket.
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t receive(
- const MutableBufferSequence & buffers);
+[section:shutdown_type basic_socket_acceptor::shutdown_type]
 
 
-This function is used to receive data on the stream socket. The function call will block until one or more bytes of data has been received successfully, or until an error occurs.
+['Inherited from socket_base.]
 
+Different ways a socket may be shutdown.
 
-[heading Parameters]
-
+ enum shutdown_type
 
+[heading Values]
 [variablelist
-
-[[buffers][One or more buffers into which the data will be received.]]
-
-]
 
-[heading Return Value]
-
-The number of bytes received.
+ [
+ [shutdown_receive]
+ [Shutdown the receive side of the socket. ]
+ ]
 
-[heading Exceptions]
-
+ [
+ [shutdown_send]
+ [Shutdown the send side of the socket. ]
+ ]
 
-[variablelist
-
-[[boost::system::system_error][Thrown on failure. An error code of boost::asio::error::eof indicates that the connection was closed by the peer.]]
+ [
+ [shutdown_both]
+ [Shutdown both send and receive on the socket. ]
+ ]
 
 ]
 
-[heading Remarks]
-
-The receive operation may not receive all of the requested number of bytes. Consider using the
-[link boost_asio.reference.read read] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
-
-[heading Example]
-
-To receive into a single data buffer use the
-[link boost_asio.reference.buffer buffer] function as follows:
-
- socket.receive(boost::asio::buffer(data, size));
 
 
-See the
-[link boost_asio.reference.buffer buffer] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+[endsect]
 
 
 
 [endsect]
 
+[section:basic_socket_iostream basic_socket_iostream]
 
-
-[section:overload2 basic_stream_socket::receive (2 of 3 overloads)]
-
-Receive some data on the socket.
+Iostream interface for a socket.
 
   template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t receive(
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags);
-
+ typename ``[link boost_asio.reference.Protocol Protocol]``,
+ typename ``[link boost_asio.reference.StreamSocketService StreamSocketService]`` = stream_socket_service<Protocol>>
+ class basic_socket_iostream
 
-This function is used to receive data on the stream socket. The function call will block until one or more bytes of data has been received successfully, or until an error occurs.
 
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
-[heading Parameters]
-
-
-[variablelist
+ [
+ [[link boost_asio.reference.basic_socket_iostream.basic_socket_iostream [*basic_socket_iostream]]]
+ [Construct a basic_socket_iostream without establishing a connection. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_iostream.close [*close]]]
+ [Close the connection. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_iostream.connect [*connect]]]
+ [Establish a connection to an endpoint corresponding to a resolver query. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_iostream.rdbuf [*rdbuf]]]
+ [Return a pointer to the underlying streambuf. ]
+ ]
   
-[[buffers][One or more buffers into which the data will be received.]]
-
-[[flags][Flags specifying how the receive call is to be made.]]
-
 ]
 
-[heading Return Value]
-
-The number of bytes received.
-
-[heading Exceptions]
-
+[section:basic_socket_iostream basic_socket_iostream::basic_socket_iostream]
 
-[variablelist
-
-[[boost::system::system_error][Thrown on failure. An error code of boost::asio::error::eof indicates that the connection was closed by the peer.]]
+Construct a basic_socket_iostream without establishing a connection.
 
-]
+ ``[link boost_asio.reference.basic_socket_iostream.basic_socket_iostream.overload1 basic_socket_iostream]``();
 
-[heading Remarks]
-
-The receive operation may not receive all of the requested number of bytes. Consider using the
-[link boost_asio.reference.read read] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
+ template<
+ typename T1,
+ ... ,
+ typename TN>
+ ``[link boost_asio.reference.basic_socket_iostream.basic_socket_iostream.overload2 basic_socket_iostream]``(
+ T1 t1,
+ ... ,
+ TN tn);
 
-[heading Example]
-
-To receive into a single data buffer use the
-[link boost_asio.reference.buffer buffer] function as follows:
 
- socket.receive(boost::asio::buffer(data, size), 0);
+[section:overload1 basic_socket_iostream::basic_socket_iostream (1 of 2 overloads)]
 
+Construct a basic_socket_iostream without establishing a connection.
 
-See the
-[link boost_asio.reference.buffer buffer] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+ basic_socket_iostream();
 
 
 
@@ -17979,316 +18854,490 @@
 
 
 
-[section:overload3 basic_stream_socket::receive (3 of 3 overloads)]
+[section:overload2 basic_socket_iostream::basic_socket_iostream (2 of 2 overloads)]
 
-Receive some data on a connected socket.
+Establish a connection to an endpoint corresponding to a resolver query.
 
   template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t receive(
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags,
- boost::system::error_code & ec);
+ typename T1,
+ ... ,
+ typename TN>
+ basic_socket_iostream(
+ T1 t1,
+ ... ,
+ TN tn);
 
 
-This function is used to receive data on the stream socket. The function call will block until one or more bytes of data has been received successfully, or until an error occurs.
+This constructor automatically establishes a connection based on the supplied resolver query parameters. The arguments are used to construct a resolver query object.
 
 
-[heading Parameters]
-
+[endsect]
 
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received.]]
 
-[[flags][Flags specifying how the receive call is to be made.]]
+[endsect]
 
-[[ec][Set to indicate what error occurred, if any.]]
 
-]
+[section:close basic_socket_iostream::close]
 
-[heading Return Value]
-
-The number of bytes received. Returns 0 if an error occurred.
+Close the connection.
 
-[heading Remarks]
-
-The receive operation may not receive all of the requested number of bytes. Consider using the
-[link boost_asio.reference.read read] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
+ void close();
 
 
 
 [endsect]
 
 
-[endsect]
 
+[section:connect basic_socket_iostream::connect]
 
-[section:receive_buffer_size basic_stream_socket::receive_buffer_size]
+Establish a connection to an endpoint corresponding to a resolver query.
 
+ template<
+ typename T1,
+ ... ,
+ typename TN>
+ void connect(
+ T1 t1,
+ ... ,
+ TN tn);
 
-['Inherited from socket_base.]
 
-Socket option for the receive buffer size of a socket.
+This function automatically establishes a connection based on the supplied resolver query parameters. The arguments are used to construct a resolver query object.
 
- typedef implementation_defined receive_buffer_size;
 
+[endsect]
 
 
-Implements the SOL\_SOCKET/SO\_RCVBUF socket option.
 
+[section:rdbuf basic_socket_iostream::rdbuf]
 
-[heading Examples]
-
-Setting the option:
+Return a pointer to the underlying streambuf.
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::receive_buffer_size option(8192);
- socket.set_option(option);
+ basic_socket_streambuf< Protocol, StreamSocketService > * rdbuf() const;
 
 
 
+[endsect]
 
-Getting the current option value:
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::receive_buffer_size option;
- socket.get_option(option);
- int size = option.value();
 
+[endsect]
 
+[section:basic_socket_streambuf basic_socket_streambuf]
 
+Iostream streambuf for a socket.
 
+ template<
+ typename ``[link boost_asio.reference.Protocol Protocol]``,
+ typename ``[link boost_asio.reference.StreamSocketService StreamSocketService]`` = stream_socket_service<Protocol>>
+ class basic_socket_streambuf :
+ public basic_socket< Protocol, StreamSocketService >
 
 
-[endsect]
+[heading Types]
+[table
+ [[Name][Description]]
 
+ [
 
+ [[link boost_asio.reference.basic_socket_streambuf.broadcast [*broadcast]]]
+ [Socket option to permit sending of broadcast messages. ]
+
+ ]
 
-[section:receive_low_watermark basic_stream_socket::receive_low_watermark]
+ [
 
+ [[link boost_asio.reference.basic_socket_streambuf.bytes_readable [*bytes_readable]]]
+ [IO control command to get the amount of data that can be read without blocking. ]
+
+ ]
 
-['Inherited from socket_base.]
+ [
 
-Socket option for the receive low watermark.
+ [[link boost_asio.reference.basic_socket_streambuf.debug [*debug]]]
+ [Socket option to enable socket-level debugging. ]
+
+ ]
 
- typedef implementation_defined receive_low_watermark;
+ [
 
+ [[link boost_asio.reference.basic_socket_streambuf.do_not_route [*do_not_route]]]
+ [Socket option to prevent routing, use local interfaces only. ]
+
+ ]
 
+ [
 
-Implements the SOL\_SOCKET/SO\_RCVLOWAT socket option.
+ [[link boost_asio.reference.basic_socket_streambuf.enable_connection_aborted [*enable_connection_aborted]]]
+ [Socket option to report aborted connections on accept. ]
+
+ ]
 
+ [
 
-[heading Examples]
+ [[link boost_asio.reference.basic_socket_streambuf.endpoint_type [*endpoint_type]]]
+ [The endpoint type. ]
   
-Setting the option:
+ ]
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::receive_low_watermark option(1024);
- socket.set_option(option);
+ [
 
+ [[link boost_asio.reference.basic_socket_streambuf.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.basic_socket_streambuf.keep_alive [*keep_alive]]]
+ [Socket option to send keep-alives. ]
+
+ ]
 
-Getting the current option value:
+ [
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::receive_low_watermark option;
- socket.get_option(option);
- int size = option.value();
+ [[link boost_asio.reference.basic_socket_streambuf.linger [*linger]]]
+ [Socket option to specify whether the socket lingers on close if unsent data is present. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.basic_socket_streambuf.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_socket is always the lowest layer. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.basic_socket_streambuf.message_flags [*message_flags]]]
+ [Bitmask type for flags that can be passed to send and receive operations. ]
+
+ ]
 
+ [
 
-[endsect]
+ [[link boost_asio.reference.basic_socket_streambuf.native_type [*native_type]]]
+ [The native representation of a socket. ]
+
+ ]
 
+ [
 
-[section:remote_endpoint basic_stream_socket::remote_endpoint]
+ [[link boost_asio.reference.basic_socket_streambuf.non_blocking_io [*non_blocking_io]]]
+ [IO control command to set the blocking mode of the socket. ]
+
+ ]
 
-Get the remote endpoint of the socket.
+ [
 
- endpoint_type ``[link boost_asio.reference.basic_stream_socket.remote_endpoint.overload1 remote_endpoint]``() const;
+ [[link boost_asio.reference.basic_socket_streambuf.protocol_type [*protocol_type]]]
+ [The protocol type. ]
+
+ ]
 
- endpoint_type ``[link boost_asio.reference.basic_stream_socket.remote_endpoint.overload2 remote_endpoint]``(
- boost::system::error_code & ec) const;
+ [
 
+ [[link boost_asio.reference.basic_socket_streambuf.receive_buffer_size [*receive_buffer_size]]]
+ [Socket option for the receive buffer size of a socket. ]
+
+ ]
 
-[section:overload1 basic_stream_socket::remote_endpoint (1 of 2 overloads)]
+ [
 
+ [[link boost_asio.reference.basic_socket_streambuf.receive_low_watermark [*receive_low_watermark]]]
+ [Socket option for the receive low watermark. ]
+
+ ]
 
-['Inherited from basic_socket.]
+ [
 
-Get the remote endpoint of the socket.
+ [[link boost_asio.reference.basic_socket_streambuf.reuse_address [*reuse_address]]]
+ [Socket option to allow the socket to be bound to an address that is already in use. ]
+
+ ]
 
- endpoint_type remote_endpoint() const;
+ [
 
+ [[link boost_asio.reference.basic_socket_streambuf.send_buffer_size [*send_buffer_size]]]
+ [Socket option for the send buffer size of a socket. ]
+
+ ]
 
-This function is used to obtain the remote endpoint of the socket.
+ [
 
+ [[link boost_asio.reference.basic_socket_streambuf.send_low_watermark [*send_low_watermark]]]
+ [Socket option for the send low watermark. ]
+
+ ]
 
-[heading Return Value]
-
-An object that represents the remote endpoint of the socket.
+ [
 
-[heading Exceptions]
-
+ [[link boost_asio.reference.basic_socket_streambuf.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
+
+ ]
 
-[variablelist
+ [
+
+ [[link boost_asio.reference.basic_socket_streambuf.shutdown_type [*shutdown_type]]]
+ [Different ways a socket may be shutdown. ]
   
-[[boost::system::system_error][Thrown on failure.]]
+ ]
 
 ]
 
-[heading Example]
-
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.assign [*assign]]]
+ [Assign an existing native socket to the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.async_connect [*async_connect]]]
+ [Start an asynchronous connect. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.at_mark [*at_mark]]]
+ [Determine whether the socket is at the out-of-band data mark. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.available [*available]]]
+ [Determine the number of bytes available for reading. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.basic_socket_streambuf [*basic_socket_streambuf]]]
+ [Construct a basic_socket_streambuf without establishing a connection. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.bind [*bind]]]
+ [Bind the socket to the given local endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.close [*close]]]
+ [Close the connection. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.connect [*connect]]]
+ [Establish a connection. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.get_option [*get_option]]]
+ [Get an option from the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.io_control [*io_control]]]
+ [Perform an IO control command on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.is_open [*is_open]]]
+ [Determine whether the socket is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.local_endpoint [*local_endpoint]]]
+ [Get the local endpoint of the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.native [*native]]]
+ [Get the native socket representation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.open [*open]]]
+ [Open the socket using the specified protocol. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.remote_endpoint [*remote_endpoint]]]
+ [Get the remote endpoint of the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.set_option [*set_option]]]
+ [Set an option on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.shutdown [*shutdown]]]
+ [Disable sends or receives on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_streambuf._basic_socket_streambuf [*~basic_socket_streambuf]]]
+ [Destructor flushes buffered data. ]
+ ]
+
+]
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::ip::tcp::endpoint endpoint = socket.remote_endpoint();
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.overflow [*overflow]]]
+ []
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.setbuf [*setbuf]]]
+ []
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.sync [*sync]]]
+ []
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.underflow [*underflow]]]
+ []
+ ]
+
+]
 
+[heading Data Members]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.max_connections [*max_connections]]]
+ [The maximum length of the queue of pending incoming connections. ]
+ ]
 
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.message_do_not_route [*message_do_not_route]]]
+ [Specify that the data should not be subject to routing. ]
+ ]
 
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.message_out_of_band [*message_out_of_band]]]
+ [Process out-of-band data. ]
+ ]
 
-[endsect]
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.message_peek [*message_peek]]]
+ [Peek at incoming data without removing it from the input queue. ]
+ ]
 
+]
 
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
 
-[section:overload2 basic_stream_socket::remote_endpoint (2 of 2 overloads)]
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
 
+ [
+ [[link boost_asio.reference.basic_socket_streambuf.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
 
-['Inherited from basic_socket.]
+]
 
-Get the remote endpoint of the socket.
+[section:assign basic_socket_streambuf::assign]
 
- endpoint_type remote_endpoint(
- boost::system::error_code & ec) const;
+Assign an existing native socket to the socket.
 
+ void ``[link boost_asio.reference.basic_socket_streambuf.assign.overload1 assign]``(
+ const protocol_type & protocol,
+ const native_type & native_socket);
 
-This function is used to obtain the remote endpoint of the socket.
+ boost::system::error_code ``[link boost_asio.reference.basic_socket_streambuf.assign.overload2 assign]``(
+ const protocol_type & protocol,
+ const native_type & native_socket,
+ boost::system::error_code & ec);
 
 
-[heading Parameters]
-
+[section:overload1 basic_socket_streambuf::assign (1 of 2 overloads)]
 
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
 
-]
+['Inherited from basic_socket.]
 
-[heading Return Value]
-
-An object that represents the remote endpoint of the socket. Returns a default-constructed endpoint object if an error occurred.
+Assign an existing native socket to the socket.
 
-[heading Example]
-
+ void assign(
+ const protocol_type & protocol,
+ const native_type & native_socket);
 
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::system::error_code ec;
- boost::asio::ip::tcp::endpoint endpoint = socket.remote_endpoint(ec);
- if (ec)
- {
- // An error occurred.
- }
 
+[endsect]
 
 
 
+[section:overload2 basic_socket_streambuf::assign (2 of 2 overloads)]
 
 
-[endsect]
+['Inherited from basic_socket.]
 
+Assign an existing native socket to the socket.
 
-[endsect]
+ boost::system::error_code assign(
+ const protocol_type & protocol,
+ const native_type & native_socket,
+ boost::system::error_code & ec);
 
 
-[section:reuse_address basic_stream_socket::reuse_address]
 
+[endsect]
 
-['Inherited from socket_base.]
 
-Socket option to allow the socket to be bound to an address that is already in use.
+[endsect]
 
- typedef implementation_defined reuse_address;
 
+[section:async_connect basic_socket_streambuf::async_connect]
 
 
-Implements the SOL\_SOCKET/SO\_REUSEADDR socket option.
+['Inherited from basic_socket.]
 
+Start an asynchronous connect.
 
-[heading Examples]
-
-Setting the option:
-
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
- boost::asio::socket_base::reuse_address option(true);
- acceptor.set_option(option);
-
-
-
-
-Getting the current option value:
-
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
- boost::asio::socket_base::reuse_address option;
- acceptor.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-[endsect]
-
-
-[section:send basic_stream_socket::send]
-
-Send some data on the socket.
-
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link boost_asio.reference.basic_stream_socket.send.overload1 send]``(
- const ConstBufferSequence & buffers);
-
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link boost_asio.reference.basic_stream_socket.send.overload2 send]``(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags);
-
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link boost_asio.reference.basic_stream_socket.send.overload3 send]``(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags,
- boost::system::error_code & ec);
-
-
-[section:overload1 basic_stream_socket::send (1 of 3 overloads)]
-
-Send some data on the socket.
+ void async_connect(
+ const endpoint_type & peer_endpoint,
+ ConnectHandler handler);
 
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t send(
- const ConstBufferSequence & buffers);
 
+This function is used to asynchronously connect a socket to the specified remote endpoint. The function call always returns immediately.
 
-This function is used to send data on the stream socket. The function call will block until one or more bytes of the data has been sent successfully, or an until error occurs.
+The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is returned to the closed state.
 
 
 [heading Parameters]
@@ -18296,118 +19345,100 @@
 
 [variablelist
   
-[[buffers][One or more data buffers to be sent on the socket.]]
+[[peer_endpoint][The remote endpoint to which the socket will be connected. Copies will be made of the endpoint object as required.]]
 
-]
+[[handler][The handler to be called when the connection operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error // Result of operation
+ );
 
-[heading Return Value]
-
-The number of bytes sent.
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
 
-[heading Exceptions]
-
+]
 
-[variablelist
+[heading Example]
   
-[[boost::system::system_error][Thrown on failure.]]
 
-]
 
-[heading Remarks]
-
-The send operation may not transmit all of the data to the peer. Consider using the
-[link boost_asio.reference.write write] function if you need to ensure that all data is written before the blocking operation completes.
+ void connect_handler(const boost::system::error_code& error)
+ {
+ if (!error)
+ {
+ // Connect succeeded.
+ }
+ }
 
-[heading Example]
-
-To send a single data buffer use the
-[link boost_asio.reference.buffer buffer] function as follows:
+ ...
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ boost::asio::ip::tcp::endpoint endpoint(
+ boost::asio::ip::address::from_string("1.2.3.4"), 12345);
+ socket.async_connect(endpoint, connect_handler);
 
- socket.send(boost::asio::buffer(data, size));
 
 
-See the
-[link boost_asio.reference.buffer buffer] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
 
 
 [endsect]
 
 
+[section:at_mark basic_socket_streambuf::at_mark]
 
-[section:overload2 basic_stream_socket::send (2 of 3 overloads)]
+Determine whether the socket is at the out-of-band data mark.
 
-Send some data on the socket.
+ bool ``[link boost_asio.reference.basic_socket_streambuf.at_mark.overload1 at_mark]``() const;
 
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t send(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags);
+ bool ``[link boost_asio.reference.basic_socket_streambuf.at_mark.overload2 at_mark]``(
+ boost::system::error_code & ec) const;
 
 
-This function is used to send data on the stream socket. The function call will block until one or more bytes of the data has been sent successfully, or an until error occurs.
+[section:overload1 basic_socket_streambuf::at_mark (1 of 2 overloads)]
 
 
-[heading Parameters]
-
+['Inherited from basic_socket.]
 
-[variablelist
-
-[[buffers][One or more data buffers to be sent on the socket.]]
+Determine whether the socket is at the out-of-band data mark.
 
-[[flags][Flags specifying how the send call is to be made.]]
+ bool at_mark() const;
+
+
+This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
 
-]
 
 [heading Return Value]
       
-The number of bytes sent.
+A bool indicating whether the socket is at the out-of-band data mark.
 
 [heading Exceptions]
     
 
 [variablelist
   
-[[boost::system::system_error][Thrown on failure.]]
+[[boost::system::system_error][Thrown on failure. ]]
 
 ]
 
-[heading Remarks]
-
-The send operation may not transmit all of the data to the peer. Consider using the
-[link boost_asio.reference.write write] function if you need to ensure that all data is written before the blocking operation completes.
-
-[heading Example]
-
-To send a single data buffer use the
-[link boost_asio.reference.buffer buffer] function as follows:
-
- socket.send(boost::asio::buffer(data, size), 0);
-
 
-See the
-[link boost_asio.reference.buffer buffer] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
+[endsect]
 
 
-[endsect]
 
+[section:overload2 basic_socket_streambuf::at_mark (2 of 2 overloads)]
 
 
-[section:overload3 basic_stream_socket::send (3 of 3 overloads)]
+['Inherited from basic_socket.]
 
-Send some data on the socket.
+Determine whether the socket is at the out-of-band data mark.
 
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t send(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags,
- boost::system::error_code & ec);
+ bool at_mark(
+ boost::system::error_code & ec) const;
 
 
-This function is used to send data on the stream socket. The function call will block until one or more bytes of the data has been sent successfully, or an until error occurs.
+This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
 
 
 [heading Parameters]
@@ -18415,22 +19446,13 @@
 
 [variablelist
   
-[[buffers][One or more data buffers to be sent on the socket.]]
-
-[[flags][Flags specifying how the send call is to be made.]]
-
 [[ec][Set to indicate what error occurred, if any.]]
 
 ]
 
 [heading Return Value]
       
-The number of bytes sent. Returns 0 if an error occurred.
-
-[heading Remarks]
-
-The send operation may not transmit all of the data to the peer. Consider using the
-[link boost_asio.reference.write write] function if you need to ensure that all data is written before the blocking operation completes.
+A bool indicating whether the socket is at the out-of-band data mark.
 
 
 
@@ -18439,43 +19461,41 @@
 
 [endsect]
 
+[section:available basic_socket_streambuf::available]
 
-[section:send_buffer_size basic_stream_socket::send_buffer_size]
-
-
-['Inherited from socket_base.]
-
-Socket option for the send buffer size of a socket.
+Determine the number of bytes available for reading.
 
- typedef implementation_defined send_buffer_size;
+ std::size_t ``[link boost_asio.reference.basic_socket_streambuf.available.overload1 available]``() const;
 
+ std::size_t ``[link boost_asio.reference.basic_socket_streambuf.available.overload2 available]``(
+ boost::system::error_code & ec) const;
 
 
-Implements the SOL\_SOCKET/SO\_SNDBUF socket option.
+[section:overload1 basic_socket_streambuf::available (1 of 2 overloads)]
 
 
-[heading Examples]
-
-Setting the option:
+['Inherited from basic_socket.]
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::send_buffer_size option(8192);
- socket.set_option(option);
+Determine the number of bytes available for reading.
 
+ std::size_t available() const;
 
 
+This function is used to determine the number of bytes that may be read without blocking.
 
-Getting the current option value:
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::send_buffer_size option;
- socket.get_option(option);
- int size = option.value();
+[heading Return Value]
+
+The number of bytes that may be read without blocking, or 0 if an error occurs.
 
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
 
+]
 
 
 
@@ -18483,88 +19503,76 @@
 
 
 
-[section:send_low_watermark basic_stream_socket::send_low_watermark]
+[section:overload2 basic_socket_streambuf::available (2 of 2 overloads)]
 
 
-['Inherited from socket_base.]
+['Inherited from basic_socket.]
 
-Socket option for the send low watermark.
+Determine the number of bytes available for reading.
 
- typedef implementation_defined send_low_watermark;
+ std::size_t available(
+ boost::system::error_code & ec) const;
 
 
+This function is used to determine the number of bytes that may be read without blocking.
 
-Implements the SOL\_SOCKET/SO\_SNDLOWAT socket option.
 
+[heading Parameters]
+
 
-[heading Examples]
+[variablelist
   
-Setting the option:
-
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::send_low_watermark option(1024);
- socket.set_option(option);
-
-
-
-
-Getting the current option value:
-
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::send_low_watermark option;
- socket.get_option(option);
- int size = option.value();
-
+[[ec][Set to indicate what error occurred, if any.]]
 
+]
 
+[heading Return Value]
+
+The number of bytes that may be read without blocking, or 0 if an error occurs.
 
 
 
 [endsect]
 
 
+[endsect]
 
-[section:service_type basic_stream_socket::service_type]
-
-
-['Inherited from basic_io_object.]
 
-The type of the service that will be used to provide I/O operations.
+[section:basic_socket_streambuf basic_socket_streambuf::basic_socket_streambuf]
 
- typedef StreamSocketService service_type;
+Construct a basic_socket_streambuf without establishing a connection.
 
+ basic_socket_streambuf();
 
 
 
 [endsect]
 
 
-[section:set_option basic_stream_socket::set_option]
+[section:bind basic_socket_streambuf::bind]
 
-Set an option on the socket.
+Bind the socket to the given local endpoint.
 
- void ``[link boost_asio.reference.basic_stream_socket.set_option.overload1 set_option]``(
- const SettableSocketOption & option);
+ void ``[link boost_asio.reference.basic_socket_streambuf.bind.overload1 bind]``(
+ const endpoint_type & endpoint);
 
- boost::system::error_code ``[link boost_asio.reference.basic_stream_socket.set_option.overload2 set_option]``(
- const SettableSocketOption & option,
+ boost::system::error_code ``[link boost_asio.reference.basic_socket_streambuf.bind.overload2 bind]``(
+ const endpoint_type & endpoint,
       boost::system::error_code & ec);
 
 
-[section:overload1 basic_stream_socket::set_option (1 of 2 overloads)]
+[section:overload1 basic_socket_streambuf::bind (1 of 2 overloads)]
 
 
 ['Inherited from basic_socket.]
 
-Set an option on the socket.
+Bind the socket to the given local endpoint.
 
- void set_option(
- const SettableSocketOption & option);
+ void bind(
+ const endpoint_type & endpoint);
 
 
-This function is used to set an option on the socket.
+This function binds the socket to the specified endpoint on the local machine.
 
 
 [heading Parameters]
@@ -18572,7 +19580,7 @@
 
 [variablelist
   
-[[option][The new option value to be set on the socket.]]
+[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
 
 ]
 
@@ -18587,12 +19595,12 @@
 
 [heading Example]
   
-Setting the IPPROTO\_TCP/TCP\_NODELAY option:
+
 
    boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::ip::tcp::no_delay option(true);
- socket.set_option(option);
+ socket.open(boost::asio::ip::tcp::v4());
+ socket.bind(boost::asio::ip::tcp::endpoint(
+ boost::asio::ip::tcp::v4(), 12345));
 
 
 
@@ -18603,19 +19611,19 @@
 
 
 
-[section:overload2 basic_stream_socket::set_option (2 of 2 overloads)]
+[section:overload2 basic_socket_streambuf::bind (2 of 2 overloads)]
 
 
 ['Inherited from basic_socket.]
 
-Set an option on the socket.
+Bind the socket to the given local endpoint.
 
- boost::system::error_code set_option(
- const SettableSocketOption & option,
+ boost::system::error_code bind(
+ const endpoint_type & endpoint,
       boost::system::error_code & ec);
 
 
-This function is used to set an option on the socket.
+This function binds the socket to the specified endpoint on the local machine.
 
 
 [heading Parameters]
@@ -18623,7 +19631,7 @@
 
 [variablelist
   
-[[option][The new option value to be set on the socket.]]
+[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
 
 [[ec][Set to indicate what error occurred, if any.]]
 
@@ -18631,13 +19639,13 @@
 
 [heading Example]
   
-Setting the IPPROTO\_TCP/TCP\_NODELAY option:
+
 
    boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::ip::tcp::no_delay option(true);
+ socket.open(boost::asio::ip::tcp::v4());
    boost::system::error_code ec;
- socket.set_option(option, ec);
+ socket.bind(boost::asio::ip::tcp::endpoint(
+ boost::asio::ip::tcp::v4(), 12345), ec);
    if (ec)
    {
      // An error occurred.
@@ -18653,57 +19661,40 @@
 
 [endsect]
 
-[section:shutdown basic_stream_socket::shutdown]
-
-Disable sends or receives on the socket.
-
- void ``[link boost_asio.reference.basic_stream_socket.shutdown.overload1 shutdown]``(
- shutdown_type what);
-
- boost::system::error_code ``[link boost_asio.reference.basic_stream_socket.shutdown.overload2 shutdown]``(
- shutdown_type what,
- boost::system::error_code & ec);
 
-
-[section:overload1 basic_stream_socket::shutdown (1 of 2 overloads)]
+[section:broadcast basic_socket_streambuf::broadcast]
 
 
-['Inherited from basic_socket.]
+['Inherited from socket_base.]
 
-Disable sends or receives on the socket.
+Socket option to permit sending of broadcast messages.
 
- void shutdown(
- shutdown_type what);
+ typedef implementation_defined broadcast;
 
 
-This function is used to disable send operations, receive operations, or both.
 
+Implements the SOL\_SOCKET/SO\_BROADCAST socket option.
 
-[heading Parameters]
-
 
-[variablelist
+[heading Examples]
   
-[[what][Determines what types of operation will no longer be allowed.]]
+Setting the option:
 
-]
+ boost::asio::ip::udp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::broadcast option(true);
+ socket.set_option(option);
 
-[heading Exceptions]
-
 
-[variablelist
-
-[[boost::system::system_error][Thrown on failure.]]
 
-]
 
-[heading Example]
-
-Shutting down the send side of the socket:
+Getting the current option value:
 
- boost::asio::ip::tcp::socket socket(io_service);
+ boost::asio::ip::udp::socket socket(io_service);
    ...
- socket.shutdown(boost::asio::ip::tcp::socket::shutdown_send);
+ boost::asio::socket_base::broadcast option;
+ socket.get_option(option);
+ bool is_set = option.value();
 
 
 
@@ -18714,44 +19705,29 @@
 
 
 
-[section:overload2 basic_stream_socket::shutdown (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-Disable sends or receives on the socket.
+[section:bytes_readable basic_socket_streambuf::bytes_readable]
 
- boost::system::error_code shutdown(
- shutdown_type what,
- boost::system::error_code & ec);
 
+['Inherited from socket_base.]
 
-This function is used to disable send operations, receive operations, or both.
+IO control command to get the amount of data that can be read without blocking.
 
+ typedef implementation_defined bytes_readable;
 
-[heading Parameters]
-
 
-[variablelist
-
-[[what][Determines what types of operation will no longer be allowed.]]
 
-[[ec][Set to indicate what error occurred, if any.]]
+Implements the FIONREAD IO control command.
 
-]
 
 [heading Example]
   
-Shutting down the send side of the socket:
 
- boost::asio::ip::tcp::socket socket(io_service);
+
+ boost::asio::ip::tcp::socket socket(io_service);
    ...
- boost::system::error_code ec;
- socket.shutdown(boost::asio::ip::tcp::socket::shutdown_send, ec);
- if (ec)
- {
- // An error occurred.
- }
+ boost::asio::socket_base::bytes_readable command(true);
+ socket.io_control(command);
+ std::size_t bytes_readable = command.get();
 
 
 
@@ -18761,128 +19737,146 @@
 [endsect]
 
 
-[endsect]
+[section:cancel basic_socket_streambuf::cancel]
 
+Cancel all asynchronous operations associated with the socket.
 
-[section:shutdown_type basic_stream_socket::shutdown_type]
+ void ``[link boost_asio.reference.basic_socket_streambuf.cancel.overload1 cancel]``();
 
+ boost::system::error_code ``[link boost_asio.reference.basic_socket_streambuf.cancel.overload2 cancel]``(
+ boost::system::error_code & ec);
 
-['Inherited from socket_base.]
 
-Different ways a socket may be shutdown.
+[section:overload1 basic_socket_streambuf::cancel (1 of 2 overloads)]
 
- enum shutdown_type
 
-[heading Values]
-[variablelist
+['Inherited from basic_socket.]
 
- [
- [shutdown_receive]
- [Shutdown the receive side of the socket. ]
- ]
+Cancel all asynchronous operations associated with the socket.
 
- [
- [shutdown_send]
- [Shutdown the send side of the socket. ]
- ]
+ void cancel();
 
- [
- [shutdown_both]
- [Shutdown both send and receive on the socket. ]
- ]
+
+This function causes all outstanding asynchronous connect, send and receive operations to finish immediately, and the handlers for cancelled operations will be passed the boost::asio::error::operation\_aborted error.
+
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
 
 ]
 
+[heading Remarks]
+
+Calls to cancel() will always fail with boost::asio::error::operation\_not\_supported when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless BOOST\_ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use:
 
+* It will only cancel asynchronous operations that were initiated in the current thread.
 
-[endsect]
+* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed.
 
+For portable cancellation, consider using one of the following alternatives:
 
-[section:write_some basic_stream_socket::write_some]
 
-Write some data to the socket.
+* Disable asio's I/O completion port backend by defining BOOST_ASIO_DISABLE_IOCP.
 
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link boost_asio.reference.basic_stream_socket.write_some.overload1 write_some]``(
- const ConstBufferSequence & buffers);
+* Use the close() function to simultaneously cancel the outstanding operations and close the socket.
 
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link boost_asio.reference.basic_stream_socket.write_some.overload2 write_some]``(
- const ConstBufferSequence & buffers,
- boost::system::error_code & ec);
+When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above.
 
 
-[section:overload1 basic_stream_socket::write_some (1 of 2 overloads)]
+[endsect]
 
-Write some data to the socket.
 
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers);
 
+[section:overload2 basic_socket_streambuf::cancel (2 of 2 overloads)]
 
-This function is used to write data to the stream socket. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
 
+['Inherited from basic_socket.]
 
-[heading Parameters]
-
+Cancel all asynchronous operations associated with the socket.
 
-[variablelist
-
-[[buffers][One or more data buffers to be written to the socket.]]
+ boost::system::error_code cancel(
+ boost::system::error_code & ec);
 
-]
 
-[heading Return Value]
-
-The number of bytes written.
+This function causes all outstanding asynchronous connect, send and receive operations to finish immediately, and the handlers for cancelled operations will be passed the boost::asio::error::operation\_aborted error.
 
-[heading Exceptions]
+
+[heading Parameters]
     
 
 [variablelist
   
-[[boost::system::system_error][Thrown on failure. An error code of boost::asio::error::eof indicates that the connection was closed by the peer.]]
+[[ec][Set to indicate what error occurred, if any.]]
 
 ]
 
 [heading Remarks]
       
-The write\_some operation may not transmit all of the data to the peer. Consider using the
-[link boost_asio.reference.write write] function if you need to ensure that all data is written before the blocking operation completes.
+Calls to cancel() will always fail with boost::asio::error::operation\_not\_supported when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless BOOST\_ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use:
 
-[heading Example]
-
-To write a single data buffer use the
-[link boost_asio.reference.buffer buffer] function as follows:
+* It will only cancel asynchronous operations that were initiated in the current thread.
 
- socket.write_some(boost::asio::buffer(data, size));
+* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed.
 
+For portable cancellation, consider using one of the following alternatives:
 
-See the
-[link boost_asio.reference.buffer buffer] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
+* Disable asio's I/O completion port backend by defining BOOST_ASIO_DISABLE_IOCP.
 
+* Use the close() function to simultaneously cancel the outstanding operations and close the socket.
 
-[endsect]
+When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above.
 
 
+[endsect]
 
-[section:overload2 basic_stream_socket::write_some (2 of 2 overloads)]
 
-Write some data to the socket.
+[endsect]
 
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers,
+[section:close basic_socket_streambuf::close]
+
+Close the connection.
+
+ basic_socket_streambuf< Protocol, StreamSocketService > * ``[link boost_asio.reference.basic_socket_streambuf.close.overload1 close]``();
+
+ boost::system::error_code ``[link boost_asio.reference.basic_socket_streambuf.close.overload2 close]``(
       boost::system::error_code & ec);
 
 
-This function is used to write data to the stream socket. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
+[section:overload1 basic_socket_streambuf::close (1 of 2 overloads)]
+
+Close the connection.
+
+ basic_socket_streambuf< Protocol, StreamSocketService > * close();
+
+
+
+[heading Return Value]
+
+this if a connection was successfully established, a null pointer otherwise.
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_socket_streambuf::close (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Close the socket.
+
+ boost::system::error_code close(
+ boost::system::error_code & ec);
+
+
+This function is used to close the socket. Any asynchronous send, receive or connect operations will be cancelled immediately, and will complete with the boost::asio::error::operation\_aborted error.
 
 
 [heading Parameters]
@@ -18890,20 +19884,29 @@
 
 [variablelist
   
-[[buffers][One or more data buffers to be written to the socket.]]
-
 [[ec][Set to indicate what error occurred, if any.]]
 
 ]
 
-[heading Return Value]
-
-The number of bytes written. Returns 0 if an error occurred.
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::system::error_code ec;
+ socket.close(ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
+
+
+
 
 [heading Remarks]
       
-The write\_some operation may not transmit all of the data to the peer. Consider using the
-[link boost_asio.reference.write write] function if you need to ensure that all data is written before the blocking operation completes.
+For portable behaviour with respect to graceful closure of a connected socket, call shutdown() before closing the socket.
 
 
 
@@ -18912,127 +19915,164 @@
 
 [endsect]
 
+[section:connect basic_socket_streambuf::connect]
+
+Establish a connection.
+
+ basic_socket_streambuf< Protocol, StreamSocketService > * ``[link boost_asio.reference.basic_socket_streambuf.connect.overload1 connect]``(
+ const endpoint_type & endpoint);
+
+ template<
+ typename T1,
+ ... ,
+ typename TN>
+ basic_socket_streambuf< Protocol, StreamSocketService > * ``[link boost_asio.reference.basic_socket_streambuf.connect.overload2 connect]``(
+ T1 t1,
+ ... ,
+ TN tn);
+
+ boost::system::error_code ``[link boost_asio.reference.basic_socket_streambuf.connect.overload3 connect]``(
+ const endpoint_type & peer_endpoint,
+ boost::system::error_code & ec);
+
+
+[section:overload1 basic_socket_streambuf::connect (1 of 3 overloads)]
+
+Establish a connection.
+
+ basic_socket_streambuf< Protocol, StreamSocketService > * connect(
+ const endpoint_type & endpoint);
+
+
+This function establishes a connection to the specified endpoint.
+
+
+[heading Return Value]
+
+this if a connection was successfully established, a null pointer otherwise.
+
+
 
 [endsect]
 
-[section:basic_streambuf basic_streambuf]
 
-Automatically resizable buffer class based on std::streambuf.
+
+[section:overload2 basic_socket_streambuf::connect (2 of 3 overloads)]
+
+Establish a connection.
 
   template<
- typename Allocator = std::allocator<char>>
- class basic_streambuf :
- noncopyable
+ typename T1,
+ ... ,
+ typename TN>
+ basic_socket_streambuf< Protocol, StreamSocketService > * connect(
+ T1 t1,
+ ... ,
+ TN tn);
 
 
-[heading Types]
-[table
- [[Name][Description]]
+This function automatically establishes a connection based on the supplied resolver query parameters. The arguments are used to construct a resolver query object.
 
- [
 
- [[link boost_asio.reference.basic_streambuf.const_buffers_type [*const_buffers_type]]]
- [The type used to represent the get area as a list of buffers. ]
-
- ]
+[heading Return Value]
+
+this if a connection was successfully established, a null pointer otherwise.
 
- [
 
- [[link boost_asio.reference.basic_streambuf.mutable_buffers_type [*mutable_buffers_type]]]
- [The type used to represent the put area as a list of buffers. ]
-
- ]
 
-]
+[endsect]
 
-[heading Member Functions]
-[table
- [[Name][Description]]
 
- [
- [[link boost_asio.reference.basic_streambuf.basic_streambuf [*basic_streambuf]]]
- [Construct a buffer with a specified maximum size. ]
- ]
-
- [
- [[link boost_asio.reference.basic_streambuf.commit [*commit]]]
- [Move the start of the put area by the specified number of characters. ]
- ]
-
- [
- [[link boost_asio.reference.basic_streambuf.consume [*consume]]]
- [Move the start of the get area by the specified number of characters. ]
- ]
-
- [
- [[link boost_asio.reference.basic_streambuf.data [*data]]]
- [Get a list of buffers that represents the get area. ]
- ]
-
- [
- [[link boost_asio.reference.basic_streambuf.max_size [*max_size]]]
- [Return the maximum size of the buffer. ]
- ]
-
- [
- [[link boost_asio.reference.basic_streambuf.prepare [*prepare]]]
- [Get a list of buffers that represents the put area, with the given size. ]
- ]
-
- [
- [[link boost_asio.reference.basic_streambuf.size [*size]]]
- [Return the size of the get area in characters. ]
- ]
+
+[section:overload3 basic_socket_streambuf::connect (3 of 3 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Connect the socket to the specified endpoint.
+
+ boost::system::error_code connect(
+ const endpoint_type & peer_endpoint,
+ boost::system::error_code & ec);
+
+
+This function is used to connect a socket to the specified remote endpoint. The function call will block until the connection is successfully made or an error occurs.
+
+The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is returned to the closed state.
+
+
+[heading Parameters]
+
+
+[variablelist
   
+[[peer_endpoint][The remote endpoint to which the socket will be connected.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
 ]
 
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ boost::asio::ip::tcp::endpoint endpoint(
+ boost::asio::ip::address::from_string("1.2.3.4"), 12345);
+ boost::system::error_code ec;
+ socket.connect(endpoint, ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
 
-[section:basic_streambuf basic_streambuf::basic_streambuf]
 
-Construct a buffer with a specified maximum size.
 
- basic_streambuf(
- std::size_t max_size = (std::numeric_limits< std::size_t >::max)(),
- const Allocator & allocator = Allocator());
 
 
 
 [endsect]
 
 
+[endsect]
 
-[section:commit basic_streambuf::commit]
 
-Move the start of the put area by the specified number of characters.
+[section:debug basic_socket_streambuf::debug]
 
- void commit(
- std::size_t n);
 
+['Inherited from socket_base.]
 
+Socket option to enable socket-level debugging.
 
-[endsect]
+ typedef implementation_defined debug;
 
 
 
-[section:const_buffers_type basic_streambuf::const_buffers_type]
+Implements the SOL\_SOCKET/SO\_DEBUG socket option.
 
-The type used to represent the get area as a list of buffers.
 
- typedef implementation_defined const_buffers_type;
+[heading Examples]
+
+Setting the option:
 
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::debug option(true);
+ socket.set_option(option);
 
 
 
-[endsect]
 
+Getting the current option value:
 
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::debug option;
+ socket.get_option(option);
+ bool is_set = option.value();
 
-[section:consume basic_streambuf::consume]
 
-Move the start of the get area by the specified number of characters.
 
- void consume(
- std::size_t n);
 
 
 
@@ -19040,23 +20080,42 @@
 
 
 
-[section:data basic_streambuf::data]
+[section:do_not_route basic_socket_streambuf::do_not_route]
 
-Get a list of buffers that represents the get area.
 
- const_buffers_type data() const;
+['Inherited from socket_base.]
+
+Socket option to prevent routing, use local interfaces only.
 
+ typedef implementation_defined do_not_route;
 
 
-[endsect]
 
+Implements the SOL\_SOCKET/SO\_DONTROUTE socket option.
 
 
-[section:max_size basic_streambuf::max_size]
+[heading Examples]
+
+Setting the option:
+
+ boost::asio::ip::udp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::do_not_route option(true);
+ socket.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::udp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::do_not_route option;
+ socket.get_option(option);
+ bool is_set = option.value();
+
 
-Return the maximum size of the buffer.
 
- std::size_t max_size() const;
 
 
 
@@ -19064,25 +20123,42 @@
 
 
 
-[section:mutable_buffers_type basic_streambuf::mutable_buffers_type]
+[section:enable_connection_aborted basic_socket_streambuf::enable_connection_aborted]
 
-The type used to represent the put area as a list of buffers.
 
- typedef implementation_defined mutable_buffers_type;
+['Inherited from socket_base.]
 
+Socket option to report aborted connections on accept.
 
+ typedef implementation_defined enable_connection_aborted;
 
 
-[endsect]
 
+Implements a custom socket option that determines whether or not an accept operation is permitted to fail with boost::asio::error::connection\_aborted. By default the option is false.
 
 
-[section:prepare basic_streambuf::prepare]
+[heading Examples]
+
+Setting the option:
+
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
+ boost::asio::socket_base::enable_connection_aborted option(true);
+ acceptor.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
+ boost::asio::socket_base::enable_connection_aborted option;
+ acceptor.get_option(option);
+ bool is_set = option.value();
+
 
-Get a list of buffers that represents the put area, with the given size.
 
- mutable_buffers_type prepare(
- std::size_t size);
 
 
 
@@ -19090,11 +20166,12 @@
 
 
 
-[section:size basic_streambuf::size]
+[section:endpoint_type basic_socket_streambuf::endpoint_type]
 
-Return the size of the get area in characters.
+The endpoint type.
+
+ typedef Protocol::endpoint endpoint_type;
 
- std::size_t size() const;
 
 
 
@@ -19102,189 +20179,18162 @@
 
 
 
-[endsect]
+[section:get_io_service basic_socket_streambuf::get_io_service]
 
-[section:buffer buffer]
 
-Create a new modifiable buffer from an existing buffer.
+['Inherited from basic_io_object.]
 
- mutable_buffers_1 ``[link boost_asio.reference.buffer.overload1 buffer]``(
- const mutable_buffer & b);
+Get the io_service associated with the object.
 
- mutable_buffers_1 ``[link boost_asio.reference.buffer.overload2 buffer]``(
- const mutable_buffer & b,
- std::size_t max_size_in_bytes);
+ boost::asio::io_service & get_io_service();
 
- const_buffers_1 ``[link boost_asio.reference.buffer.overload3 buffer]``(
- const const_buffer & b);
 
- const_buffers_1 ``[link boost_asio.reference.buffer.overload4 buffer]``(
- const const_buffer & b,
- std::size_t max_size_in_bytes);
+This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
 
- mutable_buffers_1 ``[link boost_asio.reference.buffer.overload5 buffer]``(
- void * data,
- std::size_t size_in_bytes);
 
- const_buffers_1 ``[link boost_asio.reference.buffer.overload6 buffer]``(
- const void * data,
- std::size_t size_in_bytes);
+[heading Return Value]
+
+A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
 
- template<
- typename PodType,
- std::size_t N>
- mutable_buffers_1 ``[link boost_asio.reference.buffer.overload7 buffer]``(
- PodType & data);
 
- template<
- typename PodType,
- std::size_t N>
- mutable_buffers_1 ``[link boost_asio.reference.buffer.overload8 buffer]``(
- PodType & data,
- std::size_t max_size_in_bytes);
 
- template<
- typename PodType,
- std::size_t N>
- const_buffers_1 ``[link boost_asio.reference.buffer.overload9 buffer]``(
- const PodType & data);
+[endsect]
 
- template<
- typename PodType,
- std::size_t N>
- const_buffers_1 ``[link boost_asio.reference.buffer.overload10 buffer]``(
- const PodType & data,
- std::size_t max_size_in_bytes);
 
- template<
- typename PodType,
- std::size_t N>
- mutable_buffers_1 ``[link boost_asio.reference.buffer.overload11 buffer]``(
- boost::array< PodType, N > & data);
+[section:get_option basic_socket_streambuf::get_option]
 
- template<
- typename PodType,
- std::size_t N>
- mutable_buffers_1 ``[link boost_asio.reference.buffer.overload12 buffer]``(
- boost::array< PodType, N > & data,
- std::size_t max_size_in_bytes);
+Get an option from the socket.
 
- template<
- typename PodType,
- std::size_t N>
- const_buffers_1 ``[link boost_asio.reference.buffer.overload13 buffer]``(
- boost::array< const PodType, N > & data);
+ void ``[link boost_asio.reference.basic_socket_streambuf.get_option.overload1 get_option]``(
+ GettableSocketOption & option) const;
 
- template<
- typename PodType,
- std::size_t N>
- const_buffers_1 ``[link boost_asio.reference.buffer.overload14 buffer]``(
- boost::array< const PodType, N > & data,
- std::size_t max_size_in_bytes);
+ boost::system::error_code ``[link boost_asio.reference.basic_socket_streambuf.get_option.overload2 get_option]``(
+ GettableSocketOption & option,
+ boost::system::error_code & ec) const;
 
- template<
- typename PodType,
- std::size_t N>
- const_buffers_1 ``[link boost_asio.reference.buffer.overload15 buffer]``(
- const boost::array< PodType, N > & data);
 
- template<
- typename PodType,
- std::size_t N>
- const_buffers_1 ``[link boost_asio.reference.buffer.overload16 buffer]``(
- const boost::array< PodType, N > & data,
- std::size_t max_size_in_bytes);
+[section:overload1 basic_socket_streambuf::get_option (1 of 2 overloads)]
 
- template<
- typename PodType,
- typename Allocator>
- mutable_buffers_1 ``[link boost_asio.reference.buffer.overload17 buffer]``(
- std::vector< PodType, Allocator > & data);
 
- template<
- typename PodType,
- typename Allocator>
- mutable_buffers_1 ``[link boost_asio.reference.buffer.overload18 buffer]``(
- std::vector< PodType, Allocator > & data,
- std::size_t max_size_in_bytes);
+['Inherited from basic_socket.]
 
- template<
- typename PodType,
- typename Allocator>
- const_buffers_1 ``[link boost_asio.reference.buffer.overload19 buffer]``(
- const std::vector< PodType, Allocator > & data);
+Get an option from the socket.
 
- template<
- typename PodType,
- typename Allocator>
- const_buffers_1 ``[link boost_asio.reference.buffer.overload20 buffer]``(
- const std::vector< PodType, Allocator > & data,
- std::size_t max_size_in_bytes);
+ void get_option(
+ GettableSocketOption & option) const;
 
- const_buffers_1 ``[link boost_asio.reference.buffer.overload21 buffer]``(
- const std::string & data);
 
- const_buffers_1 ``[link boost_asio.reference.buffer.overload22 buffer]``(
- const std::string & data,
- std::size_t max_size_in_bytes);
+This function is used to get the current value of an option on the socket.
 
-The simplest use case involves reading or writing a single buffer of a specified size:
 
+[heading Parameters]
+
+
+[variablelist
+
+[[option][The option value to be obtained from the socket.]]
 
+]
 
- sock.write(boost::asio::buffer(data, size));
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
 
+]
 
+[heading Example]
+
+Getting the value of the SOL\_SOCKET/SO\_KEEPALIVE option:
 
-In the above example, the return value of boost::asio::buffer meets the requirements of the ConstBufferSequence concept so that it may be directly passed to the socket's write function. A buffer created for modifiable memory also meets the requirements of the MutableBufferSequence concept.
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::ip::tcp::socket::keep_alive option;
+ socket.get_option(option);
+ bool is_set = option.get();
 
-An individual buffer may be created from a builtin array, std::vector or boost::array of POD elements. This helps prevent buffer overruns by automatically determining the size of the buffer:
 
 
 
- char d1[128];
- size_t bytes_transferred = sock.read(boost::asio::buffer(d1));
 
- std::vector<char> d2(128);
- bytes_transferred = sock.read(boost::asio::buffer(d2));
 
- boost::array<char, 128> d3;
- bytes_transferred = sock.read(boost::asio::buffer(d3));
+[endsect]
 
 
 
+[section:overload2 basic_socket_streambuf::get_option (2 of 2 overloads)]
 
-To read or write using multiple buffers (i.e. scatter-gather I/O), multiple buffer objects may be assigned into a container that supports the MutableBufferSequence (for read) or ConstBufferSequence (for write) concepts:
 
+['Inherited from basic_socket.]
 
+Get an option from the socket.
 
- char d1[128];
- std::vector<char> d2(128);
- boost::array<char, 128> d3;
+ boost::system::error_code get_option(
+ GettableSocketOption & option,
+ boost::system::error_code & ec) const;
 
- boost::array<mutable_buffer, 3> bufs1 = {
- boost::asio::buffer(d1),
- boost::asio::buffer(d2),
- boost::asio::buffer(d3) };
- bytes_transferred = sock.read(bufs1);
 
- std::vector<const_buffer> bufs2;
- bufs2.push_back(boost::asio::buffer(d1));
- bufs2.push_back(boost::asio::buffer(d2));
- bufs2.push_back(boost::asio::buffer(d3));
- bytes_transferred = sock.write(bufs2);
+This function is used to get the current value of an option on the socket.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[option][The option value to be obtained from the socket.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Example]
+
+Getting the value of the SOL\_SOCKET/SO\_KEEPALIVE option:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::ip::tcp::socket::keep_alive option;
+ boost::system::error_code ec;
+ socket.get_option(option, ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
+ bool is_set = option.get();
+
+
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:implementation basic_socket_streambuf::implementation]
+
+
+['Inherited from basic_io_object.]
+
+The underlying implementation of the I/O object.
+
+ implementation_type implementation;
+
+
+
+[endsect]
+
+
+
+[section:implementation_type basic_socket_streambuf::implementation_type]
+
+
+['Inherited from basic_io_object.]
+
+The underlying implementation type of I/O object.
+
+ typedef service_type::implementation_type implementation_type;
+
+
+
+
+[endsect]
+
+
+[section:io_control basic_socket_streambuf::io_control]
+
+Perform an IO control command on the socket.
+
+ void ``[link boost_asio.reference.basic_socket_streambuf.io_control.overload1 io_control]``(
+ IoControlCommand & command);
+
+ boost::system::error_code ``[link boost_asio.reference.basic_socket_streambuf.io_control.overload2 io_control]``(
+ IoControlCommand & command,
+ boost::system::error_code & ec);
+
+
+[section:overload1 basic_socket_streambuf::io_control (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Perform an IO control command on the socket.
+
+ void io_control(
+ IoControlCommand & command);
+
+
+This function is used to execute an IO control command on the socket.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[command][The IO control command to be performed on the socket.]]
+
+]
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Example]
+
+Getting the number of bytes ready to read:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::ip::tcp::socket::bytes_readable command;
+ socket.io_control(command);
+ std::size_t bytes_readable = command.get();
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_socket_streambuf::io_control (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Perform an IO control command on the socket.
+
+ boost::system::error_code io_control(
+ IoControlCommand & command,
+ boost::system::error_code & ec);
+
+
+This function is used to execute an IO control command on the socket.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[command][The IO control command to be performed on the socket.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Example]
+
+Getting the number of bytes ready to read:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::ip::tcp::socket::bytes_readable command;
+ boost::system::error_code ec;
+ socket.io_control(command, ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
+ std::size_t bytes_readable = command.get();
+
+
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:io_service basic_socket_streambuf::io_service]
+
+
+['Inherited from basic_io_object.]
+
+(Deprecated: use get_io_service().) Get the io_service associated with the object.
+
+ boost::asio::io_service & io_service();
+
+
+This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
+
+
+[heading Return Value]
+
+A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
+
+
+
+[endsect]
+
+
+
+[section:is_open basic_socket_streambuf::is_open]
+
+
+['Inherited from basic_socket.]
+
+Determine whether the socket is open.
+
+ bool is_open() const;
+
+
+
+[endsect]
+
+
+
+[section:keep_alive basic_socket_streambuf::keep_alive]
+
+
+['Inherited from socket_base.]
+
+Socket option to send keep-alives.
+
+ typedef implementation_defined keep_alive;
+
+
+
+Implements the SOL\_SOCKET/SO\_KEEPALIVE socket option.
+
+
+[heading Examples]
+
+Setting the option:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::keep_alive option(true);
+ socket.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::keep_alive option;
+ socket.get_option(option);
+ bool is_set = option.value();
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:linger basic_socket_streambuf::linger]
+
+
+['Inherited from socket_base.]
+
+Socket option to specify whether the socket lingers on close if unsent data is present.
+
+ typedef implementation_defined linger;
+
+
+
+Implements the SOL\_SOCKET/SO\_LINGER socket option.
+
+
+[heading Examples]
+
+Setting the option:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::linger option(true, 30);
+ socket.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::linger option;
+ socket.get_option(option);
+ bool is_set = option.enabled();
+ unsigned short timeout = option.timeout();
+
+
+
+
+
+
+[endsect]
+
+
+[section:local_endpoint basic_socket_streambuf::local_endpoint]
+
+Get the local endpoint of the socket.
+
+ endpoint_type ``[link boost_asio.reference.basic_socket_streambuf.local_endpoint.overload1 local_endpoint]``() const;
+
+ endpoint_type ``[link boost_asio.reference.basic_socket_streambuf.local_endpoint.overload2 local_endpoint]``(
+ boost::system::error_code & ec) const;
+
+
+[section:overload1 basic_socket_streambuf::local_endpoint (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Get the local endpoint of the socket.
+
+ endpoint_type local_endpoint() const;
+
+
+This function is used to obtain the locally bound endpoint of the socket.
+
+
+[heading Return Value]
+
+An object that represents the local endpoint of the socket.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::ip::tcp::endpoint endpoint = socket.local_endpoint();
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_socket_streambuf::local_endpoint (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Get the local endpoint of the socket.
+
+ endpoint_type local_endpoint(
+ boost::system::error_code & ec) const;
+
+
+This function is used to obtain the locally bound endpoint of the socket.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Return Value]
+
+An object that represents the local endpoint of the socket. Returns a default-constructed endpoint object if an error occurred.
+
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::system::error_code ec;
+ boost::asio::ip::tcp::endpoint endpoint = socket.local_endpoint(ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
+
+
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:lowest_layer basic_socket_streambuf::lowest_layer]
+
+
+['Inherited from basic_socket.]
+
+Get a reference to the lowest layer.
+
+ lowest_layer_type & lowest_layer();
+
+
+This function returns a reference to the lowest layer in a stack of layers. Since a basic_socket cannot contain any further layers, it simply returns a reference to itself.
+
+
+[heading Return Value]
+
+A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
+
+
+
+[endsect]
+
+
+
+[section:lowest_layer_type basic_socket_streambuf::lowest_layer_type]
+
+
+['Inherited from basic_socket.]
+
+A basic_socket is always the lowest layer.
+
+ typedef basic_socket< Protocol, StreamSocketService > lowest_layer_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.broadcast [*broadcast]]]
+ [Socket option to permit sending of broadcast messages. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.bytes_readable [*bytes_readable]]]
+ [IO control command to get the amount of data that can be read without blocking. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.debug [*debug]]]
+ [Socket option to enable socket-level debugging. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.do_not_route [*do_not_route]]]
+ [Socket option to prevent routing, use local interfaces only. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.enable_connection_aborted [*enable_connection_aborted]]]
+ [Socket option to report aborted connections on accept. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.endpoint_type [*endpoint_type]]]
+ [The endpoint type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.keep_alive [*keep_alive]]]
+ [Socket option to send keep-alives. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.linger [*linger]]]
+ [Socket option to specify whether the socket lingers on close if unsent data is present. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_socket is always the lowest layer. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.message_flags [*message_flags]]]
+ [Bitmask type for flags that can be passed to send and receive operations. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.native_type [*native_type]]]
+ [The native representation of a socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.non_blocking_io [*non_blocking_io]]]
+ [IO control command to set the blocking mode of the socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.protocol_type [*protocol_type]]]
+ [The protocol type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.receive_buffer_size [*receive_buffer_size]]]
+ [Socket option for the receive buffer size of a socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.receive_low_watermark [*receive_low_watermark]]]
+ [Socket option for the receive low watermark. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.reuse_address [*reuse_address]]]
+ [Socket option to allow the socket to be bound to an address that is already in use. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.send_buffer_size [*send_buffer_size]]]
+ [Socket option for the send buffer size of a socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.send_low_watermark [*send_low_watermark]]]
+ [Socket option for the send low watermark. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.shutdown_type [*shutdown_type]]]
+ [Different ways a socket may be shutdown. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_socket.assign [*assign]]]
+ [Assign an existing native socket to the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.async_connect [*async_connect]]]
+ [Start an asynchronous connect. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.at_mark [*at_mark]]]
+ [Determine whether the socket is at the out-of-band data mark. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.available [*available]]]
+ [Determine the number of bytes available for reading. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.basic_socket [*basic_socket]]]
+ [Construct a basic_socket without opening it. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.bind [*bind]]]
+ [Bind the socket to the given local endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.close [*close]]]
+ [Close the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.connect [*connect]]]
+ [Connect the socket to the specified endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.get_option [*get_option]]]
+ [Get an option from the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.io_control [*io_control]]]
+ [Perform an IO control command on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.is_open [*is_open]]]
+ [Determine whether the socket is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.local_endpoint [*local_endpoint]]]
+ [Get the local endpoint of the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.native [*native]]]
+ [Get the native socket representation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.open [*open]]]
+ [Open the socket using the specified protocol. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.remote_endpoint [*remote_endpoint]]]
+ [Get the remote endpoint of the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.set_option [*set_option]]]
+ [Set an option on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.shutdown [*shutdown]]]
+ [Disable sends or receives on the socket. ]
+ ]
+
+]
+
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_socket._basic_socket [*~basic_socket]]]
+ [Protected destructor to prevent deletion through this type. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_socket.max_connections [*max_connections]]]
+ [The maximum length of the queue of pending incoming connections. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.message_do_not_route [*message_do_not_route]]]
+ [Specify that the data should not be subject to routing. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.message_out_of_band [*message_out_of_band]]]
+ [Process out-of-band data. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.message_peek [*message_peek]]]
+ [Peek at incoming data without removing it from the input queue. ]
+ ]
+
+]
+
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_socket.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
+
+]
+
+The basic_socket class template provides functionality that is common to both stream-oriented and datagram-oriented sockets.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
+
+
+
+
+[endsect]
+
+
+
+[section:max_connections basic_socket_streambuf::max_connections]
+
+
+['Inherited from socket_base.]
+
+The maximum length of the queue of pending incoming connections.
+
+ static const int max_connections = implementation_defined;
+
+
+
+[endsect]
+
+
+
+[section:message_do_not_route basic_socket_streambuf::message_do_not_route]
+
+
+['Inherited from socket_base.]
+
+Specify that the data should not be subject to routing.
+
+ static const int message_do_not_route = implementation_defined;
+
+
+
+[endsect]
+
+
+
+[section:message_flags basic_socket_streambuf::message_flags]
+
+
+['Inherited from socket_base.]
+
+Bitmask type for flags that can be passed to send and receive operations.
+
+ typedef int message_flags;
+
+
+
+
+[endsect]
+
+
+
+[section:message_out_of_band basic_socket_streambuf::message_out_of_band]
+
+
+['Inherited from socket_base.]
+
+Process out-of-band data.
+
+ static const int message_out_of_band = implementation_defined;
+
+
+
+[endsect]
+
+
+
+[section:message_peek basic_socket_streambuf::message_peek]
+
+
+['Inherited from socket_base.]
+
+Peek at incoming data without removing it from the input queue.
+
+ static const int message_peek = implementation_defined;
+
+
+
+[endsect]
+
+
+
+[section:native basic_socket_streambuf::native]
+
+
+['Inherited from basic_socket.]
+
+Get the native socket representation.
+
+ native_type native();
+
+
+This function may be used to obtain the underlying representation of the socket. This is intended to allow access to native socket functionality that is not otherwise provided.
+
+
+[endsect]
+
+
+
+[section:native_type basic_socket_streambuf::native_type]
+
+
+['Inherited from basic_socket.]
+
+The native representation of a socket.
+
+ typedef StreamSocketService::native_type native_type;
+
+
+
+
+[endsect]
+
+
+
+[section:non_blocking_io basic_socket_streambuf::non_blocking_io]
+
+
+['Inherited from socket_base.]
+
+IO control command to set the blocking mode of the socket.
+
+ typedef implementation_defined non_blocking_io;
+
+
+
+Implements the FIONBIO IO control command.
+
+
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::non_blocking_io command(true);
+ socket.io_control(command);
+
+
+
+
+
+
+[endsect]
+
+
+[section:open basic_socket_streambuf::open]
+
+Open the socket using the specified protocol.
+
+ void ``[link boost_asio.reference.basic_socket_streambuf.open.overload1 open]``(
+ const protocol_type & protocol = protocol_type());
+
+ boost::system::error_code ``[link boost_asio.reference.basic_socket_streambuf.open.overload2 open]``(
+ const protocol_type & protocol,
+ boost::system::error_code & ec);
+
+
+[section:overload1 basic_socket_streambuf::open (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Open the socket using the specified protocol.
+
+ void open(
+ const protocol_type & protocol = protocol_type());
+
+
+This function opens the socket so that it will use the specified protocol.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[protocol][An object specifying protocol parameters to be used.]]
+
+]
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ socket.open(boost::asio::ip::tcp::v4());
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_socket_streambuf::open (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Open the socket using the specified protocol.
+
+ boost::system::error_code open(
+ const protocol_type & protocol,
+ boost::system::error_code & ec);
+
+
+This function opens the socket so that it will use the specified protocol.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[protocol][An object specifying which protocol is to be used.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ boost::system::error_code ec;
+ socket.open(boost::asio::ip::tcp::v4(), ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
+
+
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:overflow basic_socket_streambuf::overflow]
+
+
+
+ int_type overflow(
+ int_type c);
+
+
+
+[endsect]
+
+
+
+[section:protocol_type basic_socket_streambuf::protocol_type]
+
+
+['Inherited from basic_socket.]
+
+The protocol type.
+
+ typedef Protocol protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:receive_buffer_size basic_socket_streambuf::receive_buffer_size]
+
+
+['Inherited from socket_base.]
+
+Socket option for the receive buffer size of a socket.
+
+ typedef implementation_defined receive_buffer_size;
+
+
+
+Implements the SOL\_SOCKET/SO\_RCVBUF socket option.
+
+
+[heading Examples]
+
+Setting the option:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::receive_buffer_size option(8192);
+ socket.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::receive_buffer_size option;
+ socket.get_option(option);
+ int size = option.value();
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:receive_low_watermark basic_socket_streambuf::receive_low_watermark]
+
+
+['Inherited from socket_base.]
+
+Socket option for the receive low watermark.
+
+ typedef implementation_defined receive_low_watermark;
+
+
+
+Implements the SOL\_SOCKET/SO\_RCVLOWAT socket option.
+
+
+[heading Examples]
+
+Setting the option:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::receive_low_watermark option(1024);
+ socket.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::receive_low_watermark option;
+ socket.get_option(option);
+ int size = option.value();
+
+
+
+
+
+
+[endsect]
+
+
+[section:remote_endpoint basic_socket_streambuf::remote_endpoint]
+
+Get the remote endpoint of the socket.
+
+ endpoint_type ``[link boost_asio.reference.basic_socket_streambuf.remote_endpoint.overload1 remote_endpoint]``() const;
+
+ endpoint_type ``[link boost_asio.reference.basic_socket_streambuf.remote_endpoint.overload2 remote_endpoint]``(
+ boost::system::error_code & ec) const;
+
+
+[section:overload1 basic_socket_streambuf::remote_endpoint (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Get the remote endpoint of the socket.
+
+ endpoint_type remote_endpoint() const;
+
+
+This function is used to obtain the remote endpoint of the socket.
+
+
+[heading Return Value]
+
+An object that represents the remote endpoint of the socket.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::ip::tcp::endpoint endpoint = socket.remote_endpoint();
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_socket_streambuf::remote_endpoint (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Get the remote endpoint of the socket.
+
+ endpoint_type remote_endpoint(
+ boost::system::error_code & ec) const;
+
+
+This function is used to obtain the remote endpoint of the socket.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Return Value]
+
+An object that represents the remote endpoint of the socket. Returns a default-constructed endpoint object if an error occurred.
+
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::system::error_code ec;
+ boost::asio::ip::tcp::endpoint endpoint = socket.remote_endpoint(ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
+
+
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:reuse_address basic_socket_streambuf::reuse_address]
+
+
+['Inherited from socket_base.]
+
+Socket option to allow the socket to be bound to an address that is already in use.
+
+ typedef implementation_defined reuse_address;
+
+
+
+Implements the SOL\_SOCKET/SO\_REUSEADDR socket option.
+
+
+[heading Examples]
+
+Setting the option:
+
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
+ boost::asio::socket_base::reuse_address option(true);
+ acceptor.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
+ boost::asio::socket_base::reuse_address option;
+ acceptor.get_option(option);
+ bool is_set = option.value();
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:send_buffer_size basic_socket_streambuf::send_buffer_size]
+
+
+['Inherited from socket_base.]
+
+Socket option for the send buffer size of a socket.
+
+ typedef implementation_defined send_buffer_size;
+
+
+
+Implements the SOL\_SOCKET/SO\_SNDBUF socket option.
+
+
+[heading Examples]
+
+Setting the option:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::send_buffer_size option(8192);
+ socket.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::send_buffer_size option;
+ socket.get_option(option);
+ int size = option.value();
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:send_low_watermark basic_socket_streambuf::send_low_watermark]
+
+
+['Inherited from socket_base.]
+
+Socket option for the send low watermark.
+
+ typedef implementation_defined send_low_watermark;
+
+
+
+Implements the SOL\_SOCKET/SO\_SNDLOWAT socket option.
+
+
+[heading Examples]
+
+Setting the option:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::send_low_watermark option(1024);
+ socket.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::send_low_watermark option;
+ socket.get_option(option);
+ int size = option.value();
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:service basic_socket_streambuf::service]
+
+
+['Inherited from basic_io_object.]
+
+The service associated with the I/O object.
+
+ service_type & service;
+
+
+
+[endsect]
+
+
+
+[section:service_type basic_socket_streambuf::service_type]
+
+
+['Inherited from basic_io_object.]
+
+The type of the service that will be used to provide I/O operations.
+
+ typedef StreamSocketService service_type;
+
+
+
+
+[endsect]
+
+
+[section:set_option basic_socket_streambuf::set_option]
+
+Set an option on the socket.
+
+ void ``[link boost_asio.reference.basic_socket_streambuf.set_option.overload1 set_option]``(
+ const SettableSocketOption & option);
+
+ boost::system::error_code ``[link boost_asio.reference.basic_socket_streambuf.set_option.overload2 set_option]``(
+ const SettableSocketOption & option,
+ boost::system::error_code & ec);
+
+
+[section:overload1 basic_socket_streambuf::set_option (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Set an option on the socket.
+
+ void set_option(
+ const SettableSocketOption & option);
+
+
+This function is used to set an option on the socket.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[option][The new option value to be set on the socket.]]
+
+]
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Example]
+
+Setting the IPPROTO\_TCP/TCP\_NODELAY option:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::ip::tcp::no_delay option(true);
+ socket.set_option(option);
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_socket_streambuf::set_option (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Set an option on the socket.
+
+ boost::system::error_code set_option(
+ const SettableSocketOption & option,
+ boost::system::error_code & ec);
+
+
+This function is used to set an option on the socket.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[option][The new option value to be set on the socket.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Example]
+
+Setting the IPPROTO\_TCP/TCP\_NODELAY option:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::ip::tcp::no_delay option(true);
+ boost::system::error_code ec;
+ socket.set_option(option, ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
+
+
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:setbuf basic_socket_streambuf::setbuf]
+
+
+
+ std::streambuf * setbuf(
+ char_type * s,
+ std::streamsize n);
+
+
+
+[endsect]
+
+
+[section:shutdown basic_socket_streambuf::shutdown]
+
+Disable sends or receives on the socket.
+
+ void ``[link boost_asio.reference.basic_socket_streambuf.shutdown.overload1 shutdown]``(
+ shutdown_type what);
+
+ boost::system::error_code ``[link boost_asio.reference.basic_socket_streambuf.shutdown.overload2 shutdown]``(
+ shutdown_type what,
+ boost::system::error_code & ec);
+
+
+[section:overload1 basic_socket_streambuf::shutdown (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Disable sends or receives on the socket.
+
+ void shutdown(
+ shutdown_type what);
+
+
+This function is used to disable send operations, receive operations, or both.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[what][Determines what types of operation will no longer be allowed.]]
+
+]
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Example]
+
+Shutting down the send side of the socket:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ socket.shutdown(boost::asio::ip::tcp::socket::shutdown_send);
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_socket_streambuf::shutdown (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Disable sends or receives on the socket.
+
+ boost::system::error_code shutdown(
+ shutdown_type what,
+ boost::system::error_code & ec);
+
+
+This function is used to disable send operations, receive operations, or both.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[what][Determines what types of operation will no longer be allowed.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Example]
+
+Shutting down the send side of the socket:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::system::error_code ec;
+ socket.shutdown(boost::asio::ip::tcp::socket::shutdown_send, ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
+
+
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:shutdown_type basic_socket_streambuf::shutdown_type]
+
+
+['Inherited from socket_base.]
+
+Different ways a socket may be shutdown.
+
+ enum shutdown_type
+
+[heading Values]
+[variablelist
+
+ [
+ [shutdown_receive]
+ [Shutdown the receive side of the socket. ]
+ ]
+
+ [
+ [shutdown_send]
+ [Shutdown the send side of the socket. ]
+ ]
+
+ [
+ [shutdown_both]
+ [Shutdown both send and receive on the socket. ]
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:sync basic_socket_streambuf::sync]
+
+
+
+ int sync();
+
+
+
+[endsect]
+
+
+
+[section:underflow basic_socket_streambuf::underflow]
+
+
+
+ int_type underflow();
+
+
+
+[endsect]
+
+
+
+[section:_basic_socket_streambuf basic_socket_streambuf::~basic_socket_streambuf]
+
+Destructor flushes buffered data.
+
+ virtual ~basic_socket_streambuf();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:basic_stream_socket basic_stream_socket]
+
+Provides stream-oriented socket functionality.
+
+ template<
+ typename ``[link boost_asio.reference.Protocol Protocol]``,
+ typename ``[link boost_asio.reference.StreamSocketService StreamSocketService]`` = stream_socket_service<Protocol>>
+ class basic_stream_socket :
+ public basic_socket< Protocol, StreamSocketService >
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.basic_stream_socket.broadcast [*broadcast]]]
+ [Socket option to permit sending of broadcast messages. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_stream_socket.bytes_readable [*bytes_readable]]]
+ [IO control command to get the amount of data that can be read without blocking. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_stream_socket.debug [*debug]]]
+ [Socket option to enable socket-level debugging. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_stream_socket.do_not_route [*do_not_route]]]
+ [Socket option to prevent routing, use local interfaces only. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_stream_socket.enable_connection_aborted [*enable_connection_aborted]]]
+ [Socket option to report aborted connections on accept. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_stream_socket.endpoint_type [*endpoint_type]]]
+ [The endpoint type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_stream_socket.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_stream_socket.keep_alive [*keep_alive]]]
+ [Socket option to send keep-alives. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_stream_socket.linger [*linger]]]
+ [Socket option to specify whether the socket lingers on close if unsent data is present. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_stream_socket.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_socket is always the lowest layer. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_stream_socket.message_flags [*message_flags]]]
+ [Bitmask type for flags that can be passed to send and receive operations. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_stream_socket.native_type [*native_type]]]
+ [The native representation of a socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_stream_socket.non_blocking_io [*non_blocking_io]]]
+ [IO control command to set the blocking mode of the socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_stream_socket.protocol_type [*protocol_type]]]
+ [The protocol type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_stream_socket.receive_buffer_size [*receive_buffer_size]]]
+ [Socket option for the receive buffer size of a socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_stream_socket.receive_low_watermark [*receive_low_watermark]]]
+ [Socket option for the receive low watermark. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_stream_socket.reuse_address [*reuse_address]]]
+ [Socket option to allow the socket to be bound to an address that is already in use. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_stream_socket.send_buffer_size [*send_buffer_size]]]
+ [Socket option for the send buffer size of a socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_stream_socket.send_low_watermark [*send_low_watermark]]]
+ [Socket option for the send low watermark. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_stream_socket.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_stream_socket.shutdown_type [*shutdown_type]]]
+ [Different ways a socket may be shutdown. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.assign [*assign]]]
+ [Assign an existing native socket to the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.async_connect [*async_connect]]]
+ [Start an asynchronous connect. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.async_read_some [*async_read_some]]]
+ [Start an asynchronous read. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.async_receive [*async_receive]]]
+ [Start an asynchronous receive. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.async_send [*async_send]]]
+ [Start an asynchronous send. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.async_write_some [*async_write_some]]]
+ [Start an asynchronous write. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.at_mark [*at_mark]]]
+ [Determine whether the socket is at the out-of-band data mark. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.available [*available]]]
+ [Determine the number of bytes available for reading. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.basic_stream_socket [*basic_stream_socket]]]
+ [Construct a basic_stream_socket without opening it. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.bind [*bind]]]
+ [Bind the socket to the given local endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.close [*close]]]
+ [Close the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.connect [*connect]]]
+ [Connect the socket to the specified endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.get_option [*get_option]]]
+ [Get an option from the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.io_control [*io_control]]]
+ [Perform an IO control command on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.is_open [*is_open]]]
+ [Determine whether the socket is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.local_endpoint [*local_endpoint]]]
+ [Get the local endpoint of the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.native [*native]]]
+ [Get the native socket representation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.open [*open]]]
+ [Open the socket using the specified protocol. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.read_some [*read_some]]]
+ [Read some data from the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.receive [*receive]]]
+ [Receive some data on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.remote_endpoint [*remote_endpoint]]]
+ [Get the remote endpoint of the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.send [*send]]]
+ [Send some data on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.set_option [*set_option]]]
+ [Set an option on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.shutdown [*shutdown]]]
+ [Disable sends or receives on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.write_some [*write_some]]]
+ [Write some data to the socket. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.max_connections [*max_connections]]]
+ [The maximum length of the queue of pending incoming connections. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.message_do_not_route [*message_do_not_route]]]
+ [Specify that the data should not be subject to routing. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.message_out_of_band [*message_out_of_band]]]
+ [Process out-of-band data. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.message_peek [*message_peek]]]
+ [Peek at incoming data without removing it from the input queue. ]
+ ]
+
+]
+
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
+
+]
+
+The basic_stream_socket class template provides asynchronous and blocking stream-oriented socket functionality.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
+
+
+[section:assign basic_stream_socket::assign]
+
+Assign an existing native socket to the socket.
+
+ void ``[link boost_asio.reference.basic_stream_socket.assign.overload1 assign]``(
+ const protocol_type & protocol,
+ const native_type & native_socket);
+
+ boost::system::error_code ``[link boost_asio.reference.basic_stream_socket.assign.overload2 assign]``(
+ const protocol_type & protocol,
+ const native_type & native_socket,
+ boost::system::error_code & ec);
+
+
+[section:overload1 basic_stream_socket::assign (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Assign an existing native socket to the socket.
+
+ void assign(
+ const protocol_type & protocol,
+ const native_type & native_socket);
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_stream_socket::assign (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Assign an existing native socket to the socket.
+
+ boost::system::error_code assign(
+ const protocol_type & protocol,
+ const native_type & native_socket,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:async_connect basic_stream_socket::async_connect]
+
+
+['Inherited from basic_socket.]
+
+Start an asynchronous connect.
+
+ void async_connect(
+ const endpoint_type & peer_endpoint,
+ ConnectHandler handler);
+
+
+This function is used to asynchronously connect a socket to the specified remote endpoint. The function call always returns immediately.
+
+The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is returned to the closed state.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[peer_endpoint][The remote endpoint to which the socket will be connected. Copies will be made of the endpoint object as required.]]
+
+[[handler][The handler to be called when the connection operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error // Result of operation
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
+
+]
+
+[heading Example]
+
+
+
+ void connect_handler(const boost::system::error_code& error)
+ {
+ if (!error)
+ {
+ // Connect succeeded.
+ }
+ }
+
+ ...
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ boost::asio::ip::tcp::endpoint endpoint(
+ boost::asio::ip::address::from_string("1.2.3.4"), 12345);
+ socket.async_connect(endpoint, connect_handler);
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:async_read_some basic_stream_socket::async_read_some]
+
+Start an asynchronous read.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_read_some(
+ const MutableBufferSequence & buffers,
+ ReadHandler handler);
+
+
+This function is used to asynchronously read data from the stream socket. The function call always returns immediately.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[buffers][One or more buffers into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+
+[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ std::size_t bytes_transferred // Number of bytes read.
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
+
+]
+
+[heading Remarks]
+
+The read operation may not read all of the requested number of bytes. Consider using the
+[link boost_asio.reference.async_read async_read] function if you need to ensure that the requested amount of data is read before the asynchronous operation completes.
+
+[heading Example]
+
+To read into a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ socket.async_read_some(boost::asio::buffer(data, size), handler);
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+
+
+
+[endsect]
+
+
+[section:async_receive basic_stream_socket::async_receive]
+
+Start an asynchronous receive.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void ``[link boost_asio.reference.basic_stream_socket.async_receive.overload1 async_receive]``(
+ const MutableBufferSequence & buffers,
+ ReadHandler handler);
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void ``[link boost_asio.reference.basic_stream_socket.async_receive.overload2 async_receive]``(
+ const MutableBufferSequence & buffers,
+ socket_base::message_flags flags,
+ ReadHandler handler);
+
+
+[section:overload1 basic_stream_socket::async_receive (1 of 2 overloads)]
+
+Start an asynchronous receive.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_receive(
+ const MutableBufferSequence & buffers,
+ ReadHandler handler);
+
+
+This function is used to asynchronously receive data from the stream socket. The function call always returns immediately.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[buffers][One or more buffers into which the data will be received. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+
+[[handler][The handler to be called when the receive operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ std::size_t bytes_transferred // Number of bytes received.
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
+
+]
+
+[heading Remarks]
+
+The receive operation may not receive all of the requested number of bytes. Consider using the
+[link boost_asio.reference.async_read async_read] function if you need to ensure that the requested amount of data is received before the asynchronous operation completes.
+
+[heading Example]
+
+To receive into a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ socket.async_receive(boost::asio::buffer(data, size), handler);
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_stream_socket::async_receive (2 of 2 overloads)]
+
+Start an asynchronous receive.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_receive(
+ const MutableBufferSequence & buffers,
+ socket_base::message_flags flags,
+ ReadHandler handler);
+
+
+This function is used to asynchronously receive data from the stream socket. The function call always returns immediately.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[buffers][One or more buffers into which the data will be received. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+
+[[flags][Flags specifying how the receive call is to be made.]]
+
+[[handler][The handler to be called when the receive operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ std::size_t bytes_transferred // Number of bytes received.
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
+
+]
+
+[heading Remarks]
+
+The receive operation may not receive all of the requested number of bytes. Consider using the
+[link boost_asio.reference.async_read async_read] function if you need to ensure that the requested amount of data is received before the asynchronous operation completes.
+
+[heading Example]
+
+To receive into a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ socket.async_receive(boost::asio::buffer(data, size), 0, handler);
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:async_send basic_stream_socket::async_send]
+
+Start an asynchronous send.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void ``[link boost_asio.reference.basic_stream_socket.async_send.overload1 async_send]``(
+ const ConstBufferSequence & buffers,
+ WriteHandler handler);
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void ``[link boost_asio.reference.basic_stream_socket.async_send.overload2 async_send]``(
+ const ConstBufferSequence & buffers,
+ socket_base::message_flags flags,
+ WriteHandler handler);
+
+
+[section:overload1 basic_stream_socket::async_send (1 of 2 overloads)]
+
+Start an asynchronous send.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_send(
+ const ConstBufferSequence & buffers,
+ WriteHandler handler);
+
+
+This function is used to asynchronously send data on the stream socket. The function call always returns immediately.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[buffers][One or more data buffers to be sent on the socket. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+
+[[handler][The handler to be called when the send operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ std::size_t bytes_transferred // Number of bytes sent.
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
+
+]
+
+[heading Remarks]
+
+The send operation may not transmit all of the data to the peer. Consider using the
+[link boost_asio.reference.async_write async_write] function if you need to ensure that all data is written before the asynchronous operation completes.
+
+[heading Example]
+
+To send a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ socket.async_send(boost::asio::buffer(data, size), handler);
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_stream_socket::async_send (2 of 2 overloads)]
+
+Start an asynchronous send.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_send(
+ const ConstBufferSequence & buffers,
+ socket_base::message_flags flags,
+ WriteHandler handler);
+
+
+This function is used to asynchronously send data on the stream socket. The function call always returns immediately.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[buffers][One or more data buffers to be sent on the socket. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+
+[[flags][Flags specifying how the send call is to be made.]]
+
+[[handler][The handler to be called when the send operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ std::size_t bytes_transferred // Number of bytes sent.
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
+
+]
+
+[heading Remarks]
+
+The send operation may not transmit all of the data to the peer. Consider using the
+[link boost_asio.reference.async_write async_write] function if you need to ensure that all data is written before the asynchronous operation completes.
+
+[heading Example]
+
+To send a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ socket.async_send(boost::asio::buffer(data, size), 0, handler);
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:async_write_some basic_stream_socket::async_write_some]
+
+Start an asynchronous write.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_write_some(
+ const ConstBufferSequence & buffers,
+ WriteHandler handler);
+
+
+This function is used to asynchronously write data to the stream socket. The function call always returns immediately.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[buffers][One or more data buffers to be written to the socket. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+
+[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ std::size_t bytes_transferred // Number of bytes written.
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
+
+]
+
+[heading Remarks]
+
+The write operation may not transmit all of the data to the peer. Consider using the
+[link boost_asio.reference.async_write async_write] function if you need to ensure that all data is written before the asynchronous operation completes.
+
+[heading Example]
+
+To write a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ socket.async_write_some(boost::asio::buffer(data, size), handler);
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+
+
+
+[endsect]
+
+
+[section:at_mark basic_stream_socket::at_mark]
+
+Determine whether the socket is at the out-of-band data mark.
+
+ bool ``[link boost_asio.reference.basic_stream_socket.at_mark.overload1 at_mark]``() const;
+
+ bool ``[link boost_asio.reference.basic_stream_socket.at_mark.overload2 at_mark]``(
+ boost::system::error_code & ec) const;
+
+
+[section:overload1 basic_stream_socket::at_mark (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Determine whether the socket is at the out-of-band data mark.
+
+ bool at_mark() const;
+
+
+This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
+
+
+[heading Return Value]
+
+A bool indicating whether the socket is at the out-of-band data mark.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_stream_socket::at_mark (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Determine whether the socket is at the out-of-band data mark.
+
+ bool at_mark(
+ boost::system::error_code & ec) const;
+
+
+This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Return Value]
+
+A bool indicating whether the socket is at the out-of-band data mark.
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:available basic_stream_socket::available]
+
+Determine the number of bytes available for reading.
+
+ std::size_t ``[link boost_asio.reference.basic_stream_socket.available.overload1 available]``() const;
+
+ std::size_t ``[link boost_asio.reference.basic_stream_socket.available.overload2 available]``(
+ boost::system::error_code & ec) const;
+
+
+[section:overload1 basic_stream_socket::available (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Determine the number of bytes available for reading.
+
+ std::size_t available() const;
+
+
+This function is used to determine the number of bytes that may be read without blocking.
+
+
+[heading Return Value]
+
+The number of bytes that may be read without blocking, or 0 if an error occurs.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_stream_socket::available (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Determine the number of bytes available for reading.
+
+ std::size_t available(
+ boost::system::error_code & ec) const;
+
+
+This function is used to determine the number of bytes that may be read without blocking.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Return Value]
+
+The number of bytes that may be read without blocking, or 0 if an error occurs.
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:basic_stream_socket basic_stream_socket::basic_stream_socket]
+
+Construct a basic_stream_socket without opening it.
+
+ ``[link boost_asio.reference.basic_stream_socket.basic_stream_socket.overload1 basic_stream_socket]``(
+ boost::asio::io_service & io_service);
+
+ ``[link boost_asio.reference.basic_stream_socket.basic_stream_socket.overload2 basic_stream_socket]``(
+ boost::asio::io_service & io_service,
+ const protocol_type & protocol);
+
+ ``[link boost_asio.reference.basic_stream_socket.basic_stream_socket.overload3 basic_stream_socket]``(
+ boost::asio::io_service & io_service,
+ const endpoint_type & endpoint);
+
+ ``[link boost_asio.reference.basic_stream_socket.basic_stream_socket.overload4 basic_stream_socket]``(
+ boost::asio::io_service & io_service,
+ const protocol_type & protocol,
+ const native_type & native_socket);
+
+
+[section:overload1 basic_stream_socket::basic_stream_socket (1 of 4 overloads)]
+
+Construct a basic_stream_socket without opening it.
+
+ basic_stream_socket(
+ boost::asio::io_service & io_service);
+
+
+This constructor creates a stream socket without opening it. The socket needs to be opened and then connected or accepted before data can be sent or received on it.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[io_service][The io\_service object that the stream socket will use to dispatch handlers for any asynchronous operations performed on the socket. ]]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_stream_socket::basic_stream_socket (2 of 4 overloads)]
+
+Construct and open a basic_stream_socket.
+
+ basic_stream_socket(
+ boost::asio::io_service & io_service,
+ const protocol_type & protocol);
+
+
+This constructor creates and opens a stream socket. The socket needs to be connected or accepted before data can be sent or received on it.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[io_service][The io\_service object that the stream socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
+
+[[protocol][An object specifying protocol parameters to be used.]]
+
+]
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:overload3 basic_stream_socket::basic_stream_socket (3 of 4 overloads)]
+
+Construct a basic_stream_socket, opening it and binding it to the given local endpoint.
+
+ basic_stream_socket(
+ boost::asio::io_service & io_service,
+ const endpoint_type & endpoint);
+
+
+This constructor creates a stream socket and automatically opens it bound to the specified endpoint on the local machine. The protocol used is the protocol associated with the given endpoint.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[io_service][The io\_service object that the stream socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
+
+[[endpoint][An endpoint on the local machine to which the stream socket will be bound.]]
+
+]
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:overload4 basic_stream_socket::basic_stream_socket (4 of 4 overloads)]
+
+Construct a basic_stream_socket on an existing native socket.
+
+ basic_stream_socket(
+ boost::asio::io_service & io_service,
+ const protocol_type & protocol,
+ const native_type & native_socket);
+
+
+This constructor creates a stream socket object to hold an existing native socket.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[io_service][The io\_service object that the stream socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
+
+[[protocol][An object specifying protocol parameters to be used.]]
+
+[[native_socket][The new underlying socket implementation.]]
+
+]
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
+
+]
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:bind basic_stream_socket::bind]
+
+Bind the socket to the given local endpoint.
+
+ void ``[link boost_asio.reference.basic_stream_socket.bind.overload1 bind]``(
+ const endpoint_type & endpoint);
+
+ boost::system::error_code ``[link boost_asio.reference.basic_stream_socket.bind.overload2 bind]``(
+ const endpoint_type & endpoint,
+ boost::system::error_code & ec);
+
+
+[section:overload1 basic_stream_socket::bind (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Bind the socket to the given local endpoint.
+
+ void bind(
+ const endpoint_type & endpoint);
+
+
+This function binds the socket to the specified endpoint on the local machine.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
+
+]
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ socket.open(boost::asio::ip::tcp::v4());
+ socket.bind(boost::asio::ip::tcp::endpoint(
+ boost::asio::ip::tcp::v4(), 12345));
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_stream_socket::bind (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Bind the socket to the given local endpoint.
+
+ boost::system::error_code bind(
+ const endpoint_type & endpoint,
+ boost::system::error_code & ec);
+
+
+This function binds the socket to the specified endpoint on the local machine.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ socket.open(boost::asio::ip::tcp::v4());
+ boost::system::error_code ec;
+ socket.bind(boost::asio::ip::tcp::endpoint(
+ boost::asio::ip::tcp::v4(), 12345), ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
+
+
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:broadcast basic_stream_socket::broadcast]
+
+
+['Inherited from socket_base.]
+
+Socket option to permit sending of broadcast messages.
+
+ typedef implementation_defined broadcast;
+
+
+
+Implements the SOL\_SOCKET/SO\_BROADCAST socket option.
+
+
+[heading Examples]
+
+Setting the option:
+
+ boost::asio::ip::udp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::broadcast option(true);
+ socket.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::udp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::broadcast option;
+ socket.get_option(option);
+ bool is_set = option.value();
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:bytes_readable basic_stream_socket::bytes_readable]
+
+
+['Inherited from socket_base.]
+
+IO control command to get the amount of data that can be read without blocking.
+
+ typedef implementation_defined bytes_readable;
+
+
+
+Implements the FIONREAD IO control command.
+
+
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::bytes_readable command(true);
+ socket.io_control(command);
+ std::size_t bytes_readable = command.get();
+
+
+
+
+
+
+[endsect]
+
+
+[section:cancel basic_stream_socket::cancel]
+
+Cancel all asynchronous operations associated with the socket.
+
+ void ``[link boost_asio.reference.basic_stream_socket.cancel.overload1 cancel]``();
+
+ boost::system::error_code ``[link boost_asio.reference.basic_stream_socket.cancel.overload2 cancel]``(
+ boost::system::error_code & ec);
+
+
+[section:overload1 basic_stream_socket::cancel (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Cancel all asynchronous operations associated with the socket.
+
+ void cancel();
+
+
+This function causes all outstanding asynchronous connect, send and receive operations to finish immediately, and the handlers for cancelled operations will be passed the boost::asio::error::operation\_aborted error.
+
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Remarks]
+
+Calls to cancel() will always fail with boost::asio::error::operation\_not\_supported when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless BOOST\_ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use:
+
+* It will only cancel asynchronous operations that were initiated in the current thread.
+
+* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed.
+
+For portable cancellation, consider using one of the following alternatives:
+
+
+* Disable asio's I/O completion port backend by defining BOOST_ASIO_DISABLE_IOCP.
+
+* Use the close() function to simultaneously cancel the outstanding operations and close the socket.
+
+When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above.
+
+
+[endsect]
+
+
+
+[section:overload2 basic_stream_socket::cancel (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Cancel all asynchronous operations associated with the socket.
+
+ boost::system::error_code cancel(
+ boost::system::error_code & ec);
+
+
+This function causes all outstanding asynchronous connect, send and receive operations to finish immediately, and the handlers for cancelled operations will be passed the boost::asio::error::operation\_aborted error.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Remarks]
+
+Calls to cancel() will always fail with boost::asio::error::operation\_not\_supported when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless BOOST\_ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use:
+
+* It will only cancel asynchronous operations that were initiated in the current thread.
+
+* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed.
+
+For portable cancellation, consider using one of the following alternatives:
+
+
+* Disable asio's I/O completion port backend by defining BOOST_ASIO_DISABLE_IOCP.
+
+* Use the close() function to simultaneously cancel the outstanding operations and close the socket.
+
+When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above.
+
+
+[endsect]
+
+
+[endsect]
+
+[section:close basic_stream_socket::close]
+
+Close the socket.
+
+ void ``[link boost_asio.reference.basic_stream_socket.close.overload1 close]``();
+
+ boost::system::error_code ``[link boost_asio.reference.basic_stream_socket.close.overload2 close]``(
+ boost::system::error_code & ec);
+
+
+[section:overload1 basic_stream_socket::close (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Close the socket.
+
+ void close();
+
+
+This function is used to close the socket. Any asynchronous send, receive or connect operations will be cancelled immediately, and will complete with the boost::asio::error::operation\_aborted error.
+
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Remarks]
+
+For portable behaviour with respect to graceful closure of a connected socket, call shutdown() before closing the socket.
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_stream_socket::close (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Close the socket.
+
+ boost::system::error_code close(
+ boost::system::error_code & ec);
+
+
+This function is used to close the socket. Any asynchronous send, receive or connect operations will be cancelled immediately, and will complete with the boost::asio::error::operation\_aborted error.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::system::error_code ec;
+ socket.close(ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
+
+
+
+
+[heading Remarks]
+
+For portable behaviour with respect to graceful closure of a connected socket, call shutdown() before closing the socket.
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:connect basic_stream_socket::connect]
+
+Connect the socket to the specified endpoint.
+
+ void ``[link boost_asio.reference.basic_stream_socket.connect.overload1 connect]``(
+ const endpoint_type & peer_endpoint);
+
+ boost::system::error_code ``[link boost_asio.reference.basic_stream_socket.connect.overload2 connect]``(
+ const endpoint_type & peer_endpoint,
+ boost::system::error_code & ec);
+
+
+[section:overload1 basic_stream_socket::connect (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Connect the socket to the specified endpoint.
+
+ void connect(
+ const endpoint_type & peer_endpoint);
+
+
+This function is used to connect a socket to the specified remote endpoint. The function call will block until the connection is successfully made or an error occurs.
+
+The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is returned to the closed state.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[peer_endpoint][The remote endpoint to which the socket will be connected.]]
+
+]
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ boost::asio::ip::tcp::endpoint endpoint(
+ boost::asio::ip::address::from_string("1.2.3.4"), 12345);
+ socket.connect(endpoint);
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_stream_socket::connect (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Connect the socket to the specified endpoint.
+
+ boost::system::error_code connect(
+ const endpoint_type & peer_endpoint,
+ boost::system::error_code & ec);
+
+
+This function is used to connect a socket to the specified remote endpoint. The function call will block until the connection is successfully made or an error occurs.
+
+The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is returned to the closed state.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[peer_endpoint][The remote endpoint to which the socket will be connected.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ boost::asio::ip::tcp::endpoint endpoint(
+ boost::asio::ip::address::from_string("1.2.3.4"), 12345);
+ boost::system::error_code ec;
+ socket.connect(endpoint, ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
+
+
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:debug basic_stream_socket::debug]
+
+
+['Inherited from socket_base.]
+
+Socket option to enable socket-level debugging.
+
+ typedef implementation_defined debug;
+
+
+
+Implements the SOL\_SOCKET/SO\_DEBUG socket option.
+
+
+[heading Examples]
+
+Setting the option:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::debug option(true);
+ socket.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::debug option;
+ socket.get_option(option);
+ bool is_set = option.value();
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:do_not_route basic_stream_socket::do_not_route]
+
+
+['Inherited from socket_base.]
+
+Socket option to prevent routing, use local interfaces only.
+
+ typedef implementation_defined do_not_route;
+
+
+
+Implements the SOL\_SOCKET/SO\_DONTROUTE socket option.
+
+
+[heading Examples]
+
+Setting the option:
+
+ boost::asio::ip::udp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::do_not_route option(true);
+ socket.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::udp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::do_not_route option;
+ socket.get_option(option);
+ bool is_set = option.value();
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:enable_connection_aborted basic_stream_socket::enable_connection_aborted]
+
+
+['Inherited from socket_base.]
+
+Socket option to report aborted connections on accept.
+
+ typedef implementation_defined enable_connection_aborted;
+
+
+
+Implements a custom socket option that determines whether or not an accept operation is permitted to fail with boost::asio::error::connection\_aborted. By default the option is false.
+
+
+[heading Examples]
+
+Setting the option:
+
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
+ boost::asio::socket_base::enable_connection_aborted option(true);
+ acceptor.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
+ boost::asio::socket_base::enable_connection_aborted option;
+ acceptor.get_option(option);
+ bool is_set = option.value();
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:endpoint_type basic_stream_socket::endpoint_type]
+
+The endpoint type.
+
+ typedef Protocol::endpoint endpoint_type;
+
+
+
+
+[endsect]
+
+
+
+[section:get_io_service basic_stream_socket::get_io_service]
+
+
+['Inherited from basic_io_object.]
+
+Get the io_service associated with the object.
+
+ boost::asio::io_service & get_io_service();
+
+
+This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
+
+
+[heading Return Value]
+
+A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
+
+
+
+[endsect]
+
+
+[section:get_option basic_stream_socket::get_option]
+
+Get an option from the socket.
+
+ void ``[link boost_asio.reference.basic_stream_socket.get_option.overload1 get_option]``(
+ GettableSocketOption & option) const;
+
+ boost::system::error_code ``[link boost_asio.reference.basic_stream_socket.get_option.overload2 get_option]``(
+ GettableSocketOption & option,
+ boost::system::error_code & ec) const;
+
+
+[section:overload1 basic_stream_socket::get_option (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Get an option from the socket.
+
+ void get_option(
+ GettableSocketOption & option) const;
+
+
+This function is used to get the current value of an option on the socket.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[option][The option value to be obtained from the socket.]]
+
+]
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Example]
+
+Getting the value of the SOL\_SOCKET/SO\_KEEPALIVE option:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::ip::tcp::socket::keep_alive option;
+ socket.get_option(option);
+ bool is_set = option.get();
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_stream_socket::get_option (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Get an option from the socket.
+
+ boost::system::error_code get_option(
+ GettableSocketOption & option,
+ boost::system::error_code & ec) const;
+
+
+This function is used to get the current value of an option on the socket.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[option][The option value to be obtained from the socket.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Example]
+
+Getting the value of the SOL\_SOCKET/SO\_KEEPALIVE option:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::ip::tcp::socket::keep_alive option;
+ boost::system::error_code ec;
+ socket.get_option(option, ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
+ bool is_set = option.get();
+
+
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:implementation basic_stream_socket::implementation]
+
+
+['Inherited from basic_io_object.]
+
+The underlying implementation of the I/O object.
+
+ implementation_type implementation;
+
+
+
+[endsect]
+
+
+
+[section:implementation_type basic_stream_socket::implementation_type]
+
+
+['Inherited from basic_io_object.]
+
+The underlying implementation type of I/O object.
+
+ typedef service_type::implementation_type implementation_type;
+
+
+
+
+[endsect]
+
+
+[section:io_control basic_stream_socket::io_control]
+
+Perform an IO control command on the socket.
+
+ void ``[link boost_asio.reference.basic_stream_socket.io_control.overload1 io_control]``(
+ IoControlCommand & command);
+
+ boost::system::error_code ``[link boost_asio.reference.basic_stream_socket.io_control.overload2 io_control]``(
+ IoControlCommand & command,
+ boost::system::error_code & ec);
+
+
+[section:overload1 basic_stream_socket::io_control (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Perform an IO control command on the socket.
+
+ void io_control(
+ IoControlCommand & command);
+
+
+This function is used to execute an IO control command on the socket.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[command][The IO control command to be performed on the socket.]]
+
+]
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Example]
+
+Getting the number of bytes ready to read:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::ip::tcp::socket::bytes_readable command;
+ socket.io_control(command);
+ std::size_t bytes_readable = command.get();
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_stream_socket::io_control (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Perform an IO control command on the socket.
+
+ boost::system::error_code io_control(
+ IoControlCommand & command,
+ boost::system::error_code & ec);
+
+
+This function is used to execute an IO control command on the socket.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[command][The IO control command to be performed on the socket.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Example]
+
+Getting the number of bytes ready to read:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::ip::tcp::socket::bytes_readable command;
+ boost::system::error_code ec;
+ socket.io_control(command, ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
+ std::size_t bytes_readable = command.get();
+
+
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:io_service basic_stream_socket::io_service]
+
+
+['Inherited from basic_io_object.]
+
+(Deprecated: use get_io_service().) Get the io_service associated with the object.
+
+ boost::asio::io_service & io_service();
+
+
+This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
+
+
+[heading Return Value]
+
+A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
+
+
+
+[endsect]
+
+
+
+[section:is_open basic_stream_socket::is_open]
+
+
+['Inherited from basic_socket.]
+
+Determine whether the socket is open.
+
+ bool is_open() const;
+
+
+
+[endsect]
+
+
+
+[section:keep_alive basic_stream_socket::keep_alive]
+
+
+['Inherited from socket_base.]
+
+Socket option to send keep-alives.
+
+ typedef implementation_defined keep_alive;
+
+
+
+Implements the SOL\_SOCKET/SO\_KEEPALIVE socket option.
+
+
+[heading Examples]
+
+Setting the option:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::keep_alive option(true);
+ socket.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::keep_alive option;
+ socket.get_option(option);
+ bool is_set = option.value();
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:linger basic_stream_socket::linger]
+
+
+['Inherited from socket_base.]
+
+Socket option to specify whether the socket lingers on close if unsent data is present.
+
+ typedef implementation_defined linger;
+
+
+
+Implements the SOL\_SOCKET/SO\_LINGER socket option.
+
+
+[heading Examples]
+
+Setting the option:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::linger option(true, 30);
+ socket.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::linger option;
+ socket.get_option(option);
+ bool is_set = option.enabled();
+ unsigned short timeout = option.timeout();
+
+
+
+
+
+
+[endsect]
+
+
+[section:local_endpoint basic_stream_socket::local_endpoint]
+
+Get the local endpoint of the socket.
+
+ endpoint_type ``[link boost_asio.reference.basic_stream_socket.local_endpoint.overload1 local_endpoint]``() const;
+
+ endpoint_type ``[link boost_asio.reference.basic_stream_socket.local_endpoint.overload2 local_endpoint]``(
+ boost::system::error_code & ec) const;
+
+
+[section:overload1 basic_stream_socket::local_endpoint (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Get the local endpoint of the socket.
+
+ endpoint_type local_endpoint() const;
+
+
+This function is used to obtain the locally bound endpoint of the socket.
+
+
+[heading Return Value]
+
+An object that represents the local endpoint of the socket.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::ip::tcp::endpoint endpoint = socket.local_endpoint();
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_stream_socket::local_endpoint (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Get the local endpoint of the socket.
+
+ endpoint_type local_endpoint(
+ boost::system::error_code & ec) const;
+
+
+This function is used to obtain the locally bound endpoint of the socket.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Return Value]
+
+An object that represents the local endpoint of the socket. Returns a default-constructed endpoint object if an error occurred.
+
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::system::error_code ec;
+ boost::asio::ip::tcp::endpoint endpoint = socket.local_endpoint(ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
+
+
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:lowest_layer basic_stream_socket::lowest_layer]
+
+
+['Inherited from basic_socket.]
+
+Get a reference to the lowest layer.
+
+ lowest_layer_type & lowest_layer();
+
+
+This function returns a reference to the lowest layer in a stack of layers. Since a basic_socket cannot contain any further layers, it simply returns a reference to itself.
+
+
+[heading Return Value]
+
+A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
+
+
+
+[endsect]
+
+
+
+[section:lowest_layer_type basic_stream_socket::lowest_layer_type]
+
+
+['Inherited from basic_socket.]
+
+A basic_socket is always the lowest layer.
+
+ typedef basic_socket< Protocol, StreamSocketService > lowest_layer_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.broadcast [*broadcast]]]
+ [Socket option to permit sending of broadcast messages. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.bytes_readable [*bytes_readable]]]
+ [IO control command to get the amount of data that can be read without blocking. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.debug [*debug]]]
+ [Socket option to enable socket-level debugging. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.do_not_route [*do_not_route]]]
+ [Socket option to prevent routing, use local interfaces only. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.enable_connection_aborted [*enable_connection_aborted]]]
+ [Socket option to report aborted connections on accept. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.endpoint_type [*endpoint_type]]]
+ [The endpoint type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.keep_alive [*keep_alive]]]
+ [Socket option to send keep-alives. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.linger [*linger]]]
+ [Socket option to specify whether the socket lingers on close if unsent data is present. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_socket is always the lowest layer. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.message_flags [*message_flags]]]
+ [Bitmask type for flags that can be passed to send and receive operations. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.native_type [*native_type]]]
+ [The native representation of a socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.non_blocking_io [*non_blocking_io]]]
+ [IO control command to set the blocking mode of the socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.protocol_type [*protocol_type]]]
+ [The protocol type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.receive_buffer_size [*receive_buffer_size]]]
+ [Socket option for the receive buffer size of a socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.receive_low_watermark [*receive_low_watermark]]]
+ [Socket option for the receive low watermark. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.reuse_address [*reuse_address]]]
+ [Socket option to allow the socket to be bound to an address that is already in use. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.send_buffer_size [*send_buffer_size]]]
+ [Socket option for the send buffer size of a socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.send_low_watermark [*send_low_watermark]]]
+ [Socket option for the send low watermark. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket.shutdown_type [*shutdown_type]]]
+ [Different ways a socket may be shutdown. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_socket.assign [*assign]]]
+ [Assign an existing native socket to the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.async_connect [*async_connect]]]
+ [Start an asynchronous connect. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.at_mark [*at_mark]]]
+ [Determine whether the socket is at the out-of-band data mark. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.available [*available]]]
+ [Determine the number of bytes available for reading. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.basic_socket [*basic_socket]]]
+ [Construct a basic_socket without opening it. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.bind [*bind]]]
+ [Bind the socket to the given local endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.close [*close]]]
+ [Close the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.connect [*connect]]]
+ [Connect the socket to the specified endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.get_option [*get_option]]]
+ [Get an option from the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.io_control [*io_control]]]
+ [Perform an IO control command on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.is_open [*is_open]]]
+ [Determine whether the socket is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.local_endpoint [*local_endpoint]]]
+ [Get the local endpoint of the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.native [*native]]]
+ [Get the native socket representation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.open [*open]]]
+ [Open the socket using the specified protocol. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.remote_endpoint [*remote_endpoint]]]
+ [Get the remote endpoint of the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.set_option [*set_option]]]
+ [Set an option on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.shutdown [*shutdown]]]
+ [Disable sends or receives on the socket. ]
+ ]
+
+]
+
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_socket._basic_socket [*~basic_socket]]]
+ [Protected destructor to prevent deletion through this type. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_socket.max_connections [*max_connections]]]
+ [The maximum length of the queue of pending incoming connections. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.message_do_not_route [*message_do_not_route]]]
+ [Specify that the data should not be subject to routing. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.message_out_of_band [*message_out_of_band]]]
+ [Process out-of-band data. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.message_peek [*message_peek]]]
+ [Peek at incoming data without removing it from the input queue. ]
+ ]
+
+]
+
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_socket.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
+
+]
+
+The basic_socket class template provides functionality that is common to both stream-oriented and datagram-oriented sockets.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
+
+
+
+
+[endsect]
+
+
+
+[section:max_connections basic_stream_socket::max_connections]
+
+
+['Inherited from socket_base.]
+
+The maximum length of the queue of pending incoming connections.
+
+ static const int max_connections = implementation_defined;
+
+
+
+[endsect]
+
+
+
+[section:message_do_not_route basic_stream_socket::message_do_not_route]
+
+
+['Inherited from socket_base.]
+
+Specify that the data should not be subject to routing.
+
+ static const int message_do_not_route = implementation_defined;
+
+
+
+[endsect]
+
+
+
+[section:message_flags basic_stream_socket::message_flags]
+
+
+['Inherited from socket_base.]
+
+Bitmask type for flags that can be passed to send and receive operations.
+
+ typedef int message_flags;
+
+
+
+
+[endsect]
+
+
+
+[section:message_out_of_band basic_stream_socket::message_out_of_band]
+
+
+['Inherited from socket_base.]
+
+Process out-of-band data.
+
+ static const int message_out_of_band = implementation_defined;
+
+
+
+[endsect]
+
+
+
+[section:message_peek basic_stream_socket::message_peek]
+
+
+['Inherited from socket_base.]
+
+Peek at incoming data without removing it from the input queue.
+
+ static const int message_peek = implementation_defined;
+
+
+
+[endsect]
+
+
+
+[section:native basic_stream_socket::native]
+
+
+['Inherited from basic_socket.]
+
+Get the native socket representation.
+
+ native_type native();
+
+
+This function may be used to obtain the underlying representation of the socket. This is intended to allow access to native socket functionality that is not otherwise provided.
+
+
+[endsect]
+
+
+
+[section:native_type basic_stream_socket::native_type]
+
+The native representation of a socket.
+
+ typedef StreamSocketService::native_type native_type;
+
+
+
+
+[endsect]
+
+
+
+[section:non_blocking_io basic_stream_socket::non_blocking_io]
+
+
+['Inherited from socket_base.]
+
+IO control command to set the blocking mode of the socket.
+
+ typedef implementation_defined non_blocking_io;
+
+
+
+Implements the FIONBIO IO control command.
+
+
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::non_blocking_io command(true);
+ socket.io_control(command);
+
+
+
+
+
+
+[endsect]
+
+
+[section:open basic_stream_socket::open]
+
+Open the socket using the specified protocol.
+
+ void ``[link boost_asio.reference.basic_stream_socket.open.overload1 open]``(
+ const protocol_type & protocol = protocol_type());
+
+ boost::system::error_code ``[link boost_asio.reference.basic_stream_socket.open.overload2 open]``(
+ const protocol_type & protocol,
+ boost::system::error_code & ec);
+
+
+[section:overload1 basic_stream_socket::open (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Open the socket using the specified protocol.
+
+ void open(
+ const protocol_type & protocol = protocol_type());
+
+
+This function opens the socket so that it will use the specified protocol.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[protocol][An object specifying protocol parameters to be used.]]
+
+]
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ socket.open(boost::asio::ip::tcp::v4());
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_stream_socket::open (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Open the socket using the specified protocol.
+
+ boost::system::error_code open(
+ const protocol_type & protocol,
+ boost::system::error_code & ec);
+
+
+This function opens the socket so that it will use the specified protocol.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[protocol][An object specifying which protocol is to be used.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ boost::system::error_code ec;
+ socket.open(boost::asio::ip::tcp::v4(), ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
+
+
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:protocol_type basic_stream_socket::protocol_type]
+
+The protocol type.
+
+ typedef Protocol protocol_type;
+
+
+
+
+[endsect]
+
+
+[section:read_some basic_stream_socket::read_some]
+
+Read some data from the socket.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_stream_socket.read_some.overload1 read_some]``(
+ const MutableBufferSequence & buffers);
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_stream_socket.read_some.overload2 read_some]``(
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
+
+
+[section:overload1 basic_stream_socket::read_some (1 of 2 overloads)]
+
+Read some data from the socket.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t read_some(
+ const MutableBufferSequence & buffers);
+
+
+This function is used to read data from the stream socket. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[buffers][One or more buffers into which the data will be read.]]
+
+]
+
+[heading Return Value]
+
+The number of bytes read.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. An error code of boost::asio::error::eof indicates that the connection was closed by the peer.]]
+
+]
+
+[heading Remarks]
+
+The read\_some operation may not read all of the requested number of bytes. Consider using the
+[link boost_asio.reference.read read] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
+
+[heading Example]
+
+To read into a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ socket.read_some(boost::asio::buffer(data, size));
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_stream_socket::read_some (2 of 2 overloads)]
+
+Read some data from the socket.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t read_some(
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
+
+
+This function is used to read data from the stream socket. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[buffers][One or more buffers into which the data will be read.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Return Value]
+
+The number of bytes read. Returns 0 if an error occurred.
+
+[heading Remarks]
+
+The read\_some operation may not read all of the requested number of bytes. Consider using the
+[link boost_asio.reference.read read] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:receive basic_stream_socket::receive]
+
+Receive some data on the socket.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_stream_socket.receive.overload1 receive]``(
+ const MutableBufferSequence & buffers);
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_stream_socket.receive.overload2 receive]``(
+ const MutableBufferSequence & buffers,
+ socket_base::message_flags flags);
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_stream_socket.receive.overload3 receive]``(
+ const MutableBufferSequence & buffers,
+ socket_base::message_flags flags,
+ boost::system::error_code & ec);
+
+
+[section:overload1 basic_stream_socket::receive (1 of 3 overloads)]
+
+Receive some data on the socket.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t receive(
+ const MutableBufferSequence & buffers);
+
+
+This function is used to receive data on the stream socket. The function call will block until one or more bytes of data has been received successfully, or until an error occurs.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[buffers][One or more buffers into which the data will be received.]]
+
+]
+
+[heading Return Value]
+
+The number of bytes received.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. An error code of boost::asio::error::eof indicates that the connection was closed by the peer.]]
+
+]
+
+[heading Remarks]
+
+The receive operation may not receive all of the requested number of bytes. Consider using the
+[link boost_asio.reference.read read] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
+
+[heading Example]
+
+To receive into a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ socket.receive(boost::asio::buffer(data, size));
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_stream_socket::receive (2 of 3 overloads)]
+
+Receive some data on the socket.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t receive(
+ const MutableBufferSequence & buffers,
+ socket_base::message_flags flags);
+
+
+This function is used to receive data on the stream socket. The function call will block until one or more bytes of data has been received successfully, or until an error occurs.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[buffers][One or more buffers into which the data will be received.]]
+
+[[flags][Flags specifying how the receive call is to be made.]]
+
+]
+
+[heading Return Value]
+
+The number of bytes received.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. An error code of boost::asio::error::eof indicates that the connection was closed by the peer.]]
+
+]
+
+[heading Remarks]
+
+The receive operation may not receive all of the requested number of bytes. Consider using the
+[link boost_asio.reference.read read] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
+
+[heading Example]
+
+To receive into a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ socket.receive(boost::asio::buffer(data, size), 0);
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+
+
+
+[endsect]
+
+
+
+[section:overload3 basic_stream_socket::receive (3 of 3 overloads)]
+
+Receive some data on a connected socket.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t receive(
+ const MutableBufferSequence & buffers,
+ socket_base::message_flags flags,
+ boost::system::error_code & ec);
+
+
+This function is used to receive data on the stream socket. The function call will block until one or more bytes of data has been received successfully, or until an error occurs.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[buffers][One or more buffers into which the data will be received.]]
+
+[[flags][Flags specifying how the receive call is to be made.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Return Value]
+
+The number of bytes received. Returns 0 if an error occurred.
+
+[heading Remarks]
+
+The receive operation may not receive all of the requested number of bytes. Consider using the
+[link boost_asio.reference.read read] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:receive_buffer_size basic_stream_socket::receive_buffer_size]
+
+
+['Inherited from socket_base.]
+
+Socket option for the receive buffer size of a socket.
+
+ typedef implementation_defined receive_buffer_size;
+
+
+
+Implements the SOL\_SOCKET/SO\_RCVBUF socket option.
+
+
+[heading Examples]
+
+Setting the option:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::receive_buffer_size option(8192);
+ socket.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::receive_buffer_size option;
+ socket.get_option(option);
+ int size = option.value();
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:receive_low_watermark basic_stream_socket::receive_low_watermark]
+
+
+['Inherited from socket_base.]
+
+Socket option for the receive low watermark.
+
+ typedef implementation_defined receive_low_watermark;
+
+
+
+Implements the SOL\_SOCKET/SO\_RCVLOWAT socket option.
+
+
+[heading Examples]
+
+Setting the option:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::receive_low_watermark option(1024);
+ socket.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::receive_low_watermark option;
+ socket.get_option(option);
+ int size = option.value();
+
+
+
+
+
+
+[endsect]
+
+
+[section:remote_endpoint basic_stream_socket::remote_endpoint]
+
+Get the remote endpoint of the socket.
+
+ endpoint_type ``[link boost_asio.reference.basic_stream_socket.remote_endpoint.overload1 remote_endpoint]``() const;
+
+ endpoint_type ``[link boost_asio.reference.basic_stream_socket.remote_endpoint.overload2 remote_endpoint]``(
+ boost::system::error_code & ec) const;
+
+
+[section:overload1 basic_stream_socket::remote_endpoint (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Get the remote endpoint of the socket.
+
+ endpoint_type remote_endpoint() const;
+
+
+This function is used to obtain the remote endpoint of the socket.
+
+
+[heading Return Value]
+
+An object that represents the remote endpoint of the socket.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::ip::tcp::endpoint endpoint = socket.remote_endpoint();
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_stream_socket::remote_endpoint (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Get the remote endpoint of the socket.
+
+ endpoint_type remote_endpoint(
+ boost::system::error_code & ec) const;
+
+
+This function is used to obtain the remote endpoint of the socket.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Return Value]
+
+An object that represents the remote endpoint of the socket. Returns a default-constructed endpoint object if an error occurred.
+
+[heading Example]
+
+
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::system::error_code ec;
+ boost::asio::ip::tcp::endpoint endpoint = socket.remote_endpoint(ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
+
+
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:reuse_address basic_stream_socket::reuse_address]
+
+
+['Inherited from socket_base.]
+
+Socket option to allow the socket to be bound to an address that is already in use.
+
+ typedef implementation_defined reuse_address;
+
+
+
+Implements the SOL\_SOCKET/SO\_REUSEADDR socket option.
+
+
+[heading Examples]
+
+Setting the option:
+
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
+ boost::asio::socket_base::reuse_address option(true);
+ acceptor.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
+ boost::asio::socket_base::reuse_address option;
+ acceptor.get_option(option);
+ bool is_set = option.value();
+
+
+
+
+
+
+[endsect]
+
+
+[section:send basic_stream_socket::send]
+
+Send some data on the socket.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_stream_socket.send.overload1 send]``(
+ const ConstBufferSequence & buffers);
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_stream_socket.send.overload2 send]``(
+ const ConstBufferSequence & buffers,
+ socket_base::message_flags flags);
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_stream_socket.send.overload3 send]``(
+ const ConstBufferSequence & buffers,
+ socket_base::message_flags flags,
+ boost::system::error_code & ec);
+
+
+[section:overload1 basic_stream_socket::send (1 of 3 overloads)]
+
+Send some data on the socket.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t send(
+ const ConstBufferSequence & buffers);
+
+
+This function is used to send data on the stream socket. The function call will block until one or more bytes of the data has been sent successfully, or an until error occurs.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[buffers][One or more data buffers to be sent on the socket.]]
+
+]
+
+[heading Return Value]
+
+The number of bytes sent.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Remarks]
+
+The send operation may not transmit all of the data to the peer. Consider using the
+[link boost_asio.reference.write write] function if you need to ensure that all data is written before the blocking operation completes.
+
+[heading Example]
+
+To send a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ socket.send(boost::asio::buffer(data, size));
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_stream_socket::send (2 of 3 overloads)]
+
+Send some data on the socket.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t send(
+ const ConstBufferSequence & buffers,
+ socket_base::message_flags flags);
+
+
+This function is used to send data on the stream socket. The function call will block until one or more bytes of the data has been sent successfully, or an until error occurs.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[buffers][One or more data buffers to be sent on the socket.]]
+
+[[flags][Flags specifying how the send call is to be made.]]
+
+]
+
+[heading Return Value]
+
+The number of bytes sent.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Remarks]
+
+The send operation may not transmit all of the data to the peer. Consider using the
+[link boost_asio.reference.write write] function if you need to ensure that all data is written before the blocking operation completes.
+
+[heading Example]
+
+To send a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ socket.send(boost::asio::buffer(data, size), 0);
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+
+
+
+[endsect]
+
+
+
+[section:overload3 basic_stream_socket::send (3 of 3 overloads)]
+
+Send some data on the socket.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t send(
+ const ConstBufferSequence & buffers,
+ socket_base::message_flags flags,
+ boost::system::error_code & ec);
+
+
+This function is used to send data on the stream socket. The function call will block until one or more bytes of the data has been sent successfully, or an until error occurs.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[buffers][One or more data buffers to be sent on the socket.]]
+
+[[flags][Flags specifying how the send call is to be made.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Return Value]
+
+The number of bytes sent. Returns 0 if an error occurred.
+
+[heading Remarks]
+
+The send operation may not transmit all of the data to the peer. Consider using the
+[link boost_asio.reference.write write] function if you need to ensure that all data is written before the blocking operation completes.
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:send_buffer_size basic_stream_socket::send_buffer_size]
+
+
+['Inherited from socket_base.]
+
+Socket option for the send buffer size of a socket.
+
+ typedef implementation_defined send_buffer_size;
+
+
+
+Implements the SOL\_SOCKET/SO\_SNDBUF socket option.
+
+
+[heading Examples]
+
+Setting the option:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::send_buffer_size option(8192);
+ socket.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::send_buffer_size option;
+ socket.get_option(option);
+ int size = option.value();
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:send_low_watermark basic_stream_socket::send_low_watermark]
+
+
+['Inherited from socket_base.]
+
+Socket option for the send low watermark.
+
+ typedef implementation_defined send_low_watermark;
+
+
+
+Implements the SOL\_SOCKET/SO\_SNDLOWAT socket option.
+
+
+[heading Examples]
+
+Setting the option:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::send_low_watermark option(1024);
+ socket.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::send_low_watermark option;
+ socket.get_option(option);
+ int size = option.value();
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:service basic_stream_socket::service]
+
+
+['Inherited from basic_io_object.]
+
+The service associated with the I/O object.
+
+ service_type & service;
+
+
+
+[endsect]
+
+
+
+[section:service_type basic_stream_socket::service_type]
+
+
+['Inherited from basic_io_object.]
+
+The type of the service that will be used to provide I/O operations.
+
+ typedef StreamSocketService service_type;
+
+
+
+
+[endsect]
+
+
+[section:set_option basic_stream_socket::set_option]
+
+Set an option on the socket.
+
+ void ``[link boost_asio.reference.basic_stream_socket.set_option.overload1 set_option]``(
+ const SettableSocketOption & option);
+
+ boost::system::error_code ``[link boost_asio.reference.basic_stream_socket.set_option.overload2 set_option]``(
+ const SettableSocketOption & option,
+ boost::system::error_code & ec);
+
+
+[section:overload1 basic_stream_socket::set_option (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Set an option on the socket.
+
+ void set_option(
+ const SettableSocketOption & option);
+
+
+This function is used to set an option on the socket.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[option][The new option value to be set on the socket.]]
+
+]
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Example]
+
+Setting the IPPROTO\_TCP/TCP\_NODELAY option:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::ip::tcp::no_delay option(true);
+ socket.set_option(option);
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_stream_socket::set_option (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Set an option on the socket.
+
+ boost::system::error_code set_option(
+ const SettableSocketOption & option,
+ boost::system::error_code & ec);
+
+
+This function is used to set an option on the socket.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[option][The new option value to be set on the socket.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Example]
+
+Setting the IPPROTO\_TCP/TCP\_NODELAY option:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::ip::tcp::no_delay option(true);
+ boost::system::error_code ec;
+ socket.set_option(option, ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
+
+
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:shutdown basic_stream_socket::shutdown]
+
+Disable sends or receives on the socket.
+
+ void ``[link boost_asio.reference.basic_stream_socket.shutdown.overload1 shutdown]``(
+ shutdown_type what);
+
+ boost::system::error_code ``[link boost_asio.reference.basic_stream_socket.shutdown.overload2 shutdown]``(
+ shutdown_type what,
+ boost::system::error_code & ec);
+
+
+[section:overload1 basic_stream_socket::shutdown (1 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Disable sends or receives on the socket.
+
+ void shutdown(
+ shutdown_type what);
+
+
+This function is used to disable send operations, receive operations, or both.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[what][Determines what types of operation will no longer be allowed.]]
+
+]
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Example]
+
+Shutting down the send side of the socket:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ socket.shutdown(boost::asio::ip::tcp::socket::shutdown_send);
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_stream_socket::shutdown (2 of 2 overloads)]
+
+
+['Inherited from basic_socket.]
+
+Disable sends or receives on the socket.
+
+ boost::system::error_code shutdown(
+ shutdown_type what,
+ boost::system::error_code & ec);
+
+
+This function is used to disable send operations, receive operations, or both.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[what][Determines what types of operation will no longer be allowed.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Example]
+
+Shutting down the send side of the socket:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::system::error_code ec;
+ socket.shutdown(boost::asio::ip::tcp::socket::shutdown_send, ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
+
+
+
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:shutdown_type basic_stream_socket::shutdown_type]
+
+
+['Inherited from socket_base.]
+
+Different ways a socket may be shutdown.
+
+ enum shutdown_type
+
+[heading Values]
+[variablelist
+
+ [
+ [shutdown_receive]
+ [Shutdown the receive side of the socket. ]
+ ]
+
+ [
+ [shutdown_send]
+ [Shutdown the send side of the socket. ]
+ ]
+
+ [
+ [shutdown_both]
+ [Shutdown both send and receive on the socket. ]
+ ]
+
+]
+
+
+
+[endsect]
+
+
+[section:write_some basic_stream_socket::write_some]
+
+Write some data to the socket.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_stream_socket.write_some.overload1 write_some]``(
+ const ConstBufferSequence & buffers);
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.basic_stream_socket.write_some.overload2 write_some]``(
+ const ConstBufferSequence & buffers,
+ boost::system::error_code & ec);
+
+
+[section:overload1 basic_stream_socket::write_some (1 of 2 overloads)]
+
+Write some data to the socket.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t write_some(
+ const ConstBufferSequence & buffers);
+
+
+This function is used to write data to the stream socket. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[buffers][One or more data buffers to be written to the socket.]]
+
+]
+
+[heading Return Value]
+
+The number of bytes written.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. An error code of boost::asio::error::eof indicates that the connection was closed by the peer.]]
+
+]
+
+[heading Remarks]
+
+The write\_some operation may not transmit all of the data to the peer. Consider using the
+[link boost_asio.reference.write write] function if you need to ensure that all data is written before the blocking operation completes.
+
+[heading Example]
+
+To write a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ socket.write_some(boost::asio::buffer(data, size));
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+
+
+
+[endsect]
+
+
+
+[section:overload2 basic_stream_socket::write_some (2 of 2 overloads)]
+
+Write some data to the socket.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t write_some(
+ const ConstBufferSequence & buffers,
+ boost::system::error_code & ec);
+
+
+This function is used to write data to the stream socket. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[buffers][One or more data buffers to be written to the socket.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Return Value]
+
+The number of bytes written. Returns 0 if an error occurred.
+
+[heading Remarks]
+
+The write\_some operation may not transmit all of the data to the peer. Consider using the
+[link boost_asio.reference.write write] function if you need to ensure that all data is written before the blocking operation completes.
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[endsect]
+
+[section:basic_streambuf basic_streambuf]
+
+Automatically resizable buffer class based on std::streambuf.
+
+ template<
+ typename Allocator = std::allocator<char>>
+ class basic_streambuf :
+ noncopyable
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.basic_streambuf.const_buffers_type [*const_buffers_type]]]
+ [The type used to represent the get area as a list of buffers. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_streambuf.mutable_buffers_type [*mutable_buffers_type]]]
+ [The type used to represent the put area as a list of buffers. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_streambuf.basic_streambuf [*basic_streambuf]]]
+ [Construct a buffer with a specified maximum size. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_streambuf.commit [*commit]]]
+ [Move the start of the put area by the specified number of characters. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_streambuf.consume [*consume]]]
+ [Move the start of the get area by the specified number of characters. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_streambuf.data [*data]]]
+ [Get a list of buffers that represents the get area. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_streambuf.max_size [*max_size]]]
+ [Return the maximum size of the buffer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_streambuf.prepare [*prepare]]]
+ [Get a list of buffers that represents the put area, with the given size. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_streambuf.size [*size]]]
+ [Return the size of the get area in characters. ]
+ ]
+
+]
+
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_streambuf.overflow [*overflow]]]
+ []
+ ]
+
+ [
+ [[link boost_asio.reference.basic_streambuf.reserve [*reserve]]]
+ []
+ ]
+
+ [
+ [[link boost_asio.reference.basic_streambuf.underflow [*underflow]]]
+ []
+ ]
+
+]
+
+
+[section:basic_streambuf basic_streambuf::basic_streambuf]
+
+Construct a buffer with a specified maximum size.
+
+ basic_streambuf(
+ std::size_t max_size = (std::numeric_limits< std::size_t >::max)(),
+ const Allocator & allocator = Allocator());
+
+
+
+[endsect]
+
+
+
+[section:commit basic_streambuf::commit]
+
+Move the start of the put area by the specified number of characters.
+
+ void commit(
+ std::size_t n);
+
+
+
+[endsect]
+
+
+
+[section:const_buffers_type basic_streambuf::const_buffers_type]
+
+The type used to represent the get area as a list of buffers.
+
+ typedef implementation_defined const_buffers_type;
+
+
+
+
+[endsect]
+
+
+
+[section:consume basic_streambuf::consume]
+
+Move the start of the get area by the specified number of characters.
+
+ void consume(
+ std::size_t n);
+
+
+
+[endsect]
+
+
+
+[section:data basic_streambuf::data]
+
+Get a list of buffers that represents the get area.
+
+ const_buffers_type data() const;
+
+
+
+[endsect]
+
+
+
+[section:max_size basic_streambuf::max_size]
+
+Return the maximum size of the buffer.
+
+ std::size_t max_size() const;
+
+
+
+[endsect]
+
+
+
+[section:mutable_buffers_type basic_streambuf::mutable_buffers_type]
+
+The type used to represent the put area as a list of buffers.
+
+ typedef implementation_defined mutable_buffers_type;
+
+
+
+
+[endsect]
+
+
+
+[section:overflow basic_streambuf::overflow]
+
+
+
+ int_type overflow(
+ int_type c);
+
+
+
+[endsect]
+
+
+
+[section:prepare basic_streambuf::prepare]
+
+Get a list of buffers that represents the put area, with the given size.
+
+ mutable_buffers_type prepare(
+ std::size_t size);
+
+
+
+[endsect]
+
+
+
+[section:reserve basic_streambuf::reserve]
+
+
+
+ void reserve(
+ std::size_t n);
+
+
+
+[endsect]
+
+
+
+[section:size basic_streambuf::size]
+
+Return the size of the get area in characters.
+
+ std::size_t size() const;
+
+
+
+[endsect]
+
+
+
+[section:underflow basic_streambuf::underflow]
+
+
+
+ int_type underflow();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:buffer buffer]
+
+Create a new modifiable buffer from an existing buffer.
+
+ mutable_buffers_1 ``[link boost_asio.reference.buffer.overload1 buffer]``(
+ const mutable_buffer & b);
+
+ mutable_buffers_1 ``[link boost_asio.reference.buffer.overload2 buffer]``(
+ const mutable_buffer & b,
+ std::size_t max_size_in_bytes);
+
+ const_buffers_1 ``[link boost_asio.reference.buffer.overload3 buffer]``(
+ const const_buffer & b);
+
+ const_buffers_1 ``[link boost_asio.reference.buffer.overload4 buffer]``(
+ const const_buffer & b,
+ std::size_t max_size_in_bytes);
+
+ mutable_buffers_1 ``[link boost_asio.reference.buffer.overload5 buffer]``(
+ void * data,
+ std::size_t size_in_bytes);
+
+ const_buffers_1 ``[link boost_asio.reference.buffer.overload6 buffer]``(
+ const void * data,
+ std::size_t size_in_bytes);
+
+ template<
+ typename PodType,
+ std::size_t N>
+ mutable_buffers_1 ``[link boost_asio.reference.buffer.overload7 buffer]``(
+ PodType & data);
+
+ template<
+ typename PodType,
+ std::size_t N>
+ mutable_buffers_1 ``[link boost_asio.reference.buffer.overload8 buffer]``(
+ PodType & data,
+ std::size_t max_size_in_bytes);
+
+ template<
+ typename PodType,
+ std::size_t N>
+ const_buffers_1 ``[link boost_asio.reference.buffer.overload9 buffer]``(
+ const PodType & data);
+
+ template<
+ typename PodType,
+ std::size_t N>
+ const_buffers_1 ``[link boost_asio.reference.buffer.overload10 buffer]``(
+ const PodType & data,
+ std::size_t max_size_in_bytes);
+
+ template<
+ typename PodType,
+ std::size_t N>
+ mutable_buffers_1 ``[link boost_asio.reference.buffer.overload11 buffer]``(
+ boost::array< PodType, N > & data);
+
+ template<
+ typename PodType,
+ std::size_t N>
+ mutable_buffers_1 ``[link boost_asio.reference.buffer.overload12 buffer]``(
+ boost::array< PodType, N > & data,
+ std::size_t max_size_in_bytes);
+
+ template<
+ typename PodType,
+ std::size_t N>
+ const_buffers_1 ``[link boost_asio.reference.buffer.overload13 buffer]``(
+ boost::array< const PodType, N > & data);
+
+ template<
+ typename PodType,
+ std::size_t N>
+ const_buffers_1 ``[link boost_asio.reference.buffer.overload14 buffer]``(
+ boost::array< const PodType, N > & data,
+ std::size_t max_size_in_bytes);
+
+ template<
+ typename PodType,
+ std::size_t N>
+ const_buffers_1 ``[link boost_asio.reference.buffer.overload15 buffer]``(
+ const boost::array< PodType, N > & data);
+
+ template<
+ typename PodType,
+ std::size_t N>
+ const_buffers_1 ``[link boost_asio.reference.buffer.overload16 buffer]``(
+ const boost::array< PodType, N > & data,
+ std::size_t max_size_in_bytes);
+
+ template<
+ typename PodType,
+ typename Allocator>
+ mutable_buffers_1 ``[link boost_asio.reference.buffer.overload17 buffer]``(
+ std::vector< PodType, Allocator > & data);
+
+ template<
+ typename PodType,
+ typename Allocator>
+ mutable_buffers_1 ``[link boost_asio.reference.buffer.overload18 buffer]``(
+ std::vector< PodType, Allocator > & data,
+ std::size_t max_size_in_bytes);
+
+ template<
+ typename PodType,
+ typename Allocator>
+ const_buffers_1 ``[link boost_asio.reference.buffer.overload19 buffer]``(
+ const std::vector< PodType, Allocator > & data);
+
+ template<
+ typename PodType,
+ typename Allocator>
+ const_buffers_1 ``[link boost_asio.reference.buffer.overload20 buffer]``(
+ const std::vector< PodType, Allocator > & data,
+ std::size_t max_size_in_bytes);
+
+ const_buffers_1 ``[link boost_asio.reference.buffer.overload21 buffer]``(
+ const std::string & data);
+
+ const_buffers_1 ``[link boost_asio.reference.buffer.overload22 buffer]``(
+ const std::string & data,
+ std::size_t max_size_in_bytes);
+
+The simplest use case involves reading or writing a single buffer of a specified size:
+
+
+
+ sock.write(boost::asio::buffer(data, size));
+
+
+
+
+In the above example, the return value of boost::asio::buffer meets the requirements of the ConstBufferSequence concept so that it may be directly passed to the socket's write function. A buffer created for modifiable memory also meets the requirements of the MutableBufferSequence concept.
+
+An individual buffer may be created from a builtin array, std::vector or boost::array of POD elements. This helps prevent buffer overruns by automatically determining the size of the buffer:
+
+
+
+ char d1[128];
+ size_t bytes_transferred = sock.read(boost::asio::buffer(d1));
+
+ std::vector<char> d2(128);
+ bytes_transferred = sock.read(boost::asio::buffer(d2));
+
+ boost::array<char, 128> d3;
+ bytes_transferred = sock.read(boost::asio::buffer(d3));
+
+
+
+
+To read or write using multiple buffers (i.e. scatter-gather I/O), multiple buffer objects may be assigned into a container that supports the MutableBufferSequence (for read) or ConstBufferSequence (for write) concepts:
+
+
+
+ char d1[128];
+ std::vector<char> d2(128);
+ boost::array<char, 128> d3;
+
+ boost::array<mutable_buffer, 3> bufs1 = {
+ boost::asio::buffer(d1),
+ boost::asio::buffer(d2),
+ boost::asio::buffer(d3) };
+ bytes_transferred = sock.read(bufs1);
+
+ std::vector<const_buffer> bufs2;
+ bufs2.push_back(boost::asio::buffer(d1));
+ bufs2.push_back(boost::asio::buffer(d2));
+ bufs2.push_back(boost::asio::buffer(d3));
+ bytes_transferred = sock.write(bufs2);
+
+
+
+
+
+[section:overload1 buffer (1 of 22 overloads)]
+
+Create a new modifiable buffer from an existing buffer.
+
+ mutable_buffers_1 buffer(
+ const mutable_buffer & b);
+
+
+
+[endsect]
+
+
+
+[section:overload2 buffer (2 of 22 overloads)]
+
+Create a new modifiable buffer from an existing buffer.
+
+ mutable_buffers_1 buffer(
+ const mutable_buffer & b,
+ std::size_t max_size_in_bytes);
+
+
+
+[endsect]
+
+
+
+[section:overload3 buffer (3 of 22 overloads)]
+
+Create a new non-modifiable buffer from an existing buffer.
+
+ const_buffers_1 buffer(
+ const const_buffer & b);
+
+
+
+[endsect]
+
+
+
+[section:overload4 buffer (4 of 22 overloads)]
+
+Create a new non-modifiable buffer from an existing buffer.
+
+ const_buffers_1 buffer(
+ const const_buffer & b,
+ std::size_t max_size_in_bytes);
+
+
+
+[endsect]
+
+
+
+[section:overload5 buffer (5 of 22 overloads)]
+
+Create a new modifiable buffer that represents the given memory range.
+
+ mutable_buffers_1 buffer(
+ void * data,
+ std::size_t size_in_bytes);
+
+
+
+[endsect]
+
+
+
+[section:overload6 buffer (6 of 22 overloads)]
+
+Create a new non-modifiable buffer that represents the given memory range.
+
+ const_buffers_1 buffer(
+ const void * data,
+ std::size_t size_in_bytes);
+
+
+
+[endsect]
+
+
+
+[section:overload7 buffer (7 of 22 overloads)]
+
+Create a new modifiable buffer that represents the given POD array.
+
+ template<
+ typename PodType,
+ std::size_t N>
+ mutable_buffers_1 buffer(
+ PodType & data);
+
+
+
+[endsect]
+
+
+
+[section:overload8 buffer (8 of 22 overloads)]
+
+Create a new modifiable buffer that represents the given POD array.
+
+ template<
+ typename PodType,
+ std::size_t N>
+ mutable_buffers_1 buffer(
+ PodType & data,
+ std::size_t max_size_in_bytes);
+
+
+
+[endsect]
+
+
+
+[section:overload9 buffer (9 of 22 overloads)]
+
+Create a new non-modifiable buffer that represents the given POD array.
+
+ template<
+ typename PodType,
+ std::size_t N>
+ const_buffers_1 buffer(
+ const PodType & data);
+
+
+
+[endsect]
+
+
+
+[section:overload10 buffer (10 of 22 overloads)]
+
+Create a new non-modifiable buffer that represents the given POD array.
+
+ template<
+ typename PodType,
+ std::size_t N>
+ const_buffers_1 buffer(
+ const PodType & data,
+ std::size_t max_size_in_bytes);
+
+
+
+[endsect]
+
+
+
+[section:overload11 buffer (11 of 22 overloads)]
+
+Create a new modifiable buffer that represents the given POD array.
+
+ template<
+ typename PodType,
+ std::size_t N>
+ mutable_buffers_1 buffer(
+ boost::array< PodType, N > & data);
+
+
+
+[endsect]
+
+
+
+[section:overload12 buffer (12 of 22 overloads)]
+
+Create a new modifiable buffer that represents the given POD array.
+
+ template<
+ typename PodType,
+ std::size_t N>
+ mutable_buffers_1 buffer(
+ boost::array< PodType, N > & data,
+ std::size_t max_size_in_bytes);
+
+
+
+[endsect]
+
+
+
+[section:overload13 buffer (13 of 22 overloads)]
+
+Create a new non-modifiable buffer that represents the given POD array.
+
+ template<
+ typename PodType,
+ std::size_t N>
+ const_buffers_1 buffer(
+ boost::array< const PodType, N > & data);
+
+
+
+[endsect]
+
+
+
+[section:overload14 buffer (14 of 22 overloads)]
+
+Create a new non-modifiable buffer that represents the given POD array.
+
+ template<
+ typename PodType,
+ std::size_t N>
+ const_buffers_1 buffer(
+ boost::array< const PodType, N > & data,
+ std::size_t max_size_in_bytes);
+
+
+
+[endsect]
+
+
+
+[section:overload15 buffer (15 of 22 overloads)]
+
+Create a new non-modifiable buffer that represents the given POD array.
+
+ template<
+ typename PodType,
+ std::size_t N>
+ const_buffers_1 buffer(
+ const boost::array< PodType, N > & data);
+
+
+
+[endsect]
+
+
+
+[section:overload16 buffer (16 of 22 overloads)]
+
+Create a new non-modifiable buffer that represents the given POD array.
+
+ template<
+ typename PodType,
+ std::size_t N>
+ const_buffers_1 buffer(
+ const boost::array< PodType, N > & data,
+ std::size_t max_size_in_bytes);
+
+
+
+[endsect]
+
+
+
+[section:overload17 buffer (17 of 22 overloads)]
+
+Create a new modifiable buffer that represents the given POD vector.
+
+ template<
+ typename PodType,
+ typename Allocator>
+ mutable_buffers_1 buffer(
+ std::vector< PodType, Allocator > & data);
+
+
+
+[heading Remarks]
+
+The buffer is invalidated by any vector operation that would also invalidate iterators.
+
+
+
+[endsect]
+
+
+
+[section:overload18 buffer (18 of 22 overloads)]
+
+Create a new modifiable buffer that represents the given POD vector.
+
+ template<
+ typename PodType,
+ typename Allocator>
+ mutable_buffers_1 buffer(
+ std::vector< PodType, Allocator > & data,
+ std::size_t max_size_in_bytes);
+
+
+
+[heading Remarks]
+
+The buffer is invalidated by any vector operation that would also invalidate iterators.
+
+
+
+[endsect]
+
+
+
+[section:overload19 buffer (19 of 22 overloads)]
+
+Create a new non-modifiable buffer that represents the given POD vector.
+
+ template<
+ typename PodType,
+ typename Allocator>
+ const_buffers_1 buffer(
+ const std::vector< PodType, Allocator > & data);
+
+
+
+[heading Remarks]
+
+The buffer is invalidated by any vector operation that would also invalidate iterators.
+
+
+
+[endsect]
+
+
+
+[section:overload20 buffer (20 of 22 overloads)]
+
+Create a new non-modifiable buffer that represents the given POD vector.
+
+ template<
+ typename PodType,
+ typename Allocator>
+ const_buffers_1 buffer(
+ const std::vector< PodType, Allocator > & data,
+ std::size_t max_size_in_bytes);
+
+
+
+[heading Remarks]
+
+The buffer is invalidated by any vector operation that would also invalidate iterators.
+
+
+
+[endsect]
+
+
+
+[section:overload21 buffer (21 of 22 overloads)]
+
+Create a new non-modifiable buffer that represents the given string.
+
+ const_buffers_1 buffer(
+ const std::string & data);
+
+
+
+[heading Remarks]
+
+The buffer is invalidated by any non-const operation called on the given string object.
+
+
+
+[endsect]
+
+
+
+[section:overload22 buffer (22 of 22 overloads)]
+
+Create a new non-modifiable buffer that represents the given string.
+
+ const_buffers_1 buffer(
+ const std::string & data,
+ std::size_t max_size_in_bytes);
+
+
+
+[heading Remarks]
+
+The buffer is invalidated by any non-const operation called on the given string object.
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:buffered_read_stream buffered_read_stream]
+
+Adds buffering to the read-related operations of a stream.
+
+ template<
+ typename Stream>
+ class buffered_read_stream :
+ noncopyable
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.buffered_read_stream.lowest_layer_type [*lowest_layer_type]]]
+ [The type of the lowest layer. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.buffered_read_stream.next_layer_type [*next_layer_type]]]
+ [The type of the next layer. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.buffered_read_stream.async_fill [*async_fill]]]
+ [Start an asynchronous fill. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_read_stream.async_read_some [*async_read_some]]]
+ [Start an asynchronous read. The buffer into which the data will be read must be valid for the lifetime of the asynchronous operation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_read_stream.async_write_some [*async_write_some]]]
+ [Start an asynchronous write. The data being written must be valid for the lifetime of the asynchronous operation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_read_stream.buffered_read_stream [*buffered_read_stream]]]
+ [Construct, passing the specified argument to initialise the next layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_read_stream.close [*close]]]
+ [Close the stream. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_read_stream.fill [*fill]]]
+ [Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation. Throws an exception on failure. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_read_stream.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_read_stream.in_avail [*in_avail]]]
+ [Determine the amount of data that may be read without blocking. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_read_stream.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_read_stream.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_read_stream.next_layer [*next_layer]]]
+ [Get a reference to the next layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_read_stream.peek [*peek]]]
+ [Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_read_stream.read_some [*read_some]]]
+ [Read some data from the stream. Returns the number of bytes read. Throws an exception on failure. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_read_stream.write_some [*write_some]]]
+ [Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.buffered_read_stream.default_buffer_size [*default_buffer_size]]]
+ [The default buffer size. ]
+ ]
+
+]
+
+The buffered_read_stream class template can be used to add buffering to the synchronous and asynchronous read operations of a stream.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
+
+
+
+[section:async_fill buffered_read_stream::async_fill]
+
+Start an asynchronous fill.
+
+ template<
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_fill(
+ ReadHandler handler);
+
+
+
+[endsect]
+
+
+
+[section:async_read_some buffered_read_stream::async_read_some]
+
+Start an asynchronous read. The buffer into which the data will be read must be valid for the lifetime of the asynchronous operation.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_read_some(
+ const MutableBufferSequence & buffers,
+ ReadHandler handler);
+
+
+
+[endsect]
+
+
+
+[section:async_write_some buffered_read_stream::async_write_some]
+
+Start an asynchronous write. The data being written must be valid for the lifetime of the asynchronous operation.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_write_some(
+ const ConstBufferSequence & buffers,
+ WriteHandler handler);
+
+
+
+[endsect]
+
+
+[section:buffered_read_stream buffered_read_stream::buffered_read_stream]
+
+Construct, passing the specified argument to initialise the next layer.
+
+ template<
+ typename Arg>
+ ``[link boost_asio.reference.buffered_read_stream.buffered_read_stream.overload1 buffered_read_stream]``(
+ Arg & a);
+
+ template<
+ typename Arg>
+ ``[link boost_asio.reference.buffered_read_stream.buffered_read_stream.overload2 buffered_read_stream]``(
+ Arg & a,
+ std::size_t buffer_size);
+
+
+[section:overload1 buffered_read_stream::buffered_read_stream (1 of 2 overloads)]
+
+Construct, passing the specified argument to initialise the next layer.
+
+ template<
+ typename Arg>
+ buffered_read_stream(
+ Arg & a);
+
+
+
+[endsect]
+
+
+
+[section:overload2 buffered_read_stream::buffered_read_stream (2 of 2 overloads)]
+
+Construct, passing the specified argument to initialise the next layer.
+
+ template<
+ typename Arg>
+ buffered_read_stream(
+ Arg & a,
+ std::size_t buffer_size);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:close buffered_read_stream::close]
+
+Close the stream.
+
+ void ``[link boost_asio.reference.buffered_read_stream.close.overload1 close]``();
+
+ boost::system::error_code ``[link boost_asio.reference.buffered_read_stream.close.overload2 close]``(
+ boost::system::error_code & ec);
+
+
+[section:overload1 buffered_read_stream::close (1 of 2 overloads)]
+
+Close the stream.
+
+ void close();
+
+
+
+[endsect]
+
+
+
+[section:overload2 buffered_read_stream::close (2 of 2 overloads)]
+
+Close the stream.
+
+ boost::system::error_code close(
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:default_buffer_size buffered_read_stream::default_buffer_size]
+
+The default buffer size.
+
+ static const std::size_t default_buffer_size = implementation_defined;
+
+
+
+[endsect]
+
+
+[section:fill buffered_read_stream::fill]
+
+Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation. Throws an exception on failure.
+
+ std::size_t ``[link boost_asio.reference.buffered_read_stream.fill.overload1 fill]``();
+
+ std::size_t ``[link boost_asio.reference.buffered_read_stream.fill.overload2 fill]``(
+ boost::system::error_code & ec);
+
+
+[section:overload1 buffered_read_stream::fill (1 of 2 overloads)]
+
+Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation. Throws an exception on failure.
+
+ std::size_t fill();
+
+
+
+[endsect]
+
+
+
+[section:overload2 buffered_read_stream::fill (2 of 2 overloads)]
+
+Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation, or 0 if an error occurred.
+
+ std::size_t fill(
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:get_io_service buffered_read_stream::get_io_service]
+
+Get the io_service associated with the object.
+
+ boost::asio::io_service & get_io_service();
+
+
+
+[endsect]
+
+
+[section:in_avail buffered_read_stream::in_avail]
+
+Determine the amount of data that may be read without blocking.
+
+ std::size_t ``[link boost_asio.reference.buffered_read_stream.in_avail.overload1 in_avail]``();
+
+ std::size_t ``[link boost_asio.reference.buffered_read_stream.in_avail.overload2 in_avail]``(
+ boost::system::error_code & ec);
+
+
+[section:overload1 buffered_read_stream::in_avail (1 of 2 overloads)]
+
+Determine the amount of data that may be read without blocking.
+
+ std::size_t in_avail();
+
+
+
+[endsect]
+
+
+
+[section:overload2 buffered_read_stream::in_avail (2 of 2 overloads)]
+
+Determine the amount of data that may be read without blocking.
+
+ std::size_t in_avail(
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:io_service buffered_read_stream::io_service]
+
+(Deprecated: use get_io_service().) Get the io_service associated with the object.
+
+ boost::asio::io_service & io_service();
+
+
+
+[endsect]
+
+
+
+[section:lowest_layer buffered_read_stream::lowest_layer]
+
+Get a reference to the lowest layer.
+
+ lowest_layer_type & lowest_layer();
+
+
+
+[endsect]
+
+
+
+[section:lowest_layer_type buffered_read_stream::lowest_layer_type]
+
+The type of the lowest layer.
+
+ typedef next_layer_type::lowest_layer_type lowest_layer_type;
+
+
+
+
+[endsect]
+
+
+
+[section:next_layer buffered_read_stream::next_layer]
+
+Get a reference to the next layer.
+
+ next_layer_type & next_layer();
+
+
+
+[endsect]
+
+
+
+[section:next_layer_type buffered_read_stream::next_layer_type]
+
+The type of the next layer.
+
+ typedef boost::remove_reference< Stream >::type next_layer_type;
+
+
+
+
+[endsect]
+
+
+[section:peek buffered_read_stream::peek]
+
+Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.buffered_read_stream.peek.overload1 peek]``(
+ const MutableBufferSequence & buffers);
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.buffered_read_stream.peek.overload2 peek]``(
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
+
+
+[section:overload1 buffered_read_stream::peek (1 of 2 overloads)]
+
+Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t peek(
+ const MutableBufferSequence & buffers);
+
+
+
+[endsect]
+
+
+
+[section:overload2 buffered_read_stream::peek (2 of 2 overloads)]
+
+Peek at the incoming data on the stream. Returns the number of bytes read, or 0 if an error occurred.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t peek(
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:read_some buffered_read_stream::read_some]
+
+Read some data from the stream. Returns the number of bytes read. Throws an exception on failure.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.buffered_read_stream.read_some.overload1 read_some]``(
+ const MutableBufferSequence & buffers);
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.buffered_read_stream.read_some.overload2 read_some]``(
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
+
+
+[section:overload1 buffered_read_stream::read_some (1 of 2 overloads)]
+
+Read some data from the stream. Returns the number of bytes read. Throws an exception on failure.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t read_some(
+ const MutableBufferSequence & buffers);
+
+
+
+[endsect]
+
+
+
+[section:overload2 buffered_read_stream::read_some (2 of 2 overloads)]
+
+Read some data from the stream. Returns the number of bytes read or 0 if an error occurred.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t read_some(
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:write_some buffered_read_stream::write_some]
+
+Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.buffered_read_stream.write_some.overload1 write_some]``(
+ const ConstBufferSequence & buffers);
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.buffered_read_stream.write_some.overload2 write_some]``(
+ const ConstBufferSequence & buffers,
+ boost::system::error_code & ec);
+
+
+[section:overload1 buffered_read_stream::write_some (1 of 2 overloads)]
+
+Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t write_some(
+ const ConstBufferSequence & buffers);
+
+
+
+[endsect]
+
+
+
+[section:overload2 buffered_read_stream::write_some (2 of 2 overloads)]
+
+Write the given data to the stream. Returns the number of bytes written, or 0 if an error occurred.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t write_some(
+ const ConstBufferSequence & buffers,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[endsect]
+
+[section:buffered_stream buffered_stream]
+
+Adds buffering to the read- and write-related operations of a stream.
+
+ template<
+ typename Stream>
+ class buffered_stream :
+ noncopyable
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.buffered_stream.lowest_layer_type [*lowest_layer_type]]]
+ [The type of the lowest layer. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.buffered_stream.next_layer_type [*next_layer_type]]]
+ [The type of the next layer. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.buffered_stream.async_fill [*async_fill]]]
+ [Start an asynchronous fill. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_stream.async_flush [*async_flush]]]
+ [Start an asynchronous flush. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_stream.async_read_some [*async_read_some]]]
+ [Start an asynchronous read. The buffer into which the data will be read must be valid for the lifetime of the asynchronous operation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_stream.async_write_some [*async_write_some]]]
+ [Start an asynchronous write. The data being written must be valid for the lifetime of the asynchronous operation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_stream.buffered_stream [*buffered_stream]]]
+ [Construct, passing the specified argument to initialise the next layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_stream.close [*close]]]
+ [Close the stream. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_stream.fill [*fill]]]
+ [Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation. Throws an exception on failure. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_stream.flush [*flush]]]
+ [Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation. Throws an exception on failure. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_stream.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_stream.in_avail [*in_avail]]]
+ [Determine the amount of data that may be read without blocking. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_stream.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_stream.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_stream.next_layer [*next_layer]]]
+ [Get a reference to the next layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_stream.peek [*peek]]]
+ [Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_stream.read_some [*read_some]]]
+ [Read some data from the stream. Returns the number of bytes read. Throws an exception on failure. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_stream.write_some [*write_some]]]
+ [Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure. ]
+ ]
+
+]
+
+The buffered_stream class template can be used to add buffering to the synchronous and asynchronous read and write operations of a stream.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
+
+
+
+[section:async_fill buffered_stream::async_fill]
+
+Start an asynchronous fill.
+
+ template<
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_fill(
+ ReadHandler handler);
+
+
+
+[endsect]
+
+
+
+[section:async_flush buffered_stream::async_flush]
+
+Start an asynchronous flush.
+
+ template<
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_flush(
+ WriteHandler handler);
+
+
+
+[endsect]
+
+
+
+[section:async_read_some buffered_stream::async_read_some]
+
+Start an asynchronous read. The buffer into which the data will be read must be valid for the lifetime of the asynchronous operation.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_read_some(
+ const MutableBufferSequence & buffers,
+ ReadHandler handler);
+
+
+
+[endsect]
+
+
+
+[section:async_write_some buffered_stream::async_write_some]
+
+Start an asynchronous write. The data being written must be valid for the lifetime of the asynchronous operation.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_write_some(
+ const ConstBufferSequence & buffers,
+ WriteHandler handler);
+
+
+
+[endsect]
+
+
+[section:buffered_stream buffered_stream::buffered_stream]
+
+Construct, passing the specified argument to initialise the next layer.
+
+ template<
+ typename Arg>
+ ``[link boost_asio.reference.buffered_stream.buffered_stream.overload1 buffered_stream]``(
+ Arg & a);
+
+ template<
+ typename Arg>
+ ``[link boost_asio.reference.buffered_stream.buffered_stream.overload2 buffered_stream]``(
+ Arg & a,
+ std::size_t read_buffer_size,
+ std::size_t write_buffer_size);
+
+
+[section:overload1 buffered_stream::buffered_stream (1 of 2 overloads)]
+
+Construct, passing the specified argument to initialise the next layer.
+
+ template<
+ typename Arg>
+ buffered_stream(
+ Arg & a);
+
+
+
+[endsect]
+
+
+
+[section:overload2 buffered_stream::buffered_stream (2 of 2 overloads)]
+
+Construct, passing the specified argument to initialise the next layer.
+
+ template<
+ typename Arg>
+ buffered_stream(
+ Arg & a,
+ std::size_t read_buffer_size,
+ std::size_t write_buffer_size);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:close buffered_stream::close]
+
+Close the stream.
+
+ void ``[link boost_asio.reference.buffered_stream.close.overload1 close]``();
+
+ boost::system::error_code ``[link boost_asio.reference.buffered_stream.close.overload2 close]``(
+ boost::system::error_code & ec);
+
+
+[section:overload1 buffered_stream::close (1 of 2 overloads)]
+
+Close the stream.
+
+ void close();
+
+
+
+[endsect]
+
+
+
+[section:overload2 buffered_stream::close (2 of 2 overloads)]
+
+Close the stream.
+
+ boost::system::error_code close(
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:fill buffered_stream::fill]
+
+Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation. Throws an exception on failure.
+
+ std::size_t ``[link boost_asio.reference.buffered_stream.fill.overload1 fill]``();
+
+ std::size_t ``[link boost_asio.reference.buffered_stream.fill.overload2 fill]``(
+ boost::system::error_code & ec);
+
+
+[section:overload1 buffered_stream::fill (1 of 2 overloads)]
+
+Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation. Throws an exception on failure.
+
+ std::size_t fill();
+
+
+
+[endsect]
+
+
+
+[section:overload2 buffered_stream::fill (2 of 2 overloads)]
+
+Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation, or 0 if an error occurred.
+
+ std::size_t fill(
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:flush buffered_stream::flush]
+
+Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation. Throws an exception on failure.
+
+ std::size_t ``[link boost_asio.reference.buffered_stream.flush.overload1 flush]``();
+
+ std::size_t ``[link boost_asio.reference.buffered_stream.flush.overload2 flush]``(
+ boost::system::error_code & ec);
+
+
+[section:overload1 buffered_stream::flush (1 of 2 overloads)]
+
+Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation. Throws an exception on failure.
+
+ std::size_t flush();
+
+
+
+[endsect]
+
+
+
+[section:overload2 buffered_stream::flush (2 of 2 overloads)]
+
+Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation, or 0 if an error occurred.
+
+ std::size_t flush(
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:get_io_service buffered_stream::get_io_service]
+
+Get the io_service associated with the object.
+
+ boost::asio::io_service & get_io_service();
+
+
+
+[endsect]
+
+
+[section:in_avail buffered_stream::in_avail]
+
+Determine the amount of data that may be read without blocking.
+
+ std::size_t ``[link boost_asio.reference.buffered_stream.in_avail.overload1 in_avail]``();
+
+ std::size_t ``[link boost_asio.reference.buffered_stream.in_avail.overload2 in_avail]``(
+ boost::system::error_code & ec);
+
+
+[section:overload1 buffered_stream::in_avail (1 of 2 overloads)]
+
+Determine the amount of data that may be read without blocking.
+
+ std::size_t in_avail();
+
+
+
+[endsect]
+
+
+
+[section:overload2 buffered_stream::in_avail (2 of 2 overloads)]
+
+Determine the amount of data that may be read without blocking.
+
+ std::size_t in_avail(
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:io_service buffered_stream::io_service]
+
+(Deprecated: use get_io_service().) Get the io_service associated with the object.
+
+ boost::asio::io_service & io_service();
+
+
+
+[endsect]
+
+
+
+[section:lowest_layer buffered_stream::lowest_layer]
+
+Get a reference to the lowest layer.
+
+ lowest_layer_type & lowest_layer();
+
+
+
+[endsect]
+
+
+
+[section:lowest_layer_type buffered_stream::lowest_layer_type]
+
+The type of the lowest layer.
+
+ typedef next_layer_type::lowest_layer_type lowest_layer_type;
+
+
+
+
+[endsect]
+
+
+
+[section:next_layer buffered_stream::next_layer]
+
+Get a reference to the next layer.
+
+ next_layer_type & next_layer();
+
+
+
+[endsect]
+
+
+
+[section:next_layer_type buffered_stream::next_layer_type]
+
+The type of the next layer.
+
+ typedef boost::remove_reference< Stream >::type next_layer_type;
+
+
+
+
+[endsect]
+
+
+[section:peek buffered_stream::peek]
+
+Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.buffered_stream.peek.overload1 peek]``(
+ const MutableBufferSequence & buffers);
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.buffered_stream.peek.overload2 peek]``(
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
+
+
+[section:overload1 buffered_stream::peek (1 of 2 overloads)]
+
+Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t peek(
+ const MutableBufferSequence & buffers);
+
+
+
+[endsect]
+
+
+
+[section:overload2 buffered_stream::peek (2 of 2 overloads)]
+
+Peek at the incoming data on the stream. Returns the number of bytes read, or 0 if an error occurred.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t peek(
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:read_some buffered_stream::read_some]
+
+Read some data from the stream. Returns the number of bytes read. Throws an exception on failure.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.buffered_stream.read_some.overload1 read_some]``(
+ const MutableBufferSequence & buffers);
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.buffered_stream.read_some.overload2 read_some]``(
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
+
+
+[section:overload1 buffered_stream::read_some (1 of 2 overloads)]
+
+Read some data from the stream. Returns the number of bytes read. Throws an exception on failure.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t read_some(
+ const MutableBufferSequence & buffers);
+
+
+
+[endsect]
+
+
+
+[section:overload2 buffered_stream::read_some (2 of 2 overloads)]
+
+Read some data from the stream. Returns the number of bytes read or 0 if an error occurred.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t read_some(
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:write_some buffered_stream::write_some]
+
+Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.buffered_stream.write_some.overload1 write_some]``(
+ const ConstBufferSequence & buffers);
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.buffered_stream.write_some.overload2 write_some]``(
+ const ConstBufferSequence & buffers,
+ boost::system::error_code & ec);
+
+
+[section:overload1 buffered_stream::write_some (1 of 2 overloads)]
+
+Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t write_some(
+ const ConstBufferSequence & buffers);
+
+
+
+[endsect]
+
+
+
+[section:overload2 buffered_stream::write_some (2 of 2 overloads)]
+
+Write the given data to the stream. Returns the number of bytes written, or 0 if an error occurred.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t write_some(
+ const ConstBufferSequence & buffers,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[endsect]
+
+[section:buffered_write_stream buffered_write_stream]
+
+Adds buffering to the write-related operations of a stream.
+
+ template<
+ typename Stream>
+ class buffered_write_stream :
+ noncopyable
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.buffered_write_stream.lowest_layer_type [*lowest_layer_type]]]
+ [The type of the lowest layer. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.buffered_write_stream.next_layer_type [*next_layer_type]]]
+ [The type of the next layer. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.buffered_write_stream.async_flush [*async_flush]]]
+ [Start an asynchronous flush. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_write_stream.async_read_some [*async_read_some]]]
+ [Start an asynchronous read. The buffer into which the data will be read must be valid for the lifetime of the asynchronous operation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_write_stream.async_write_some [*async_write_some]]]
+ [Start an asynchronous write. The data being written must be valid for the lifetime of the asynchronous operation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_write_stream.buffered_write_stream [*buffered_write_stream]]]
+ [Construct, passing the specified argument to initialise the next layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_write_stream.close [*close]]]
+ [Close the stream. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_write_stream.flush [*flush]]]
+ [Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation. Throws an exception on failure. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_write_stream.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_write_stream.in_avail [*in_avail]]]
+ [Determine the amount of data that may be read without blocking. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_write_stream.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_write_stream.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_write_stream.next_layer [*next_layer]]]
+ [Get a reference to the next layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_write_stream.peek [*peek]]]
+ [Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_write_stream.read_some [*read_some]]]
+ [Read some data from the stream. Returns the number of bytes read. Throws an exception on failure. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffered_write_stream.write_some [*write_some]]]
+ [Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.buffered_write_stream.default_buffer_size [*default_buffer_size]]]
+ [The default buffer size. ]
+ ]
+
+]
+
+The buffered_write_stream class template can be used to add buffering to the synchronous and asynchronous write operations of a stream.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
+
+
+
+[section:async_flush buffered_write_stream::async_flush]
+
+Start an asynchronous flush.
+
+ template<
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_flush(
+ WriteHandler handler);
+
+
+
+[endsect]
+
+
+
+[section:async_read_some buffered_write_stream::async_read_some]
+
+Start an asynchronous read. The buffer into which the data will be read must be valid for the lifetime of the asynchronous operation.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_read_some(
+ const MutableBufferSequence & buffers,
+ ReadHandler handler);
+
+
+
+[endsect]
+
+
+
+[section:async_write_some buffered_write_stream::async_write_some]
+
+Start an asynchronous write. The data being written must be valid for the lifetime of the asynchronous operation.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_write_some(
+ const ConstBufferSequence & buffers,
+ WriteHandler handler);
+
+
+
+[endsect]
+
+
+[section:buffered_write_stream buffered_write_stream::buffered_write_stream]
+
+Construct, passing the specified argument to initialise the next layer.
+
+ template<
+ typename Arg>
+ ``[link boost_asio.reference.buffered_write_stream.buffered_write_stream.overload1 buffered_write_stream]``(
+ Arg & a);
+
+ template<
+ typename Arg>
+ ``[link boost_asio.reference.buffered_write_stream.buffered_write_stream.overload2 buffered_write_stream]``(
+ Arg & a,
+ std::size_t buffer_size);
+
+
+[section:overload1 buffered_write_stream::buffered_write_stream (1 of 2 overloads)]
+
+Construct, passing the specified argument to initialise the next layer.
+
+ template<
+ typename Arg>
+ buffered_write_stream(
+ Arg & a);
+
+
+
+[endsect]
+
+
+
+[section:overload2 buffered_write_stream::buffered_write_stream (2 of 2 overloads)]
+
+Construct, passing the specified argument to initialise the next layer.
+
+ template<
+ typename Arg>
+ buffered_write_stream(
+ Arg & a,
+ std::size_t buffer_size);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:close buffered_write_stream::close]
+
+Close the stream.
+
+ void ``[link boost_asio.reference.buffered_write_stream.close.overload1 close]``();
+
+ boost::system::error_code ``[link boost_asio.reference.buffered_write_stream.close.overload2 close]``(
+ boost::system::error_code & ec);
+
+
+[section:overload1 buffered_write_stream::close (1 of 2 overloads)]
+
+Close the stream.
+
+ void close();
+
+
+
+[endsect]
+
+
+
+[section:overload2 buffered_write_stream::close (2 of 2 overloads)]
+
+Close the stream.
+
+ boost::system::error_code close(
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:default_buffer_size buffered_write_stream::default_buffer_size]
+
+The default buffer size.
+
+ static const std::size_t default_buffer_size = implementation_defined;
+
+
+
+[endsect]
+
+
+[section:flush buffered_write_stream::flush]
+
+Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation. Throws an exception on failure.
+
+ std::size_t ``[link boost_asio.reference.buffered_write_stream.flush.overload1 flush]``();
+
+ std::size_t ``[link boost_asio.reference.buffered_write_stream.flush.overload2 flush]``(
+ boost::system::error_code & ec);
+
+
+[section:overload1 buffered_write_stream::flush (1 of 2 overloads)]
+
+Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation. Throws an exception on failure.
+
+ std::size_t flush();
+
+
+
+[endsect]
+
+
+
+[section:overload2 buffered_write_stream::flush (2 of 2 overloads)]
+
+Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation, or 0 if an error occurred.
+
+ std::size_t flush(
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:get_io_service buffered_write_stream::get_io_service]
+
+Get the io_service associated with the object.
+
+ boost::asio::io_service & get_io_service();
+
+
+
+[endsect]
+
+
+[section:in_avail buffered_write_stream::in_avail]
+
+Determine the amount of data that may be read without blocking.
+
+ std::size_t ``[link boost_asio.reference.buffered_write_stream.in_avail.overload1 in_avail]``();
+
+ std::size_t ``[link boost_asio.reference.buffered_write_stream.in_avail.overload2 in_avail]``(
+ boost::system::error_code & ec);
+
+
+[section:overload1 buffered_write_stream::in_avail (1 of 2 overloads)]
+
+Determine the amount of data that may be read without blocking.
+
+ std::size_t in_avail();
+
+
+
+[endsect]
+
+
+
+[section:overload2 buffered_write_stream::in_avail (2 of 2 overloads)]
+
+Determine the amount of data that may be read without blocking.
+
+ std::size_t in_avail(
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:io_service buffered_write_stream::io_service]
+
+(Deprecated: use get_io_service().) Get the io_service associated with the object.
+
+ boost::asio::io_service & io_service();
+
+
+
+[endsect]
+
+
+
+[section:lowest_layer buffered_write_stream::lowest_layer]
+
+Get a reference to the lowest layer.
+
+ lowest_layer_type & lowest_layer();
+
+
+
+[endsect]
+
+
+
+[section:lowest_layer_type buffered_write_stream::lowest_layer_type]
+
+The type of the lowest layer.
+
+ typedef next_layer_type::lowest_layer_type lowest_layer_type;
+
+
+
+
+[endsect]
+
+
+
+[section:next_layer buffered_write_stream::next_layer]
+
+Get a reference to the next layer.
+
+ next_layer_type & next_layer();
+
+
+
+[endsect]
+
+
+
+[section:next_layer_type buffered_write_stream::next_layer_type]
+
+The type of the next layer.
+
+ typedef boost::remove_reference< Stream >::type next_layer_type;
+
+
+
+
+[endsect]
+
+
+[section:peek buffered_write_stream::peek]
+
+Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.buffered_write_stream.peek.overload1 peek]``(
+ const MutableBufferSequence & buffers);
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.buffered_write_stream.peek.overload2 peek]``(
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
+
+
+[section:overload1 buffered_write_stream::peek (1 of 2 overloads)]
+
+Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t peek(
+ const MutableBufferSequence & buffers);
+
+
+
+[endsect]
+
+
+
+[section:overload2 buffered_write_stream::peek (2 of 2 overloads)]
+
+Peek at the incoming data on the stream. Returns the number of bytes read, or 0 if an error occurred.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t peek(
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:read_some buffered_write_stream::read_some]
+
+Read some data from the stream. Returns the number of bytes read. Throws an exception on failure.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.buffered_write_stream.read_some.overload1 read_some]``(
+ const MutableBufferSequence & buffers);
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.buffered_write_stream.read_some.overload2 read_some]``(
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
+
+
+[section:overload1 buffered_write_stream::read_some (1 of 2 overloads)]
+
+Read some data from the stream. Returns the number of bytes read. Throws an exception on failure.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t read_some(
+ const MutableBufferSequence & buffers);
+
+
+
+[endsect]
+
+
+
+[section:overload2 buffered_write_stream::read_some (2 of 2 overloads)]
+
+Read some data from the stream. Returns the number of bytes read or 0 if an error occurred.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t read_some(
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:write_some buffered_write_stream::write_some]
+
+Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.buffered_write_stream.write_some.overload1 write_some]``(
+ const ConstBufferSequence & buffers);
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.buffered_write_stream.write_some.overload2 write_some]``(
+ const ConstBufferSequence & buffers,
+ boost::system::error_code & ec);
+
+
+[section:overload1 buffered_write_stream::write_some (1 of 2 overloads)]
+
+Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t write_some(
+ const ConstBufferSequence & buffers);
+
+
+
+[endsect]
+
+
+
+[section:overload2 buffered_write_stream::write_some (2 of 2 overloads)]
+
+Write the given data to the stream. Returns the number of bytes written, or 0 if an error occurred and the error handler did not throw.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t write_some(
+ const ConstBufferSequence & buffers,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:buffers_begin buffers_begin]
+
+Construct an iterator representing the beginning of the buffers' data.
+
+ template<
+ typename ``[link boost_asio.reference.BufferSequence BufferSequence]``>
+ buffers_iterator< BufferSequence > buffers_begin(
+ const BufferSequence & buffers);
+
+
+
+[endsect]
+
+
+
+[section:buffers_end buffers_end]
+
+Construct an iterator representing the end of the buffers' data.
+
+ template<
+ typename ``[link boost_asio.reference.BufferSequence BufferSequence]``>
+ buffers_iterator< BufferSequence > buffers_end(
+ const BufferSequence & buffers);
+
+
+
+[endsect]
+
+
+[section:buffers_iterator buffers_iterator]
+
+A random access iterator over the bytes in a buffer sequence.
+
+ template<
+ typename ``[link boost_asio.reference.BufferSequence BufferSequence]``,
+ typename ``[link boost_asio.reference.ByteType ByteType]`` = char>
+ class buffers_iterator
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.buffers_iterator.begin [*begin]]]
+ [Construct an iterator representing the beginning of the buffers' data. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffers_iterator.buffers_iterator [*buffers_iterator]]]
+ [Default constructor. Creates an iterator in an undefined state. ]
+ ]
+
+ [
+ [[link boost_asio.reference.buffers_iterator.end [*end]]]
+ [Construct an iterator representing the end of the buffers' data. ]
+ ]
+
+]
+
+
+[section:begin buffers_iterator::begin]
+
+Construct an iterator representing the beginning of the buffers' data.
+
+ static buffers_iterator begin(
+ const BufferSequence & buffers);
+
+
+
+[endsect]
+
+
+
+[section:buffers_iterator buffers_iterator::buffers_iterator]
+
+Default constructor. Creates an iterator in an undefined state.
+
+ buffers_iterator();
+
+
+
+[endsect]
+
+
+
+[section:end buffers_iterator::end]
+
+Construct an iterator representing the end of the buffers' data.
+
+ static buffers_iterator end(
+ const BufferSequence & buffers);
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:const_buffer const_buffer]
+
+Holds a buffer that cannot be modified.
+
+ class const_buffer
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.const_buffer.const_buffer [*const_buffer]]]
+ [Construct an empty buffer. ]
+ ]
+
+]
+
+[heading Related Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.const_buffer.buffer_cast [*buffer_cast]]]
+ [Cast a non-modifiable buffer to a specified pointer to POD type. ]
+ ]
+
+ [
+ [[link boost_asio.reference.const_buffer.buffer_size [*buffer_size]]]
+ [Get the number of bytes in a non-modifiable buffer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.const_buffer.operator_plus_ [*operator+]]]
+ [Create a new non-modifiable buffer that is offset from the start of another. ]
+ ]
+
+]
+
+The const_buffer class provides a safe representation of a buffer that cannot be modified. It does not own the underlying data, and so is cheap to copy or assign.
+
+
+[section:buffer_cast const_buffer::buffer_cast]
+
+Cast a non-modifiable buffer to a specified pointer to POD type.
+
+ template<
+ typename ``[link boost_asio.reference.PointerToPodType PointerToPodType]``>
+ PointerToPodType buffer_cast(
+ const const_buffer & b);
+
+
+
+[endsect]
+
+
+
+[section:buffer_size const_buffer::buffer_size]
+
+Get the number of bytes in a non-modifiable buffer.
+
+ std::size_t buffer_size(
+ const const_buffer & b);
+
+
+
+[endsect]
+
+
+[section:const_buffer const_buffer::const_buffer]
+
+Construct an empty buffer.
+
+ ``[link boost_asio.reference.const_buffer.const_buffer.overload1 const_buffer]``();
+
+ ``[link boost_asio.reference.const_buffer.const_buffer.overload2 const_buffer]``(
+ const void * data,
+ std::size_t size);
+
+ ``[link boost_asio.reference.const_buffer.const_buffer.overload3 const_buffer]``(
+ const mutable_buffer & b);
+
+
+[section:overload1 const_buffer::const_buffer (1 of 3 overloads)]
+
+Construct an empty buffer.
+
+ const_buffer();
+
+
+
+[endsect]
+
+
+
+[section:overload2 const_buffer::const_buffer (2 of 3 overloads)]
+
+Construct a buffer to represent a given memory range.
+
+ const_buffer(
+ const void * data,
+ std::size_t size);
+
+
+
+[endsect]
+
+
+
+[section:overload3 const_buffer::const_buffer (3 of 3 overloads)]
+
+Construct a non-modifiable buffer from a modifiable one.
+
+ const_buffer(
+ const mutable_buffer & b);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:operator_plus_ const_buffer::operator+]
+
+Create a new non-modifiable buffer that is offset from the start of another.
+
+ const_buffer ``[link boost_asio.reference.const_buffer.operator_plus_.overload1 operator+]``(
+ const const_buffer & b,
+ std::size_t start);
+
+ const_buffer ``[link boost_asio.reference.const_buffer.operator_plus_.overload2 operator+]``(
+ std::size_t start,
+ const const_buffer & b);
+
+
+[section:overload1 const_buffer::operator+ (1 of 2 overloads)]
+
+Create a new non-modifiable buffer that is offset from the start of another.
+
+ const_buffer operator+(
+ const const_buffer & b,
+ std::size_t start);
+
+
+
+[endsect]
+
+
+
+[section:overload2 const_buffer::operator+ (2 of 2 overloads)]
+
+Create a new non-modifiable buffer that is offset from the start of another.
+
+ const_buffer operator+(
+ std::size_t start,
+ const const_buffer & b);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[endsect]
+
+[section:const_buffers_1 const_buffers_1]
+
+Adapts a single non-modifiable buffer so that it meets the requirements of the ConstBufferSequence concept.
+
+ class const_buffers_1 :
+ public const_buffer
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.const_buffers_1.const_iterator [*const_iterator]]]
+ [A random-access iterator type that may be used to read elements. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.const_buffers_1.value_type [*value_type]]]
+ [The type for each element in the list of buffers. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.const_buffers_1.begin [*begin]]]
+ [Get a random-access iterator to the first element. ]
+ ]
+
+ [
+ [[link boost_asio.reference.const_buffers_1.const_buffers_1 [*const_buffers_1]]]
+ [Construct to represent a single non-modifiable buffer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.const_buffers_1.end [*end]]]
+ [Get a random-access iterator for one past the last element. ]
+ ]
+
+]
+
+[heading Related Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.const_buffers_1.buffer_cast [*buffer_cast]]]
+ [Cast a non-modifiable buffer to a specified pointer to POD type. ]
+ ]
+
+ [
+ [[link boost_asio.reference.const_buffers_1.buffer_size [*buffer_size]]]
+ [Get the number of bytes in a non-modifiable buffer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.const_buffers_1.operator_plus_ [*operator+]]]
+ [Create a new non-modifiable buffer that is offset from the start of another. ]
+ ]
+
+]
+
+
+[section:begin const_buffers_1::begin]
+
+Get a random-access iterator to the first element.
+
+ const_iterator begin() const;
+
+
+
+[endsect]
+
+
+
+[section:buffer_cast const_buffers_1::buffer_cast]
+
+
+['Inherited from const_buffer.]
+
+Cast a non-modifiable buffer to a specified pointer to POD type.
+
+ template<
+ typename ``[link boost_asio.reference.PointerToPodType PointerToPodType]``>
+ PointerToPodType buffer_cast(
+ const const_buffer & b);
+
+
+
+[endsect]
+
+
+
+[section:buffer_size const_buffers_1::buffer_size]
+
+
+['Inherited from const_buffer.]
+
+Get the number of bytes in a non-modifiable buffer.
+
+ std::size_t buffer_size(
+ const const_buffer & b);
+
+
+
+[endsect]
+
+
+
+[section:const_buffers_1 const_buffers_1::const_buffers_1]
+
+Construct to represent a single non-modifiable buffer.
+
+ const_buffers_1(
+ const const_buffer & b);
+
+
+
+[endsect]
+
+
+
+[section:const_iterator const_buffers_1::const_iterator]
+
+A random-access iterator type that may be used to read elements.
+
+ typedef const const_buffer * const_iterator;
+
+
+
+
+[endsect]
+
+
+
+[section:end const_buffers_1::end]
+
+Get a random-access iterator for one past the last element.
+
+ const_iterator end() const;
+
+
+
+[endsect]
+
+
+[section:operator_plus_ const_buffers_1::operator+]
+
+Create a new non-modifiable buffer that is offset from the start of another.
+
+ const_buffer ``[link boost_asio.reference.const_buffers_1.operator_plus_.overload1 operator+]``(
+ const const_buffer & b,
+ std::size_t start);
+
+ const_buffer ``[link boost_asio.reference.const_buffers_1.operator_plus_.overload2 operator+]``(
+ std::size_t start,
+ const const_buffer & b);
+
+
+[section:overload1 const_buffers_1::operator+ (1 of 2 overloads)]
+
+
+['Inherited from const_buffer.]
+
+Create a new non-modifiable buffer that is offset from the start of another.
+
+ const_buffer operator+(
+ const const_buffer & b,
+ std::size_t start);
+
+
+
+[endsect]
+
+
+
+[section:overload2 const_buffers_1::operator+ (2 of 2 overloads)]
+
+
+['Inherited from const_buffer.]
+
+Create a new non-modifiable buffer that is offset from the start of another.
+
+ const_buffer operator+(
+ std::size_t start,
+ const const_buffer & b);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:value_type const_buffers_1::value_type]
+
+The type for each element in the list of buffers.
+
+ typedef const_buffer value_type;
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.const_buffer.const_buffer [*const_buffer]]]
+ [Construct an empty buffer. ]
+ ]
+
+]
+
+[heading Related Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.const_buffer.buffer_cast [*buffer_cast]]]
+ [Cast a non-modifiable buffer to a specified pointer to POD type. ]
+ ]
+
+ [
+ [[link boost_asio.reference.const_buffer.buffer_size [*buffer_size]]]
+ [Get the number of bytes in a non-modifiable buffer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.const_buffer.operator_plus_ [*operator+]]]
+ [Create a new non-modifiable buffer that is offset from the start of another. ]
+ ]
+
+]
+
+The const_buffer class provides a safe representation of a buffer that cannot be modified. It does not own the underlying data, and so is cheap to copy or assign.
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:datagram_socket_service datagram_socket_service]
+
+Default service implementation for a datagram socket.
+
+ template<
+ typename ``[link boost_asio.reference.Protocol Protocol]``>
+ class datagram_socket_service :
+ public io_service::service
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.datagram_socket_service.endpoint_type [*endpoint_type]]]
+ [The endpoint type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.datagram_socket_service.implementation_type [*implementation_type]]]
+ [The type of a datagram socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.datagram_socket_service.native_type [*native_type]]]
+ [The native socket type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.datagram_socket_service.protocol_type [*protocol_type]]]
+ [The protocol type. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.assign [*assign]]]
+ [Assign an existing native socket to a datagram socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.async_connect [*async_connect]]]
+ [Start an asynchronous connect. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.async_receive [*async_receive]]]
+ [Start an asynchronous receive. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.async_receive_from [*async_receive_from]]]
+ [Start an asynchronous receive that will get the endpoint of the sender. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.async_send [*async_send]]]
+ [Start an asynchronous send. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.async_send_to [*async_send_to]]]
+ [Start an asynchronous send. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.at_mark [*at_mark]]]
+ [Determine whether the socket is at the out-of-band data mark. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.available [*available]]]
+ [Determine the number of bytes available for reading. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.bind [*bind]]]
+ []
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.close [*close]]]
+ [Close a datagram socket implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.connect [*connect]]]
+ [Connect the datagram socket to the specified endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.construct [*construct]]]
+ [Construct a new datagram socket implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.datagram_socket_service [*datagram_socket_service]]]
+ [Construct a new datagram socket service for the specified io_service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.destroy [*destroy]]]
+ [Destroy a datagram socket implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.get_io_service [*get_io_service]]]
+ [Get the io_service object that owns the service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.get_option [*get_option]]]
+ [Get a socket option. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.io_control [*io_control]]]
+ [Perform an IO control command on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service object that owns the service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.is_open [*is_open]]]
+ [Determine whether the socket is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.local_endpoint [*local_endpoint]]]
+ [Get the local endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.native [*native]]]
+ [Get the native socket implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.open [*open]]]
+ []
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.receive [*receive]]]
+ [Receive some data from the peer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.receive_from [*receive_from]]]
+ [Receive a datagram with the endpoint of the sender. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.remote_endpoint [*remote_endpoint]]]
+ [Get the remote endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.send [*send]]]
+ [Send the given data to the peer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.send_to [*send_to]]]
+ [Send a datagram to the specified endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.set_option [*set_option]]]
+ [Set a socket option. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.shutdown [*shutdown]]]
+ [Disable sends or receives on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.shutdown_service [*shutdown_service]]]
+ [Destroy all user-defined handler objects owned by the service. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.datagram_socket_service.id [*id]]]
+ [The unique service identifier. ]
+ ]
+
+]
+
+
+[section:assign datagram_socket_service::assign]
+
+Assign an existing native socket to a datagram socket.
+
+ boost::system::error_code assign(
+ implementation_type & impl,
+ const protocol_type & protocol,
+ const native_type & native_socket,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:async_connect datagram_socket_service::async_connect]
+
+Start an asynchronous connect.
+
+ template<
+ typename ``[link boost_asio.reference.ConnectHandler ConnectHandler]``>
+ void async_connect(
+ implementation_type & impl,
+ const endpoint_type & peer_endpoint,
+ ConnectHandler handler);
+
+
+
+[endsect]
+
+
+
+[section:async_receive datagram_socket_service::async_receive]
+
+Start an asynchronous receive.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_receive(
+ implementation_type & impl,
+ const MutableBufferSequence & buffers,
+ socket_base::message_flags flags,
+ ReadHandler handler);
+
+
+
+[endsect]
+
+
+
+[section:async_receive_from datagram_socket_service::async_receive_from]
+
+Start an asynchronous receive that will get the endpoint of the sender.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_receive_from(
+ implementation_type & impl,
+ const MutableBufferSequence & buffers,
+ endpoint_type & sender_endpoint,
+ socket_base::message_flags flags,
+ ReadHandler handler);
+
+
+
+[endsect]
+
+
+
+[section:async_send datagram_socket_service::async_send]
+
+Start an asynchronous send.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_send(
+ implementation_type & impl,
+ const ConstBufferSequence & buffers,
+ socket_base::message_flags flags,
+ WriteHandler handler);
+
+
+
+[endsect]
+
+
+
+[section:async_send_to datagram_socket_service::async_send_to]
+
+Start an asynchronous send.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_send_to(
+ implementation_type & impl,
+ const ConstBufferSequence & buffers,
+ const endpoint_type & destination,
+ socket_base::message_flags flags,
+ WriteHandler handler);
+
+
+
+[endsect]
+
+
+
+[section:at_mark datagram_socket_service::at_mark]
+
+Determine whether the socket is at the out-of-band data mark.
+
+ bool at_mark(
+ const implementation_type & impl,
+ boost::system::error_code & ec) const;
+
+
+
+[endsect]
+
+
+
+[section:available datagram_socket_service::available]
+
+Determine the number of bytes available for reading.
+
+ std::size_t available(
+ const implementation_type & impl,
+ boost::system::error_code & ec) const;
+
+
+
+[endsect]
+
+
+
+[section:bind datagram_socket_service::bind]
+
+
+
+ boost::system::error_code bind(
+ implementation_type & impl,
+ const endpoint_type & endpoint,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:cancel datagram_socket_service::cancel]
+
+Cancel all asynchronous operations associated with the socket.
+
+ boost::system::error_code cancel(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:close datagram_socket_service::close]
+
+Close a datagram socket implementation.
+
+ boost::system::error_code close(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:connect datagram_socket_service::connect]
+
+Connect the datagram socket to the specified endpoint.
+
+ boost::system::error_code connect(
+ implementation_type & impl,
+ const endpoint_type & peer_endpoint,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:construct datagram_socket_service::construct]
+
+Construct a new datagram socket implementation.
+
+ void construct(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:datagram_socket_service datagram_socket_service::datagram_socket_service]
+
+Construct a new datagram socket service for the specified io_service.
+
+ datagram_socket_service(
+ boost::asio::io_service & io_service);
+
+
+
+[endsect]
+
+
+
+[section:destroy datagram_socket_service::destroy]
+
+Destroy a datagram socket implementation.
+
+ void destroy(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:endpoint_type datagram_socket_service::endpoint_type]
+
+The endpoint type.
+
+ typedef Protocol::endpoint endpoint_type;
+
+
+
+
+[endsect]
+
+
+
+[section:get_io_service datagram_socket_service::get_io_service]
+
+
+['Inherited from io_service.]
+
+Get the io_service object that owns the service.
+
+ boost::asio::io_service & get_io_service();
+
+
+
+[endsect]
+
+
+
+[section:get_option datagram_socket_service::get_option]
+
+Get a socket option.
+
+ template<
+ typename ``[link boost_asio.reference.GettableSocketOption GettableSocketOption]``>
+ boost::system::error_code get_option(
+ const implementation_type & impl,
+ GettableSocketOption & option,
+ boost::system::error_code & ec) const;
+
+
+
+[endsect]
+
+
+
+[section:id datagram_socket_service::id]
+
+The unique service identifier.
+
+ static boost::asio::io_service::id id;
+
+
+
+[endsect]
+
+
+
+[section:implementation_type datagram_socket_service::implementation_type]
+
+The type of a datagram socket.
+
+ typedef implementation_defined implementation_type;
+
+
+
+
+[endsect]
+
+
+
+[section:io_control datagram_socket_service::io_control]
+
+Perform an IO control command on the socket.
+
+ template<
+ typename ``[link boost_asio.reference.IoControlCommand IoControlCommand]``>
+ boost::system::error_code io_control(
+ implementation_type & impl,
+ IoControlCommand & command,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:io_service datagram_socket_service::io_service]
+
+
+['Inherited from io_service.]
+
+(Deprecated: use get_io_service().) Get the io_service object that owns the service.
+
+ boost::asio::io_service & io_service();
+
+
+
+[endsect]
+
+
+
+[section:is_open datagram_socket_service::is_open]
+
+Determine whether the socket is open.
+
+ bool is_open(
+ const implementation_type & impl) const;
+
+
+
+[endsect]
+
+
+
+[section:local_endpoint datagram_socket_service::local_endpoint]
+
+Get the local endpoint.
+
+ endpoint_type local_endpoint(
+ const implementation_type & impl,
+ boost::system::error_code & ec) const;
+
+
+
+[endsect]
+
+
+
+[section:native datagram_socket_service::native]
+
+Get the native socket implementation.
+
+ native_type native(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:native_type datagram_socket_service::native_type]
+
+The native socket type.
+
+ typedef implementation_defined native_type;
+
+
+
+
+[endsect]
+
+
+
+[section:open datagram_socket_service::open]
+
+
+
+ boost::system::error_code open(
+ implementation_type & impl,
+ const protocol_type & protocol,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:protocol_type datagram_socket_service::protocol_type]
+
+The protocol type.
+
+ typedef Protocol protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:receive datagram_socket_service::receive]
+
+Receive some data from the peer.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t receive(
+ implementation_type & impl,
+ const MutableBufferSequence & buffers,
+ socket_base::message_flags flags,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:receive_from datagram_socket_service::receive_from]
+
+Receive a datagram with the endpoint of the sender.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t receive_from(
+ implementation_type & impl,
+ const MutableBufferSequence & buffers,
+ endpoint_type & sender_endpoint,
+ socket_base::message_flags flags,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:remote_endpoint datagram_socket_service::remote_endpoint]
+
+Get the remote endpoint.
+
+ endpoint_type remote_endpoint(
+ const implementation_type & impl,
+ boost::system::error_code & ec) const;
+
+
+
+[endsect]
+
+
+
+[section:send datagram_socket_service::send]
+
+Send the given data to the peer.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t send(
+ implementation_type & impl,
+ const ConstBufferSequence & buffers,
+ socket_base::message_flags flags,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:send_to datagram_socket_service::send_to]
+
+Send a datagram to the specified endpoint.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t send_to(
+ implementation_type & impl,
+ const ConstBufferSequence & buffers,
+ const endpoint_type & destination,
+ socket_base::message_flags flags,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:set_option datagram_socket_service::set_option]
+
+Set a socket option.
+
+ template<
+ typename ``[link boost_asio.reference.SettableSocketOption SettableSocketOption]``>
+ boost::system::error_code set_option(
+ implementation_type & impl,
+ const SettableSocketOption & option,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:shutdown datagram_socket_service::shutdown]
+
+Disable sends or receives on the socket.
+
+ boost::system::error_code shutdown(
+ implementation_type & impl,
+ socket_base::shutdown_type what,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:shutdown_service datagram_socket_service::shutdown_service]
+
+Destroy all user-defined handler objects owned by the service.
+
+ void shutdown_service();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+
+[section:deadline_timer deadline_timer]
+
+Typedef for the typical usage of timer.
+
+ typedef basic_deadline_timer< boost::posix_time::ptime > deadline_timer;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.basic_deadline_timer.duration_type [*duration_type]]]
+ [The duration type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_deadline_timer.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_deadline_timer.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_deadline_timer.time_type [*time_type]]]
+ [The time type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_deadline_timer.traits_type [*traits_type]]]
+ [The time traits type. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_deadline_timer.async_wait [*async_wait]]]
+ [Start an asynchronous wait on the timer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_deadline_timer.basic_deadline_timer [*basic_deadline_timer]]]
+ [Constructor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_deadline_timer.cancel [*cancel]]]
+ [Cancel any asynchronous operations that are waiting on the timer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_deadline_timer.expires_at [*expires_at]]]
+ [Get the timer's expiry time as an absolute time. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_deadline_timer.expires_from_now [*expires_from_now]]]
+ [Get the timer's expiry time relative to now. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_deadline_timer.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_deadline_timer.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_deadline_timer.wait [*wait]]]
+ [Perform a blocking wait on the timer. ]
+ ]
+
+]
+
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_deadline_timer.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_deadline_timer.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
+
+]
+
+The basic_deadline_timer class template provides the ability to perform a blocking or asynchronous wait for a timer to expire.
+
+Most applications will use the boost::asio::deadline\_timer typedef.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
+
+[heading Examples]
+
+Performing a blocking wait:
+
+ // Construct a timer without setting an expiry time.
+ boost::asio::deadline_timer timer(io_service);
+
+ // Set an expiry time relative to now.
+ timer.expires_from_now(boost::posix_time::seconds(5));
+
+ // Wait for the timer to expire.
+ timer.wait();
+
+
+
+
+Performing an asynchronous wait:
+
+ void handler(const boost::system::error_code& error)
+ {
+ if (!error)
+ {
+ // Timer expired.
+ }
+ }
+
+ ...
+
+ // Construct a timer with an absolute expiry time.
+ boost::asio::deadline_timer timer(io_service,
+ boost::posix_time::time_from_string("2005-12-07 23:59:59.000"));
+
+ // Start an asynchronous wait.
+ timer.async_wait(handler);
+
+
+
+
+[heading Changing an active deadline_timer's expiry time]
+
+
+
+Changing the expiry time of a timer while there are pending asynchronous waits causes those wait operations to be cancelled. To ensure that the action associated with the timer is performed only once, use something like this: used:
+
+
+
+ void on_some_event()
+ {
+ if (my_timer.expires_from_now(seconds(5)) > 0)
+ {
+ // We managed to cancel the timer. Start new asynchronous wait.
+ my_timer.async_wait(on_timeout);
+ }
+ else
+ {
+ // Too late, timer has already expired!
+ }
+ }
+
+ void on_timeout(const boost::system::error_code& e)
+ {
+ if (e != boost::asio::error::operation_aborted)
+ {
+ // Timer was not cancelled, take necessary action.
+ }
+ }
+
+
+
+
+
+* The boost::asio::basic_deadline_timer::expires_from_now() function cancels any pending asynchronous waits, and returns the number of asynchronous waits that were cancelled. If it returns 0 then you were too late and the wait handler has already been executed, or will soon be executed. If it returns 1 then the wait handler was successfully cancelled.
+
+* If a wait handler is cancelled, the boost::system::error_code passed to it contains the value boost::asio::error::operation_aborted.
+
+
+
+
+[endsect]
+
+
+[section:deadline_timer_service deadline_timer_service]
+
+Default service implementation for a timer.
+
+ template<
+ typename ``[link boost_asio.reference.TimeType TimeType]``,
+ typename ``[link boost_asio.reference.TimeTraits TimeTraits]`` = boost::asio::time_traits<TimeType>>
+ class deadline_timer_service :
+ public io_service::service
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.deadline_timer_service.duration_type [*duration_type]]]
+ [The duration type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.deadline_timer_service.implementation_type [*implementation_type]]]
+ [The implementation type of the deadline timer. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.deadline_timer_service.time_type [*time_type]]]
+ [The time type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.deadline_timer_service.traits_type [*traits_type]]]
+ [The time traits type. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.deadline_timer_service.async_wait [*async_wait]]]
+ []
+ ]
+
+ [
+ [[link boost_asio.reference.deadline_timer_service.cancel [*cancel]]]
+ [Cancel any asynchronous wait operations associated with the timer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.deadline_timer_service.construct [*construct]]]
+ [Construct a new timer implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.deadline_timer_service.deadline_timer_service [*deadline_timer_service]]]
+ [Construct a new timer service for the specified io_service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.deadline_timer_service.destroy [*destroy]]]
+ [Destroy a timer implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.deadline_timer_service.expires_at [*expires_at]]]
+ [Get the expiry time for the timer as an absolute time. ]
+ ]
+
+ [
+ [[link boost_asio.reference.deadline_timer_service.expires_from_now [*expires_from_now]]]
+ [Get the expiry time for the timer relative to now. ]
+ ]
+
+ [
+ [[link boost_asio.reference.deadline_timer_service.get_io_service [*get_io_service]]]
+ [Get the io_service object that owns the service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.deadline_timer_service.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service object that owns the service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.deadline_timer_service.shutdown_service [*shutdown_service]]]
+ [Destroy all user-defined handler objects owned by the service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.deadline_timer_service.wait [*wait]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.deadline_timer_service.id [*id]]]
+ [The unique service identifier. ]
+ ]
+
+]
+
+
+[section:async_wait deadline_timer_service::async_wait]
+
+
+
+ template<
+ typename ``[link boost_asio.reference.WaitHandler WaitHandler]``>
+ void async_wait(
+ implementation_type & impl,
+ WaitHandler handler);
+
+
+
+[endsect]
+
+
+
+[section:cancel deadline_timer_service::cancel]
+
+Cancel any asynchronous wait operations associated with the timer.
+
+ std::size_t cancel(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:construct deadline_timer_service::construct]
+
+Construct a new timer implementation.
+
+ void construct(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:deadline_timer_service deadline_timer_service::deadline_timer_service]
+
+Construct a new timer service for the specified io_service.
+
+ deadline_timer_service(
+ boost::asio::io_service & io_service);
+
+
+
+[endsect]
+
+
+
+[section:destroy deadline_timer_service::destroy]
+
+Destroy a timer implementation.
+
+ void destroy(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:duration_type deadline_timer_service::duration_type]
+
+The duration type.
+
+ typedef traits_type::duration_type duration_type;
+
+
+
+
+[endsect]
+
+
+[section:expires_at deadline_timer_service::expires_at]
+
+Get the expiry time for the timer as an absolute time.
+
+ time_type ``[link boost_asio.reference.deadline_timer_service.expires_at.overload1 expires_at]``(
+ const implementation_type & impl) const;
+
+ std::size_t ``[link boost_asio.reference.deadline_timer_service.expires_at.overload2 expires_at]``(
+ implementation_type & impl,
+ const time_type & expiry_time,
+ boost::system::error_code & ec);
+
+
+[section:overload1 deadline_timer_service::expires_at (1 of 2 overloads)]
+
+Get the expiry time for the timer as an absolute time.
+
+ time_type expires_at(
+ const implementation_type & impl) const;
+
+
+
+[endsect]
+
+
+
+[section:overload2 deadline_timer_service::expires_at (2 of 2 overloads)]
+
+Set the expiry time for the timer as an absolute time.
+
+ std::size_t expires_at(
+ implementation_type & impl,
+ const time_type & expiry_time,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:expires_from_now deadline_timer_service::expires_from_now]
+
+Get the expiry time for the timer relative to now.
+
+ duration_type ``[link boost_asio.reference.deadline_timer_service.expires_from_now.overload1 expires_from_now]``(
+ const implementation_type & impl) const;
+
+ std::size_t ``[link boost_asio.reference.deadline_timer_service.expires_from_now.overload2 expires_from_now]``(
+ implementation_type & impl,
+ const duration_type & expiry_time,
+ boost::system::error_code & ec);
+
+
+[section:overload1 deadline_timer_service::expires_from_now (1 of 2 overloads)]
+
+Get the expiry time for the timer relative to now.
+
+ duration_type expires_from_now(
+ const implementation_type & impl) const;
+
+
+
+[endsect]
+
+
+
+[section:overload2 deadline_timer_service::expires_from_now (2 of 2 overloads)]
+
+Set the expiry time for the timer relative to now.
+
+ std::size_t expires_from_now(
+ implementation_type & impl,
+ const duration_type & expiry_time,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:get_io_service deadline_timer_service::get_io_service]
+
+
+['Inherited from io_service.]
+
+Get the io_service object that owns the service.
+
+ boost::asio::io_service & get_io_service();
+
+
+
+[endsect]
+
+
+
+[section:id deadline_timer_service::id]
+
+The unique service identifier.
+
+ static boost::asio::io_service::id id;
+
+
+
+[endsect]
+
+
+
+[section:implementation_type deadline_timer_service::implementation_type]
+
+The implementation type of the deadline timer.
+
+ typedef implementation_defined implementation_type;
+
+
+
+
+[endsect]
+
+
+
+[section:io_service deadline_timer_service::io_service]
+
+
+['Inherited from io_service.]
+
+(Deprecated: use get_io_service().) Get the io_service object that owns the service.
+
+ boost::asio::io_service & io_service();
+
+
+
+[endsect]
+
+
+
+[section:shutdown_service deadline_timer_service::shutdown_service]
+
+Destroy all user-defined handler objects owned by the service.
+
+ void shutdown_service();
+
+
+
+[endsect]
+
+
+
+[section:time_type deadline_timer_service::time_type]
+
+The time type.
+
+ typedef traits_type::time_type time_type;
+
+
+
+
+[endsect]
+
+
+
+[section:traits_type deadline_timer_service::traits_type]
+
+The time traits type.
+
+ typedef TimeTraits traits_type;
+
+
+
+
+[endsect]
+
+
+
+[section:wait deadline_timer_service::wait]
+
+
+
+ void wait(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+
+[section:error__addrinfo_category error::addrinfo_category]
+
+
+
+ static const boost::system::error_category & addrinfo_category = boost::asio::error::get_addrinfo_category();
+
+
+
+[endsect]
+
+
+
+[section:error__addrinfo_errors error::addrinfo_errors]
+
+
+
+ enum addrinfo_errors
+
+[heading Values]
+[variablelist
+
+ [
+ [service_not_found]
+ [The service is not supported for the given socket type. ]
+ ]
+
+ [
+ [socket_type_not_supported]
+ [The socket type is not supported. ]
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:error__basic_errors error::basic_errors]
+
+
+
+ enum basic_errors
+
+[heading Values]
+[variablelist
+
+ [
+ [access_denied]
+ [Permission denied. ]
+ ]
+
+ [
+ [address_family_not_supported]
+ [Address family not supported by protocol. ]
+ ]
+
+ [
+ [address_in_use]
+ [Address already in use. ]
+ ]
+
+ [
+ [already_connected]
+ [Transport endpoint is already connected. ]
+ ]
+
+ [
+ [already_started]
+ [Operation already in progress. ]
+ ]
+
+ [
+ [broken_pipe]
+ [Broken pipe. ]
+ ]
+
+ [
+ [connection_aborted]
+ [A connection has been aborted. ]
+ ]
+
+ [
+ [connection_refused]
+ [Connection refused. ]
+ ]
+
+ [
+ [connection_reset]
+ [Connection reset by peer. ]
+ ]
+
+ [
+ [bad_descriptor]
+ [Bad file descriptor. ]
+ ]
+
+ [
+ [fault]
+ [Bad address. ]
+ ]
+
+ [
+ [host_unreachable]
+ [No route to host. ]
+ ]
+
+ [
+ [in_progress]
+ [Operation now in progress. ]
+ ]
+
+ [
+ [interrupted]
+ [Interrupted system call. ]
+ ]
+
+ [
+ [invalid_argument]
+ [Invalid argument. ]
+ ]
+
+ [
+ [message_size]
+ [Message too long. ]
+ ]
+
+ [
+ [name_too_long]
+ [The name was too long. ]
+ ]
+
+ [
+ [network_down]
+ [Network is down. ]
+ ]
+
+ [
+ [network_reset]
+ [Network dropped connection on reset. ]
+ ]
+
+ [
+ [network_unreachable]
+ [Network is unreachable. ]
+ ]
+
+ [
+ [no_descriptors]
+ [Too many open files. ]
+ ]
+
+ [
+ [no_buffer_space]
+ [No buffer space available. ]
+ ]
+
+ [
+ [no_memory]
+ [Cannot allocate memory. ]
+ ]
+
+ [
+ [no_permission]
+ [Operation not permitted. ]
+ ]
+
+ [
+ [no_protocol_option]
+ [Protocol not available. ]
+ ]
+
+ [
+ [not_connected]
+ [Transport endpoint is not connected. ]
+ ]
+
+ [
+ [not_socket]
+ [Socket operation on non-socket. ]
+ ]
+
+ [
+ [operation_aborted]
+ [Operation cancelled. ]
+ ]
+
+ [
+ [operation_not_supported]
+ [Operation not supported. ]
+ ]
+
+ [
+ [shut_down]
+ [Cannot send after transport endpoint shutdown. ]
+ ]
+
+ [
+ [timed_out]
+ [Connection timed out. ]
+ ]
+
+ [
+ [try_again]
+ [Resource temporarily unavailable. ]
+ ]
+
+ [
+ [would_block]
+ [The socket is marked non-blocking and the requested operation would block. ]
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:error__get_addrinfo_category error::get_addrinfo_category]
+
+
+
+ const boost::system::error_category & get_addrinfo_category();
+
+
+
+[endsect]
+
+
+
+[section:error__get_misc_category error::get_misc_category]
+
+
+
+ const boost::system::error_category & get_misc_category();
+
+
+
+[endsect]
+
+
+
+[section:error__get_netdb_category error::get_netdb_category]
+
+
+
+ const boost::system::error_category & get_netdb_category();
+
+
+
+[endsect]
+
+
+
+[section:error__get_ssl_category error::get_ssl_category]
+
+
+
+ const boost::system::error_category & get_ssl_category();
+
+
+
+[endsect]
+
+
+
+[section:error__get_system_category error::get_system_category]
+
+
+
+ const boost::system::error_category & get_system_category();
+
+
+
+[endsect]
+
+
+[section:error__make_error_code error::make_error_code]
+
+
+
+ boost::system::error_code ``[link boost_asio.reference.error__make_error_code.overload1 make_error_code]``(
+ basic_errors e);
+
+ boost::system::error_code ``[link boost_asio.reference.error__make_error_code.overload2 make_error_code]``(
+ netdb_errors e);
+
+ boost::system::error_code ``[link boost_asio.reference.error__make_error_code.overload3 make_error_code]``(
+ addrinfo_errors e);
+
+ boost::system::error_code ``[link boost_asio.reference.error__make_error_code.overload4 make_error_code]``(
+ misc_errors e);
+
+ boost::system::error_code ``[link boost_asio.reference.error__make_error_code.overload5 make_error_code]``(
+ ssl_errors e);
+
+
+[section:overload1 error::make_error_code (1 of 5 overloads)]
+
+
+
+ boost::system::error_code make_error_code(
+ basic_errors e);
+
+
+
+[endsect]
+
+
+
+[section:overload2 error::make_error_code (2 of 5 overloads)]
+
+
+
+ boost::system::error_code make_error_code(
+ netdb_errors e);
+
+
+
+[endsect]
+
+
+
+[section:overload3 error::make_error_code (3 of 5 overloads)]
+
+
+
+ boost::system::error_code make_error_code(
+ addrinfo_errors e);
+
+
+
+[endsect]
+
+
+
+[section:overload4 error::make_error_code (4 of 5 overloads)]
+
+
+
+ boost::system::error_code make_error_code(
+ misc_errors e);
+
+
+
+[endsect]
+
+
+
+[section:overload5 error::make_error_code (5 of 5 overloads)]
+
+
+
+ boost::system::error_code make_error_code(
+ ssl_errors e);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:error__misc_category error::misc_category]
+
+
+
+ static const boost::system::error_category & misc_category = boost::asio::error::get_misc_category();
+
+
+
+[endsect]
+
+
+
+[section:error__misc_errors error::misc_errors]
+
+
+
+ enum misc_errors
+
+[heading Values]
+[variablelist
+
+ [
+ [already_open]
+ [Already open. ]
+ ]
+
+ [
+ [eof]
+ [End of file or stream. ]
+ ]
+
+ [
+ [not_found]
+ [Element not found. ]
+ ]
+
+ [
+ [fd_set_failure]
+ [The descriptor cannot fit into the select system call's fd_set. ]
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:error__netdb_category error::netdb_category]
+
+
+
+ static const boost::system::error_category & netdb_category = boost::asio::error::get_netdb_category();
+
+
+
+[endsect]
+
+
+
+[section:error__netdb_errors error::netdb_errors]
+
+
+
+ enum netdb_errors
+
+[heading Values]
+[variablelist
+
+ [
+ [host_not_found]
+ [Host not found (authoritative). ]
+ ]
+
+ [
+ [host_not_found_try_again]
+ [Host not found (non-authoritative). ]
+ ]
+
+ [
+ [no_data]
+ [The query is valid but does not have associated address data. ]
+ ]
+
+ [
+ [no_recovery]
+ [A non-recoverable error occurred. ]
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:error__ssl_category error::ssl_category]
+
+
+
+ static const boost::system::error_category & ssl_category = boost::asio::error::get_ssl_category();
+
+
+
+[endsect]
+
+
+
+[section:error__ssl_errors error::ssl_errors]
+
+
+
+ enum ssl_errors
+
+
+
+[endsect]
+
+
+
+[section:error__system_category error::system_category]
+
+
+
+ static const boost::system::error_category & system_category = boost::asio::error::get_system_category();
+
+
+
+[endsect]
+
+
+
+[section:has_service has_service]
+
+
+
+ template<
+ typename ``[link boost_asio.reference.Service Service]``>
+ bool has_service(
+ io_service & ios);
+
+
+This function is used to determine whether the io_service contains a service object corresponding to the given service type.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[ios][The io\_service object that owns the service.]]
+
+]
+
+[heading Return Value]
+
+A boolean indicating whether the io_service contains the service.
+
+
+
+[endsect]
+
+
+[section:invalid_service_owner invalid_service_owner]
+
+Exception thrown when trying to add a service object to an io_service where the service has a different owner.
+
+ class invalid_service_owner
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.invalid_service_owner.invalid_service_owner [*invalid_service_owner]]]
+ []
+ ]
+
+]
+
+
+[section:invalid_service_owner invalid_service_owner::invalid_service_owner]
+
+
+
+ invalid_service_owner();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:io_service io_service]
+
+Provides core I/O functionality.
+
+ class io_service :
+ noncopyable
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.io_service__id [*id]]]
+ [Class used to uniquely identify a service. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.io_service__service [*service]]]
+ [Base class for all io_service services. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.io_service__strand [*strand]]]
+ [Provides serialised handler execution. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.io_service__work [*work]]]
+ [Class to inform the io_service when it has work to do. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.io_service.dispatch [*dispatch]]]
+ [Request the io_service to invoke the given handler. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service.io_service [*io_service]]]
+ [Constructor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service.poll [*poll]]]
+ [Run the io_service's event processing loop to execute ready handlers. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service.poll_one [*poll_one]]]
+ [Run the io_service's event processing loop to execute one ready handler. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service.post [*post]]]
+ [Request the io_service to invoke the given handler and return immediately. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service.reset [*reset]]]
+ [Reset the io_service in preparation for a subsequent run() invocation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service.run [*run]]]
+ [Run the io_service's event processing loop. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service.run_one [*run_one]]]
+ [Run the io_service's event processing loop to execute at most one handler. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service.stop [*stop]]]
+ [Stop the io_service's event processing loop. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service.wrap [*wrap]]]
+ [Create a new handler that automatically dispatches the wrapped handler on the io_service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service._io_service [*~io_service]]]
+ [Destructor. ]
+ ]
+
+]
+
+[heading Friends]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.io_service.add_service [*add_service]]]
+ [Add a service object to the io_service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service.has_service [*has_service]]]
+ [Determine if an io_service contains a specified service type. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service.use_service [*use_service]]]
+ [Obtain the service object corresponding to the given type. ]
+ ]
+
+]
+
+The io_service class provides the core I/O functionality for users of the asynchronous I/O objects, including:
+
+
+* boost::asio::ip::tcp::socket
+
+* boost::asio::ip::tcp::acceptor
+
+* boost::asio::ip::udp::socket
+
+* boost::asio::deadline_timer.
+
+The io_service class also includes facilities intended for developers of custom asynchronous services.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Safe, with the exception that calling reset() while there are unfinished run() calls results in undefined behaviour.
+
+[heading Effect of exceptions thrown from handlers]
+
+
+
+If an exception is thrown from a handler, the exception is allowed to propagate through the throwing thread's invocation of boost::asio::io\_service::run(), boost::asio::io\_service::run\_one(), boost::asio::io\_service::poll() or boost::asio::io\_service::poll\_one(). No other threads that are calling any of these functions are affected. It is then the responsibility of the application to catch the exception.
+
+After the exception has been caught, the boost::asio::io\_service::run(), boost::asio::io\_service::run\_one(), boost::asio::io\_service::poll() or boost::asio::io\_service::poll\_one() call may be restarted [*without] the need for an intervening call to boost::asio::io\_service::reset(). This allows the thread to rejoin the io\_service's thread pool without impacting any other threads in the pool.
+
+For example:
+
+
+
+ boost::asio::io_service io_service;
+ ...
+ for (;;)
+ {
+ try
+ {
+ io_service.run();
+ break; // run() exited normally
+ }
+ catch (my_exception& e)
+ {
+ // Deal with exception as appropriate.
+ }
+ }
+
+
+
+
+
+[section:add_service io_service::add_service]
+
+Add a service object to the io_service.
+
+ template<
+ typename ``[link boost_asio.reference.Service Service]``>
+ friend void add_service(
+ io_service & ios,
+ Service * svc);
+
+
+This function is used to add a service to the io_service.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[ios][The io\_service object that owns the service.]]
+
+[[svc][The service object. On success, ownership of the service object is transferred to the io\_service. When the io\_service object is destroyed, it will destroy the service object by performing:
+``
+ delete static_cast<io_service::service*>(svc)
+
+``
+]]
+
+]
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::asio::service_already_exists][Thrown if a service of the given type is already present in the io\_service.]]
+
+[[boost::asio::invalid_service_owner][Thrown if the service's owning io\_service is not the io\_service object specified by the ios parameter. ]]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:dispatch io_service::dispatch]
+
+Request the io_service to invoke the given handler.
+
+ template<
+ typename ``[link boost_asio.reference.CompletionHandler CompletionHandler]``>
+ void dispatch(
+ CompletionHandler handler);
+
+
+This function is used to ask the io_service to execute the given handler.
+
+The io_service guarantees that the handler will only be called in a thread in which the run(), run\_one(), poll() or poll\_one() member functions is currently being invoked. The handler may be executed inside this function if the guarantee can be met.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[handler][The handler to be called. The io\_service will make a copy of the handler object as required. The function signature of the handler must be:
+``
+ void handler();
+
+``
+]]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:has_service io_service::has_service]
+
+Determine if an io_service contains a specified service type.
+
+ template<
+ typename ``[link boost_asio.reference.Service Service]``>
+ friend bool has_service(
+ io_service & ios);
+
+
+This function is used to determine whether the io_service contains a service object corresponding to the given service type.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[ios][The io\_service object that owns the service.]]
+
+]
+
+[heading Return Value]
+
+A boolean indicating whether the io_service contains the service.
+
+
+
+[endsect]
+
+
+[section:io_service io_service::io_service]
+
+Constructor.
+
+ ``[link boost_asio.reference.io_service.io_service.overload1 io_service]``();
+
+ ``[link boost_asio.reference.io_service.io_service.overload2 io_service]``(
+ std::size_t concurrency_hint);
+
+
+[section:overload1 io_service::io_service (1 of 2 overloads)]
+
+Constructor.
+
+ io_service();
+
+
+
+[endsect]
+
+
+
+[section:overload2 io_service::io_service (2 of 2 overloads)]
+
+Constructor.
+
+ io_service(
+ std::size_t concurrency_hint);
+
+
+Construct with a hint about the required level of concurrency.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[concurrency_hint][A suggestion to the implementation on how many threads it should allow to run simultaneously. ]]
+
+]
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:poll io_service::poll]
+
+Run the io_service's event processing loop to execute ready handlers.
+
+ std::size_t ``[link boost_asio.reference.io_service.poll.overload1 poll]``();
+
+ std::size_t ``[link boost_asio.reference.io_service.poll.overload2 poll]``(
+ boost::system::error_code & ec);
+
+
+[section:overload1 io_service::poll (1 of 2 overloads)]
+
+Run the io_service's event processing loop to execute ready handlers.
+
+ std::size_t poll();
+
+
+The poll() function runs handlers that are ready to run, without blocking, until the io_service has been stopped or there are no more ready handlers.
+
+
+[heading Return Value]
+
+The number of handlers that were executed.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:overload2 io_service::poll (2 of 2 overloads)]
+
+Run the io_service's event processing loop to execute ready handlers.
+
+ std::size_t poll(
+ boost::system::error_code & ec);
+
+
+The poll() function runs handlers that are ready to run, without blocking, until the io_service has been stopped or there are no more ready handlers.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Return Value]
+
+The number of handlers that were executed.
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:poll_one io_service::poll_one]
+
+Run the io_service's event processing loop to execute one ready handler.
+
+ std::size_t ``[link boost_asio.reference.io_service.poll_one.overload1 poll_one]``();
+
+ std::size_t ``[link boost_asio.reference.io_service.poll_one.overload2 poll_one]``(
+ boost::system::error_code & ec);
+
+
+[section:overload1 io_service::poll_one (1 of 2 overloads)]
+
+Run the io_service's event processing loop to execute one ready handler.
+
+ std::size_t poll_one();
+
+
+The poll\_one() function runs at most one handler that is ready to run, without blocking.
+
+
+[heading Return Value]
+
+The number of handlers that were executed.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:overload2 io_service::poll_one (2 of 2 overloads)]
+
+Run the io_service's event processing loop to execute one ready handler.
+
+ std::size_t poll_one(
+ boost::system::error_code & ec);
+
+
+The poll\_one() function runs at most one handler that is ready to run, without blocking.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Return Value]
+
+The number of handlers that were executed.
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:post io_service::post]
+
+Request the io_service to invoke the given handler and return immediately.
+
+ template<
+ typename ``[link boost_asio.reference.CompletionHandler CompletionHandler]``>
+ void post(
+ CompletionHandler handler);
+
+
+This function is used to ask the io_service to execute the given handler, but without allowing the io_service to call the handler from inside this function.
+
+The io_service guarantees that the handler will only be called in a thread in which the run(), run\_one(), poll() or poll\_one() member functions is currently being invoked.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[handler][The handler to be called. The io\_service will make a copy of the handler object as required. The function signature of the handler must be:
+``
+ void handler();
+
+``
+]]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:reset io_service::reset]
+
+Reset the io_service in preparation for a subsequent run() invocation.
+
+ void reset();
+
+
+This function must be called prior to any second or later set of invocations of the run(), run\_one(), poll() or poll\_one() functions when a previous invocation of these functions returned due to the io_service being stopped or running out of work. This function allows the io_service to reset any internal state, such as a "stopped" flag.
+
+This function must not be called while there are any unfinished calls to the run(), run\_one(), poll() or poll\_one() functions.
+
+
+[endsect]
+
+
+[section:run io_service::run]
+
+Run the io_service's event processing loop.
+
+ std::size_t ``[link boost_asio.reference.io_service.run.overload1 run]``();
+
+ std::size_t ``[link boost_asio.reference.io_service.run.overload2 run]``(
+ boost::system::error_code & ec);
+
+
+[section:overload1 io_service::run (1 of 2 overloads)]
+
+Run the io_service's event processing loop.
+
+ std::size_t run();
+
+
+The run() function blocks until all work has finished and there are no more handlers to be dispatched, or until the io_service has been stopped.
+
+Multiple threads may call the run() function to set up a pool of threads from which the io_service may execute handlers. All threads that are waiting in the pool are equivalent and the io_service may choose any one of them to invoke a handler.
+
+The run() function may be safely called again once it has completed only after a call to reset().
+
+
+[heading Return Value]
+
+The number of handlers that were executed.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:overload2 io_service::run (2 of 2 overloads)]
+
+Run the io_service's event processing loop.
+
+ std::size_t run(
+ boost::system::error_code & ec);
+
+
+The run() function blocks until all work has finished and there are no more handlers to be dispatched, or until the io_service has been stopped.
+
+Multiple threads may call the run() function to set up a pool of threads from which the io_service may execute handlers. All threads that are waiting in the pool are equivalent and the io_service may choose any one of them to invoke a handler.
+
+The run() function may be safely called again once it has completed only after a call to reset().
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Return Value]
+
+The number of handlers that were executed.
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:run_one io_service::run_one]
+
+Run the io_service's event processing loop to execute at most one handler.
+
+ std::size_t ``[link boost_asio.reference.io_service.run_one.overload1 run_one]``();
+
+ std::size_t ``[link boost_asio.reference.io_service.run_one.overload2 run_one]``(
+ boost::system::error_code & ec);
+
+
+[section:overload1 io_service::run_one (1 of 2 overloads)]
+
+Run the io_service's event processing loop to execute at most one handler.
+
+ std::size_t run_one();
+
+
+The run\_one() function blocks until one handler has been dispatched, or until the io_service has been stopped.
+
+
+[heading Return Value]
+
+The number of handlers that were executed.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:overload2 io_service::run_one (2 of 2 overloads)]
+
+Run the io_service's event processing loop to execute at most one handler.
+
+ std::size_t run_one(
+ boost::system::error_code & ec);
+
+
+The run\_one() function blocks until one handler has been dispatched, or until the io_service has been stopped.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Return Value]
+
+The number of handlers that were executed.
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:stop io_service::stop]
+
+Stop the io_service's event processing loop.
+
+ void stop();
+
+
+This function does not block, but instead simply signals the io_service to stop. All invocations of its run() or run\_one() member functions should return as soon as possible. Subsequent calls to run(), run\_one(), poll() or poll\_one() will return immediately until reset() is called.
+
+
+[endsect]
+
+
+
+[section:use_service io_service::use_service]
+
+Obtain the service object corresponding to the given type.
+
+ template<
+ typename ``[link boost_asio.reference.Service Service]``>
+ friend Service & use_service(
+ io_service & ios);
+
+
+This function is used to locate a service object that corresponds to the given service type. If there is no existing implementation of the service, then the io_service will create a new instance of the service.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[ios][The io\_service object that owns the service.]]
+
+]
+
+[heading Return Value]
+
+The service interface implementing the specified service type. Ownership of the service interface is not transferred to the caller.
+
+
+
+[endsect]
+
+
+
+[section:wrap io_service::wrap]
+
+Create a new handler that automatically dispatches the wrapped handler on the io_service.
+
+ template<
+ typename ``[link boost_asio.reference.Handler Handler]``>
+ unspecified wrap(
+ Handler handler);
+
+
+This function is used to create a new handler function object that, when invoked, will automatically pass the wrapped handler to the io\_service's dispatch function.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[handler][The handler to be wrapped. The io\_service will make a copy of the handler object as required. The function signature of the handler must be:
+``
+ void handler(A1 a1, ... An an);
+
+``
+]]
+
+]
+
+[heading Return Value]
+
+A function object that, when invoked, passes the wrapped handler to the io\_service's dispatch function. Given a function object with the signature:
+
+ R f(A1 a1, ... An an);
+
+
+If this function object is passed to the wrap function like so:
+
+ io_service.wrap(f);
+
+
+then the return value is a function object with the signature
+
+ void g(A1 a1, ... An an);
+
+
+that, when invoked, executes code equivalent to:
+
+ io_service.dispatch(boost::bind(f, a1, ... an));
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:_io_service io_service::~io_service]
+
+Destructor.
+
+ ~io_service();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:io_service__id io_service::id]
+
+Class used to uniquely identify a service.
+
+ class id :
+ noncopyable
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.io_service__id.id [*id]]]
+ [Constructor. ]
+ ]
+
+]
+
+
+[section:id io_service::id::id]
+
+Constructor.
+
+ id();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:io_service__service io_service::service]
+
+Base class for all io_service services.
+
+ class service :
+ noncopyable
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.io_service__service.get_io_service [*get_io_service]]]
+ [Get the io_service object that owns the service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service__service.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service object that owns the service. ]
+ ]
+
+]
+
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.io_service__service.service [*service]]]
+ [Constructor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service__service._service [*~service]]]
+ [Destructor. ]
+ ]
+
+]
+
+
+[section:get_io_service io_service::service::get_io_service]
+
+Get the io_service object that owns the service.
+
+ boost::asio::io_service & get_io_service();
+
+
+
+[endsect]
+
+
+
+[section:io_service io_service::service::io_service]
+
+(Deprecated: use get_io_service().) Get the io_service object that owns the service.
+
+ boost::asio::io_service & io_service();
+
+
+
+[endsect]
+
+
+
+[section:service io_service::service::service]
+
+Constructor.
+
+ service(
+ boost::asio::io_service & owner);
+
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[owner][The io\_service object that owns the service. ]]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:_service io_service::service::~service]
+
+Destructor.
+
+ virtual ~service();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:io_service__strand io_service::strand]
+
+Provides serialised handler execution.
+
+ class strand
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.io_service__strand.dispatch [*dispatch]]]
+ [Request the strand to invoke the given handler. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service__strand.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the strand. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service__strand.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the strand. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service__strand.post [*post]]]
+ [Request the strand to invoke the given handler and return immediately. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service__strand.strand [*strand]]]
+ [Constructor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service__strand.wrap [*wrap]]]
+ [Create a new handler that automatically dispatches the wrapped handler on the strand. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service__strand._strand [*~strand]]]
+ [Destructor. ]
+ ]
+
+]
+
+The io_service::strand class provides the ability to post and dispatch handlers with the guarantee that none of those handlers will execute concurrently.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Safe.
+
+
+
+[section:dispatch io_service::strand::dispatch]
+
+Request the strand to invoke the given handler.
+
+ template<
+ typename ``[link boost_asio.reference.Handler Handler]``>
+ void dispatch(
+ Handler handler);
+
+
+This function is used to ask the strand to execute the given handler.
+
+The strand object guarantees that handlers posted or dispatched through the strand will not be executed concurrently. The handler may be executed inside this function if the guarantee can be met. If this function is called from within a handler that was posted or dispatched through the same strand, then the new handler will be executed immediately.
+
+The strand's guarantee is in addition to the guarantee provided by the underlying io_service. The io_service guarantees that the handler will only be called in a thread in which the io\_service's run member function is currently being invoked.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[handler][The handler to be called. The strand will make a copy of the handler object as required. The function signature of the handler must be:
+``
+ void handler();
+
+``
+]]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:get_io_service io_service::strand::get_io_service]
+
+Get the io_service associated with the strand.
+
+ boost::asio::io_service & get_io_service();
+
+
+This function may be used to obtain the io_service object that the strand uses to dispatch handlers for asynchronous operations.
+
+
+[heading Return Value]
+
+A reference to the io_service object that the strand will use to dispatch handlers. Ownership is not transferred to the caller.
+
+
+
+[endsect]
+
+
+
+[section:io_service io_service::strand::io_service]
+
+(Deprecated: use get_io_service().) Get the io_service associated with the strand.
+
+ boost::asio::io_service & io_service();
+
+
+This function may be used to obtain the io_service object that the strand uses to dispatch handlers for asynchronous operations.
+
+
+[heading Return Value]
+
+A reference to the io_service object that the strand will use to dispatch handlers. Ownership is not transferred to the caller.
+
+
+
+[endsect]
+
+
+
+[section:post io_service::strand::post]
+
+Request the strand to invoke the given handler and return immediately.
+
+ template<
+ typename ``[link boost_asio.reference.Handler Handler]``>
+ void post(
+ Handler handler);
+
+
+This function is used to ask the strand to execute the given handler, but without allowing the strand to call the handler from inside this function.
+
+The strand object guarantees that handlers posted or dispatched through the strand will not be executed concurrently. The strand's guarantee is in addition to the guarantee provided by the underlying io_service. The io_service guarantees that the handler will only be called in a thread in which the io\_service's run member function is currently being invoked.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[handler][The handler to be called. The strand will make a copy of the handler object as required. The function signature of the handler must be:
+``
+ void handler();
+
+``
+]]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:strand io_service::strand::strand]
+
+Constructor.
+
+ strand(
+ boost::asio::io_service & io_service);
+
+
+Constructs the strand.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[io_service][The io\_service object that the strand will use to dispatch handlers that are ready to be run. ]]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:wrap io_service::strand::wrap]
+
+Create a new handler that automatically dispatches the wrapped handler on the strand.
+
+ template<
+ typename ``[link boost_asio.reference.Handler Handler]``>
+ unspecified wrap(
+ Handler handler);
+
+
+This function is used to create a new handler function object that, when invoked, will automatically pass the wrapped handler to the strand's dispatch function.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[handler][The handler to be wrapped. The strand will make a copy of the handler object as required. The function signature of the handler must be:
+``
+ void handler(A1 a1, ... An an);
+
+``
+]]
+
+]
+
+[heading Return Value]
+
+A function object that, when invoked, passes the wrapped handler to the strand's dispatch function. Given a function object with the signature:
+
+ R f(A1 a1, ... An an);
+
+
+If this function object is passed to the wrap function like so:
+
+ strand.wrap(f);
+
+
+then the return value is a function object with the signature
+
+ void g(A1 a1, ... An an);
+
+
+that, when invoked, executes code equivalent to:
+
+ strand.dispatch(boost::bind(f, a1, ... an));
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:_strand io_service::strand::~strand]
+
+Destructor.
+
+ ~strand();
+
+
+Destroys a strand.
+
+Handlers posted through the strand that have not yet been invoked will still be dispatched in a way that meets the guarantee of non-concurrency.
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:io_service__work io_service::work]
+
+Class to inform the io_service when it has work to do.
+
+ class work
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.io_service__work.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the work. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service__work.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the work. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service__work.work [*work]]]
+ [Constructor notifies the io_service that work is starting. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service__work._work [*~work]]]
+ [Destructor notifies the io_service that the work is complete. ]
+ ]
+
+]
+
+The work class is used to inform the io_service when work starts and finishes. This ensures that the io\_service's run() function will not exit while work is underway, and that it does exit when there is no unfinished work remaining.
+
+The work class is copy-constructible so that it may be used as a data member in a handler class. It is not assignable.
+
+
+[section:get_io_service io_service::work::get_io_service]
+
+Get the io_service associated with the work.
+
+ boost::asio::io_service & get_io_service();
+
+
+
+[endsect]
+
+
+
+[section:io_service io_service::work::io_service]
+
+(Deprecated: use get_io_service().) Get the io_service associated with the work.
+
+ boost::asio::io_service & io_service();
+
+
+
+[endsect]
+
+
+[section:work io_service::work::work]
+
+Constructor notifies the io_service that work is starting.
+
+ ``[link boost_asio.reference.io_service__work.work.overload1 work]``(
+ boost::asio::io_service & io_service);
+
+ ``[link boost_asio.reference.io_service__work.work.overload2 work]``(
+ const work & other);
+
+
+[section:overload1 io_service::work::work (1 of 2 overloads)]
+
+Constructor notifies the io_service that work is starting.
+
+ work(
+ boost::asio::io_service & io_service);
+
+
+The constructor is used to inform the io_service that some work has begun. This ensures that the io\_service's run() function will not exit while the work is underway.
+
+
+[endsect]
+
+
+
+[section:overload2 io_service::work::work (2 of 2 overloads)]
+
+Copy constructor notifies the io_service that work is starting.
+
+ work(
+ const work & other);
+
+
+The constructor is used to inform the io_service that some work has begun. This ensures that the io\_service's run() function will not exit while the work is underway.
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:_work io_service::work::~work]
+
+Destructor notifies the io_service that the work is complete.
+
+ ~work();
+
+
+The destructor is used to inform the io_service that some work has finished. Once the count of unfinished work reaches zero, the io\_service's run() function is permitted to exit.
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:ip__address ip::address]
+
+Implements version-independent IP addresses.
+
+ class address
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__address.address [*address]]]
+ [Default constructor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address.from_string [*from_string]]]
+ [Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address.is_v4 [*is_v4]]]
+ [Get whether the address is an IP version 4 address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address.is_v6 [*is_v6]]]
+ [Get whether the address is an IP version 6 address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address.operator_eq_ [*operator=]]]
+ [Assign from another address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address.to_string [*to_string]]]
+ [Get the address as a string in dotted decimal format. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address.to_v4 [*to_v4]]]
+ [Get the address as an IP version 4 address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address.to_v6 [*to_v6]]]
+ [Get the address as an IP version 6 address. ]
+ ]
+
+]
+
+[heading Friends]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__address.operator_not__eq_ [*operator!=]]]
+ [Compare two addresses for inequality. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address.operator_lt_ [*operator<]]]
+ [Compare addresses for ordering. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address.operator_eq__eq_ [*operator==]]]
+ [Compare two addresses for equality. ]
+ ]
+
+]
+
+[heading Related Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__address.operator_lt__lt_ [*operator<<]]]
+ [Output an address as a string. ]
+ ]
+
+]
+
+The
+[link boost_asio.reference.ip__address ip::address] class provides the ability to use either IP version 4 or version 6 addresses.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
+
+
+[section:address ip::address::address]
+
+Default constructor.
+
+ ``[link boost_asio.reference.ip__address.address.overload1 address]``();
+
+ ``[link boost_asio.reference.ip__address.address.overload2 address]``(
+ const boost::asio::ip::address_v4 & ipv4_address);
+
+ ``[link boost_asio.reference.ip__address.address.overload3 address]``(
+ const boost::asio::ip::address_v6 & ipv6_address);
+
+ ``[link boost_asio.reference.ip__address.address.overload4 address]``(
+ const address & other);
+
+
+[section:overload1 ip::address::address (1 of 4 overloads)]
+
+Default constructor.
+
+ address();
+
+
+
+[endsect]
+
+
+
+[section:overload2 ip::address::address (2 of 4 overloads)]
+
+Construct an address from an IPv4 address.
+
+ address(
+ const boost::asio::ip::address_v4 & ipv4_address);
+
+
+
+[endsect]
+
+
+
+[section:overload3 ip::address::address (3 of 4 overloads)]
+
+Construct an address from an IPv6 address.
+
+ address(
+ const boost::asio::ip::address_v6 & ipv6_address);
+
+
+
+[endsect]
+
+
+
+[section:overload4 ip::address::address (4 of 4 overloads)]
+
+Copy constructor.
+
+ address(
+ const address & other);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:from_string ip::address::from_string]
+
+Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
+
+ static address ``[link boost_asio.reference.ip__address.from_string.overload1 from_string]``(
+ const char * str);
+
+ static address ``[link boost_asio.reference.ip__address.from_string.overload2 from_string]``(
+ const char * str,
+ boost::system::error_code & ec);
+
+ static address ``[link boost_asio.reference.ip__address.from_string.overload3 from_string]``(
+ const std::string & str);
+
+ static address ``[link boost_asio.reference.ip__address.from_string.overload4 from_string]``(
+ const std::string & str,
+ boost::system::error_code & ec);
+
+
+[section:overload1 ip::address::from_string (1 of 4 overloads)]
+
+Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
+
+ static address from_string(
+ const char * str);
+
+
+
+[endsect]
+
+
+
+[section:overload2 ip::address::from_string (2 of 4 overloads)]
+
+Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
+
+ static address from_string(
+ const char * str,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload3 ip::address::from_string (3 of 4 overloads)]
+
+Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
+
+ static address from_string(
+ const std::string & str);
+
+
+
+[endsect]
+
+
+
+[section:overload4 ip::address::from_string (4 of 4 overloads)]
+
+Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
+
+ static address from_string(
+ const std::string & str,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:is_v4 ip::address::is_v4]
+
+Get whether the address is an IP version 4 address.
+
+ bool is_v4() const;
+
+
+
+[endsect]
+
+
+
+[section:is_v6 ip::address::is_v6]
+
+Get whether the address is an IP version 6 address.
+
+ bool is_v6() const;
+
+
+
+[endsect]
+
+
+
+[section:operator_not__eq_ ip::address::operator!=]
+
+Compare two addresses for inequality.
+
+ friend bool operator!=(
+ const address & a1,
+ const address & a2);
+
+
+
+[endsect]
+
+
+
+[section:operator_lt_ ip::address::operator<]
+
+Compare addresses for ordering.
+
+ friend bool operator<(
+ const address & a1,
+ const address & a2);
+
+
+
+[endsect]
+
+
+
+[section:operator_lt__lt_ ip::address::operator<<]
+
+Output an address as a string.
+
+ template<
+ typename ``[link boost_asio.reference.Elem Elem]``,
+ typename ``[link boost_asio.reference.Traits Traits]``>
+ std::basic_ostream< Elem, Traits > & operator<<(
+ std::basic_ostream< Elem, Traits > & os,
+ const address & addr);
+
+
+Used to output a human-readable string for a specified address.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[os][The output stream to which the string will be written.]]
+
+[[addr][The address to be written.]]
+
+]
+
+[heading Return Value]
+
+The output stream.
+
+
+
+[endsect]
+
+
+[section:operator_eq_ ip::address::operator=]
+
+Assign from another address.
+
+ address & ``[link boost_asio.reference.ip__address.operator_eq_.overload1 operator=]``(
+ const address & other);
+
+ address & ``[link boost_asio.reference.ip__address.operator_eq_.overload2 operator=]``(
+ const boost::asio::ip::address_v4 & ipv4_address);
+
+ address & ``[link boost_asio.reference.ip__address.operator_eq_.overload3 operator=]``(
+ const boost::asio::ip::address_v6 & ipv6_address);
+
+
+[section:overload1 ip::address::operator= (1 of 3 overloads)]
+
+Assign from another address.
+
+ address & operator=(
+ const address & other);
+
+
+
+[endsect]
+
+
+
+[section:overload2 ip::address::operator= (2 of 3 overloads)]
+
+Assign from an IPv4 address.
+
+ address & operator=(
+ const boost::asio::ip::address_v4 & ipv4_address);
+
+
+
+[endsect]
+
+
+
+[section:overload3 ip::address::operator= (3 of 3 overloads)]
+
+Assign from an IPv6 address.
+
+ address & operator=(
+ const boost::asio::ip::address_v6 & ipv6_address);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:operator_eq__eq_ ip::address::operator==]
+
+Compare two addresses for equality.
+
+ friend bool operator==(
+ const address & a1,
+ const address & a2);
+
+
+
+[endsect]
+
+
+[section:to_string ip::address::to_string]
+
+Get the address as a string in dotted decimal format.
+
+ std::string ``[link boost_asio.reference.ip__address.to_string.overload1 to_string]``() const;
+
+ std::string ``[link boost_asio.reference.ip__address.to_string.overload2 to_string]``(
+ boost::system::error_code & ec) const;
+
+
+[section:overload1 ip::address::to_string (1 of 2 overloads)]
+
+Get the address as a string in dotted decimal format.
+
+ std::string to_string() const;
+
+
+
+[endsect]
+
+
+
+[section:overload2 ip::address::to_string (2 of 2 overloads)]
+
+Get the address as a string in dotted decimal format.
+
+ std::string to_string(
+ boost::system::error_code & ec) const;
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:to_v4 ip::address::to_v4]
+
+Get the address as an IP version 4 address.
+
+ boost::asio::ip::address_v4 to_v4() const;
+
+
+
+[endsect]
+
+
+
+[section:to_v6 ip::address::to_v6]
+
+Get the address as an IP version 6 address.
+
+ boost::asio::ip::address_v6 to_v6() const;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:ip__address_v4 ip::address_v4]
+
+Implements IP version 4 style addresses.
+
+ class address_v4
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.ip__address_v4.bytes_type [*bytes_type]]]
+ [The type used to represent an address as an array of bytes. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__address_v4.address_v4 [*address_v4]]]
+ [Default constructor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v4.any [*any]]]
+ [Obtain an address object that represents any address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v4.broadcast [*broadcast]]]
+ [Obtain an address object that represents the broadcast address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v4.from_string [*from_string]]]
+ [Create an address from an IP address string in dotted decimal form. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v4.is_class_a [*is_class_a]]]
+ [Determine whether the address is a class A address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v4.is_class_b [*is_class_b]]]
+ [Determine whether the address is a class B address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v4.is_class_c [*is_class_c]]]
+ [Determine whether the address is a class C address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v4.is_multicast [*is_multicast]]]
+ [Determine whether the address is a multicast address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v4.loopback [*loopback]]]
+ [Obtain an address object that represents the loopback address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v4.netmask [*netmask]]]
+ [Obtain the netmask that corresponds to the address, based on its address class. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v4.operator_eq_ [*operator=]]]
+ [Assign from another address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v4.to_bytes [*to_bytes]]]
+ [Get the address in bytes. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v4.to_string [*to_string]]]
+ [Get the address as a string in dotted decimal format. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v4.to_ulong [*to_ulong]]]
+ [Get the address as an unsigned long in host byte order. ]
+ ]
+
+]
+
+[heading Friends]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__address_v4.operator_not__eq_ [*operator!=]]]
+ [Compare two addresses for inequality. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v4.operator_lt_ [*operator<]]]
+ [Compare addresses for ordering. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v4.operator_lt__eq_ [*operator<=]]]
+ [Compare addresses for ordering. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v4.operator_eq__eq_ [*operator==]]]
+ [Compare two addresses for equality. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v4.operator_gt_ [*operator>]]]
+ [Compare addresses for ordering. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v4.operator_gt__eq_ [*operator>=]]]
+ [Compare addresses for ordering. ]
+ ]
+
+]
+
+[heading Related Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__address_v4.operator_lt__lt_ [*operator<<]]]
+ [Output an address as a string. ]
+ ]
+
+]
+
+The
+[link boost_asio.reference.ip__address_v4 ip::address_v4] class provides the ability to use and manipulate IP version 4 addresses.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
+
+
+[section:address_v4 ip::address_v4::address_v4]
+
+Default constructor.
+
+ ``[link boost_asio.reference.ip__address_v4.address_v4.overload1 address_v4]``();
+
+ ``[link boost_asio.reference.ip__address_v4.address_v4.overload2 address_v4]``(
+ const bytes_type & bytes);
+
+ ``[link boost_asio.reference.ip__address_v4.address_v4.overload3 address_v4]``(
+ unsigned long addr);
+
+ ``[link boost_asio.reference.ip__address_v4.address_v4.overload4 address_v4]``(
+ const address_v4 & other);
+
+
+[section:overload1 ip::address_v4::address_v4 (1 of 4 overloads)]
+
+Default constructor.
+
+ address_v4();
+
+
+
+[endsect]
+
+
+
+[section:overload2 ip::address_v4::address_v4 (2 of 4 overloads)]
+
+Construct an address from raw bytes.
+
+ address_v4(
+ const bytes_type & bytes);
+
+
+
+[endsect]
+
+
+
+[section:overload3 ip::address_v4::address_v4 (3 of 4 overloads)]
+
+Construct an address from a unsigned long in host byte order.
+
+ address_v4(
+ unsigned long addr);
+
+
+
+[endsect]
+
+
+
+[section:overload4 ip::address_v4::address_v4 (4 of 4 overloads)]
+
+Copy constructor.
+
+ address_v4(
+ const address_v4 & other);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:any ip::address_v4::any]
+
+Obtain an address object that represents any address.
+
+ static address_v4 any();
+
+
+
+[endsect]
+
+
+[section:broadcast ip::address_v4::broadcast]
+
+Obtain an address object that represents the broadcast address.
+
+ static address_v4 ``[link boost_asio.reference.ip__address_v4.broadcast.overload1 broadcast]``();
+
+ static address_v4 ``[link boost_asio.reference.ip__address_v4.broadcast.overload2 broadcast]``(
+ const address_v4 & addr,
+ const address_v4 & mask);
+
+
+[section:overload1 ip::address_v4::broadcast (1 of 2 overloads)]
+
+Obtain an address object that represents the broadcast address.
+
+ static address_v4 broadcast();
+
+
+
+[endsect]
+
+
+
+[section:overload2 ip::address_v4::broadcast (2 of 2 overloads)]
+
+Obtain an address object that represents the broadcast address that corresponds to the specified address and netmask.
+
+ static address_v4 broadcast(
+ const address_v4 & addr,
+ const address_v4 & mask);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:bytes_type ip::address_v4::bytes_type]
+
+The type used to represent an address as an array of bytes.
+
+ typedef boost::array< unsigned char, 4 > bytes_type;
+
+
+
+
+[endsect]
+
+
+[section:from_string ip::address_v4::from_string]
+
+Create an address from an IP address string in dotted decimal form.
+
+ static address_v4 ``[link boost_asio.reference.ip__address_v4.from_string.overload1 from_string]``(
+ const char * str);
+
+ static address_v4 ``[link boost_asio.reference.ip__address_v4.from_string.overload2 from_string]``(
+ const char * str,
+ boost::system::error_code & ec);
+
+ static address_v4 ``[link boost_asio.reference.ip__address_v4.from_string.overload3 from_string]``(
+ const std::string & str);
+
+ static address_v4 ``[link boost_asio.reference.ip__address_v4.from_string.overload4 from_string]``(
+ const std::string & str,
+ boost::system::error_code & ec);
+
+
+[section:overload1 ip::address_v4::from_string (1 of 4 overloads)]
+
+Create an address from an IP address string in dotted decimal form.
+
+ static address_v4 from_string(
+ const char * str);
+
+
+
+[endsect]
+
+
+
+[section:overload2 ip::address_v4::from_string (2 of 4 overloads)]
+
+Create an address from an IP address string in dotted decimal form.
+
+ static address_v4 from_string(
+ const char * str,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload3 ip::address_v4::from_string (3 of 4 overloads)]
+
+Create an address from an IP address string in dotted decimal form.
+
+ static address_v4 from_string(
+ const std::string & str);
+
+
+
+[endsect]
+
+
+
+[section:overload4 ip::address_v4::from_string (4 of 4 overloads)]
+
+Create an address from an IP address string in dotted decimal form.
+
+ static address_v4 from_string(
+ const std::string & str,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:is_class_a ip::address_v4::is_class_a]
+
+Determine whether the address is a class A address.
+
+ bool is_class_a() const;
+
+
+
+[endsect]
+
+
+
+[section:is_class_b ip::address_v4::is_class_b]
+
+Determine whether the address is a class B address.
+
+ bool is_class_b() const;
+
+
+
+[endsect]
+
+
+
+[section:is_class_c ip::address_v4::is_class_c]
+
+Determine whether the address is a class C address.
+
+ bool is_class_c() const;
+
+
+
+[endsect]
+
+
+
+[section:is_multicast ip::address_v4::is_multicast]
+
+Determine whether the address is a multicast address.
+
+ bool is_multicast() const;
+
+
+
+[endsect]
+
+
+
+[section:loopback ip::address_v4::loopback]
+
+Obtain an address object that represents the loopback address.
+
+ static address_v4 loopback();
+
+
+
+[endsect]
+
+
+
+[section:netmask ip::address_v4::netmask]
+
+Obtain the netmask that corresponds to the address, based on its address class.
+
+ static address_v4 netmask(
+ const address_v4 & addr);
+
+
+
+[endsect]
+
+
+
+[section:operator_not__eq_ ip::address_v4::operator!=]
+
+Compare two addresses for inequality.
+
+ friend bool operator!=(
+ const address_v4 & a1,
+ const address_v4 & a2);
+
+
+
+[endsect]
+
+
+
+[section:operator_lt_ ip::address_v4::operator<]
+
+Compare addresses for ordering.
+
+ friend bool operator<(
+ const address_v4 & a1,
+ const address_v4 & a2);
+
+
+
+[endsect]
+
+
+
+[section:operator_lt__lt_ ip::address_v4::operator<<]
+
+Output an address as a string.
+
+ template<
+ typename ``[link boost_asio.reference.Elem Elem]``,
+ typename ``[link boost_asio.reference.Traits Traits]``>
+ std::basic_ostream< Elem, Traits > & operator<<(
+ std::basic_ostream< Elem, Traits > & os,
+ const address_v4 & addr);
+
+
+Used to output a human-readable string for a specified address.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[os][The output stream to which the string will be written.]]
+
+[[addr][The address to be written.]]
+
+]
+
+[heading Return Value]
+
+The output stream.
+
+
+
+[endsect]
+
+
+
+[section:operator_lt__eq_ ip::address_v4::operator<=]
+
+Compare addresses for ordering.
+
+ friend bool operator<=(
+ const address_v4 & a1,
+ const address_v4 & a2);
+
+
+
+[endsect]
+
+
+
+[section:operator_eq_ ip::address_v4::operator=]
+
+Assign from another address.
+
+ address_v4 & operator=(
+ const address_v4 & other);
+
+
+
+[endsect]
+
+
+
+[section:operator_eq__eq_ ip::address_v4::operator==]
+
+Compare two addresses for equality.
+
+ friend bool operator==(
+ const address_v4 & a1,
+ const address_v4 & a2);
+
+
+
+[endsect]
+
+
+
+[section:operator_gt_ ip::address_v4::operator>]
+
+Compare addresses for ordering.
+
+ friend bool operator>(
+ const address_v4 & a1,
+ const address_v4 & a2);
+
+
+
+[endsect]
+
+
+
+[section:operator_gt__eq_ ip::address_v4::operator>=]
+
+Compare addresses for ordering.
+
+ friend bool operator>=(
+ const address_v4 & a1,
+ const address_v4 & a2);
+
+
+
+[endsect]
+
+
+
+[section:to_bytes ip::address_v4::to_bytes]
+
+Get the address in bytes.
+
+ bytes_type to_bytes() const;
+
+
+
+[endsect]
+
+
+[section:to_string ip::address_v4::to_string]
+
+Get the address as a string in dotted decimal format.
+
+ std::string ``[link boost_asio.reference.ip__address_v4.to_string.overload1 to_string]``() const;
+
+ std::string ``[link boost_asio.reference.ip__address_v4.to_string.overload2 to_string]``(
+ boost::system::error_code & ec) const;
+
+
+[section:overload1 ip::address_v4::to_string (1 of 2 overloads)]
+
+Get the address as a string in dotted decimal format.
+
+ std::string to_string() const;
+
+
+
+[endsect]
+
+
+
+[section:overload2 ip::address_v4::to_string (2 of 2 overloads)]
+
+Get the address as a string in dotted decimal format.
+
+ std::string to_string(
+ boost::system::error_code & ec) const;
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:to_ulong ip::address_v4::to_ulong]
+
+Get the address as an unsigned long in host byte order.
+
+ unsigned long to_ulong() const;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:ip__address_v6 ip::address_v6]
+
+Implements IP version 6 style addresses.
+
+ class address_v6
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.ip__address_v6.bytes_type [*bytes_type]]]
+ [The type used to represent an address as an array of bytes. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.address_v6 [*address_v6]]]
+ [Default constructor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.any [*any]]]
+ [Obtain an address object that represents any address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.from_string [*from_string]]]
+ [Create an address from an IP address string. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.is_link_local [*is_link_local]]]
+ [Determine whether the address is link local. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.is_loopback [*is_loopback]]]
+ [Determine whether the address is a loopback address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.is_multicast [*is_multicast]]]
+ [Determine whether the address is a multicast address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.is_multicast_global [*is_multicast_global]]]
+ [Determine whether the address is a global multicast address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.is_multicast_link_local [*is_multicast_link_local]]]
+ [Determine whether the address is a link-local multicast address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.is_multicast_node_local [*is_multicast_node_local]]]
+ [Determine whether the address is a node-local multicast address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.is_multicast_org_local [*is_multicast_org_local]]]
+ [Determine whether the address is a org-local multicast address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.is_multicast_site_local [*is_multicast_site_local]]]
+ [Determine whether the address is a site-local multicast address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.is_site_local [*is_site_local]]]
+ [Determine whether the address is site local. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.is_unspecified [*is_unspecified]]]
+ [Determine whether the address is unspecified. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.is_v4_compatible [*is_v4_compatible]]]
+ [Determine whether the address is an IPv4-compatible address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.is_v4_mapped [*is_v4_mapped]]]
+ [Determine whether the address is a mapped IPv4 address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.loopback [*loopback]]]
+ [Obtain an address object that represents the loopback address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.operator_eq_ [*operator=]]]
+ [Assign from another address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.scope_id [*scope_id]]]
+ [The scope ID of the address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.to_bytes [*to_bytes]]]
+ [Get the address in bytes. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.to_string [*to_string]]]
+ [Get the address as a string. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.to_v4 [*to_v4]]]
+ [Converts an IPv4-mapped or IPv4-compatible address to an IPv4 address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.v4_compatible [*v4_compatible]]]
+ [Create an IPv4-compatible IPv6 address. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.v4_mapped [*v4_mapped]]]
+ [Create an IPv4-mapped IPv6 address. ]
+ ]
+
+]
+
+[heading Friends]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.operator_not__eq_ [*operator!=]]]
+ [Compare two addresses for inequality. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.operator_lt_ [*operator<]]]
+ [Compare addresses for ordering. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.operator_lt__eq_ [*operator<=]]]
+ [Compare addresses for ordering. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.operator_eq__eq_ [*operator==]]]
+ [Compare two addresses for equality. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.operator_gt_ [*operator>]]]
+ [Compare addresses for ordering. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.operator_gt__eq_ [*operator>=]]]
+ [Compare addresses for ordering. ]
+ ]
+
+]
+
+[heading Related Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__address_v6.operator_lt__lt_ [*operator<<]]]
+ [Output an address as a string. ]
+ ]
+
+]
+
+The
+[link boost_asio.reference.ip__address_v6 ip::address_v6] class provides the ability to use and manipulate IP version 6 addresses.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
+
+
+[section:address_v6 ip::address_v6::address_v6]
+
+Default constructor.
+
+ ``[link boost_asio.reference.ip__address_v6.address_v6.overload1 address_v6]``();
+
+ ``[link boost_asio.reference.ip__address_v6.address_v6.overload2 address_v6]``(
+ const bytes_type & bytes,
+ unsigned long scope_id = 0);
+
+ ``[link boost_asio.reference.ip__address_v6.address_v6.overload3 address_v6]``(
+ const address_v6 & other);
+
+
+[section:overload1 ip::address_v6::address_v6 (1 of 3 overloads)]
+
+Default constructor.
+
+ address_v6();
+
+
+
+[endsect]
+
+
+
+[section:overload2 ip::address_v6::address_v6 (2 of 3 overloads)]
+
+Construct an address from raw bytes and scope ID.
+
+ address_v6(
+ const bytes_type & bytes,
+ unsigned long scope_id = 0);
+
+
+
+[endsect]
+
+
+
+[section:overload3 ip::address_v6::address_v6 (3 of 3 overloads)]
+
+Copy constructor.
+
+ address_v6(
+ const address_v6 & other);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:any ip::address_v6::any]
+
+Obtain an address object that represents any address.
+
+ static address_v6 any();
+
+
+
+[endsect]
+
+
+
+[section:bytes_type ip::address_v6::bytes_type]
+
+The type used to represent an address as an array of bytes.
+
+ typedef boost::array< unsigned char, 16 > bytes_type;
+
+
+
+
+[endsect]
+
+
+[section:from_string ip::address_v6::from_string]
+
+Create an address from an IP address string.
+
+ static address_v6 ``[link boost_asio.reference.ip__address_v6.from_string.overload1 from_string]``(
+ const char * str);
+
+ static address_v6 ``[link boost_asio.reference.ip__address_v6.from_string.overload2 from_string]``(
+ const char * str,
+ boost::system::error_code & ec);
+
+ static address_v6 ``[link boost_asio.reference.ip__address_v6.from_string.overload3 from_string]``(
+ const std::string & str);
+
+ static address_v6 ``[link boost_asio.reference.ip__address_v6.from_string.overload4 from_string]``(
+ const std::string & str,
+ boost::system::error_code & ec);
+
+
+[section:overload1 ip::address_v6::from_string (1 of 4 overloads)]
+
+Create an address from an IP address string.
+
+ static address_v6 from_string(
+ const char * str);
+
+
+
+[endsect]
+
+
+
+[section:overload2 ip::address_v6::from_string (2 of 4 overloads)]
+
+Create an address from an IP address string.
+
+ static address_v6 from_string(
+ const char * str,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload3 ip::address_v6::from_string (3 of 4 overloads)]
+
+Create an address from an IP address string.
+
+ static address_v6 from_string(
+ const std::string & str);
+
+
+
+[endsect]
+
+
+
+[section:overload4 ip::address_v6::from_string (4 of 4 overloads)]
+
+Create an address from an IP address string.
+
+ static address_v6 from_string(
+ const std::string & str,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:is_link_local ip::address_v6::is_link_local]
+
+Determine whether the address is link local.
+
+ bool is_link_local() const;
+
+
+
+[endsect]
+
+
+
+[section:is_loopback ip::address_v6::is_loopback]
+
+Determine whether the address is a loopback address.
+
+ bool is_loopback() const;
+
+
+
+[endsect]
+
+
+
+[section:is_multicast ip::address_v6::is_multicast]
+
+Determine whether the address is a multicast address.
+
+ bool is_multicast() const;
+
+
+
+[endsect]
+
+
+
+[section:is_multicast_global ip::address_v6::is_multicast_global]
+
+Determine whether the address is a global multicast address.
+
+ bool is_multicast_global() const;
+
+
+
+[endsect]
+
+
+
+[section:is_multicast_link_local ip::address_v6::is_multicast_link_local]
+
+Determine whether the address is a link-local multicast address.
+
+ bool is_multicast_link_local() const;
+
+
+
+[endsect]
+
+
+
+[section:is_multicast_node_local ip::address_v6::is_multicast_node_local]
+
+Determine whether the address is a node-local multicast address.
+
+ bool is_multicast_node_local() const;
+
+
+
+[endsect]
+
+
+
+[section:is_multicast_org_local ip::address_v6::is_multicast_org_local]
+
+Determine whether the address is a org-local multicast address.
+
+ bool is_multicast_org_local() const;
+
+
+
+[endsect]
+
+
+
+[section:is_multicast_site_local ip::address_v6::is_multicast_site_local]
+
+Determine whether the address is a site-local multicast address.
+
+ bool is_multicast_site_local() const;
+
+
+
+[endsect]
+
+
+
+[section:is_site_local ip::address_v6::is_site_local]
+
+Determine whether the address is site local.
+
+ bool is_site_local() const;
+
+
+
+[endsect]
+
+
+
+[section:is_unspecified ip::address_v6::is_unspecified]
+
+Determine whether the address is unspecified.
+
+ bool is_unspecified() const;
+
+
+
+[endsect]
+
+
+
+[section:is_v4_compatible ip::address_v6::is_v4_compatible]
+
+Determine whether the address is an IPv4-compatible address.
+
+ bool is_v4_compatible() const;
+
+
+
+[endsect]
+
+
+
+[section:is_v4_mapped ip::address_v6::is_v4_mapped]
+
+Determine whether the address is a mapped IPv4 address.
+
+ bool is_v4_mapped() const;
+
+
+
+[endsect]
+
+
+
+[section:loopback ip::address_v6::loopback]
+
+Obtain an address object that represents the loopback address.
+
+ static address_v6 loopback();
+
+
+
+[endsect]
+
+
+
+[section:operator_not__eq_ ip::address_v6::operator!=]
+
+Compare two addresses for inequality.
+
+ friend bool operator!=(
+ const address_v6 & a1,
+ const address_v6 & a2);
+
+
+
+[endsect]
+
+
+
+[section:operator_lt_ ip::address_v6::operator<]
+
+Compare addresses for ordering.
+
+ friend bool operator<(
+ const address_v6 & a1,
+ const address_v6 & a2);
+
+
+
+[endsect]
+
+
+
+[section:operator_lt__lt_ ip::address_v6::operator<<]
+
+Output an address as a string.
+
+ template<
+ typename ``[link boost_asio.reference.Elem Elem]``,
+ typename ``[link boost_asio.reference.Traits Traits]``>
+ std::basic_ostream< Elem, Traits > & operator<<(
+ std::basic_ostream< Elem, Traits > & os,
+ const address_v6 & addr);
+
+
+Used to output a human-readable string for a specified address.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[os][The output stream to which the string will be written.]]
+
+[[addr][The address to be written.]]
+
+]
+
+[heading Return Value]
+
+The output stream.
+
+
+
+[endsect]
+
+
+
+[section:operator_lt__eq_ ip::address_v6::operator<=]
+
+Compare addresses for ordering.
+
+ friend bool operator<=(
+ const address_v6 & a1,
+ const address_v6 & a2);
+
+
+
+[endsect]
+
+
+
+[section:operator_eq_ ip::address_v6::operator=]
+
+Assign from another address.
+
+ address_v6 & operator=(
+ const address_v6 & other);
+
+
+
+[endsect]
+
+
+
+[section:operator_eq__eq_ ip::address_v6::operator==]
+
+Compare two addresses for equality.
+
+ friend bool operator==(
+ const address_v6 & a1,
+ const address_v6 & a2);
+
+
+
+[endsect]
+
+
+
+[section:operator_gt_ ip::address_v6::operator>]
+
+Compare addresses for ordering.
+
+ friend bool operator>(
+ const address_v6 & a1,
+ const address_v6 & a2);
+
+
+
+[endsect]
+
+
+
+[section:operator_gt__eq_ ip::address_v6::operator>=]
+
+Compare addresses for ordering.
+
+ friend bool operator>=(
+ const address_v6 & a1,
+ const address_v6 & a2);
+
+
+
+[endsect]
+
+
+[section:scope_id ip::address_v6::scope_id]
+
+The scope ID of the address.
+
+ unsigned long ``[link boost_asio.reference.ip__address_v6.scope_id.overload1 scope_id]``() const;
+
+ void ``[link boost_asio.reference.ip__address_v6.scope_id.overload2 scope_id]``(
+ unsigned long id);
+
+
+[section:overload1 ip::address_v6::scope_id (1 of 2 overloads)]
+
+The scope ID of the address.
+
+ unsigned long scope_id() const;
+
+
+Returns the scope ID associated with the IPv6 address.
+
+
+[endsect]
+
+
+
+[section:overload2 ip::address_v6::scope_id (2 of 2 overloads)]
+
+The scope ID of the address.
+
+ void scope_id(
+ unsigned long id);
+
+
+Modifies the scope ID associated with the IPv6 address.
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:to_bytes ip::address_v6::to_bytes]
+
+Get the address in bytes.
+
+ bytes_type to_bytes() const;
+
+
+
+[endsect]
+
+
+[section:to_string ip::address_v6::to_string]
+
+Get the address as a string.
+
+ std::string ``[link boost_asio.reference.ip__address_v6.to_string.overload1 to_string]``() const;
+
+ std::string ``[link boost_asio.reference.ip__address_v6.to_string.overload2 to_string]``(
+ boost::system::error_code & ec) const;
+
+
+[section:overload1 ip::address_v6::to_string (1 of 2 overloads)]
+
+Get the address as a string.
+
+ std::string to_string() const;
+
+
+
+[endsect]
+
+
+
+[section:overload2 ip::address_v6::to_string (2 of 2 overloads)]
+
+Get the address as a string.
+
+ std::string to_string(
+ boost::system::error_code & ec) const;
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:to_v4 ip::address_v6::to_v4]
+
+Converts an IPv4-mapped or IPv4-compatible address to an IPv4 address.
+
+ address_v4 to_v4() const;
+
+
+
+[endsect]
+
+
+
+[section:v4_compatible ip::address_v6::v4_compatible]
+
+Create an IPv4-compatible IPv6 address.
+
+ static address_v6 v4_compatible(
+ const address_v4 & addr);
+
+
+
+[endsect]
+
+
+
+[section:v4_mapped ip::address_v6::v4_mapped]
+
+Create an IPv4-mapped IPv6 address.
+
+ static address_v6 v4_mapped(
+ const address_v4 & addr);
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:ip__basic_endpoint ip::basic_endpoint]
+
+Describes an endpoint for a version-independent IP socket.
+
+ template<
+ typename ``[link boost_asio.reference.InternetProtocol InternetProtocol]``>
+ class basic_endpoint
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.ip__basic_endpoint.data_type [*data_type]]]
+ [The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__basic_endpoint.protocol_type [*protocol_type]]]
+ [The protocol type associated with the endpoint. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.address [*address]]]
+ [Get the IP address associated with the endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.basic_endpoint [*basic_endpoint]]]
+ [Default constructor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.capacity [*capacity]]]
+ [Get the capacity of the endpoint in the native type. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.data [*data]]]
+ [Get the underlying endpoint in the native type. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.operator_eq_ [*operator=]]]
+ [Assign from another endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.port [*port]]]
+ [Get the port associated with the endpoint. The port number is always in the host's byte order. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.protocol [*protocol]]]
+ [The protocol associated with the endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.resize [*resize]]]
+ [Set the underlying size of the endpoint in the native type. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.size [*size]]]
+ [Get the underlying size of the endpoint in the native type. ]
+ ]
+
+]
+
+[heading Friends]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.operator_not__eq_ [*operator!=]]]
+ [Compare two endpoints for inequality. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.operator_lt_ [*operator<]]]
+ [Compare endpoints for ordering. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.operator_eq__eq_ [*operator==]]]
+ [Compare two endpoints for equality. ]
+ ]
+
+]
+
+[heading Related Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.operator_lt__lt_ [*operator<<]]]
+ [Output an endpoint as a string. ]
+ ]
+
+]
+
+The
+[link boost_asio.reference.ip__basic_endpoint ip::basic_endpoint] class template describes an endpoint that may be associated with a particular socket.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
+
+
+[section:address ip::basic_endpoint::address]
+
+Get the IP address associated with the endpoint.
+
+ boost::asio::ip::address ``[link boost_asio.reference.ip__basic_endpoint.address.overload1 address]``() const;
+
+ void ``[link boost_asio.reference.ip__basic_endpoint.address.overload2 address]``(
+ const boost::asio::ip::address & addr);
+
+
+[section:overload1 ip::basic_endpoint::address (1 of 2 overloads)]
+
+Get the IP address associated with the endpoint.
+
+ boost::asio::ip::address address() const;
+
+
+
+[endsect]
+
+
+
+[section:overload2 ip::basic_endpoint::address (2 of 2 overloads)]
+
+Set the IP address associated with the endpoint.
+
+ void address(
+ const boost::asio::ip::address & addr);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:basic_endpoint ip::basic_endpoint::basic_endpoint]
+
+Default constructor.
+
+ ``[link boost_asio.reference.ip__basic_endpoint.basic_endpoint.overload1 basic_endpoint]``();
+
+ ``[link boost_asio.reference.ip__basic_endpoint.basic_endpoint.overload2 basic_endpoint]``(
+ const InternetProtocol & protocol,
+ unsigned short port_num);
+
+ ``[link boost_asio.reference.ip__basic_endpoint.basic_endpoint.overload3 basic_endpoint]``(
+ const boost::asio::ip::address & addr,
+ unsigned short port_num);
+
+ ``[link boost_asio.reference.ip__basic_endpoint.basic_endpoint.overload4 basic_endpoint]``(
+ const basic_endpoint & other);
+
+
+[section:overload1 ip::basic_endpoint::basic_endpoint (1 of 4 overloads)]
+
+Default constructor.
+
+ basic_endpoint();
+
+
+
+[endsect]
+
+
+
+[section:overload2 ip::basic_endpoint::basic_endpoint (2 of 4 overloads)]
+
+Construct an endpoint using a port number, specified in the host's byte order. The IP address will be the any address (i.e. INADDR_ANY or in6addr_any). This constructor would typically be used for accepting new connections.
+
+ basic_endpoint(
+ const InternetProtocol & protocol,
+ unsigned short port_num);
+
+
+
+[heading Examples]
+
+To initialise an IPv4 TCP endpoint for port 1234, use:
+
+ boost::asio::ip::tcp::endpoint ep(boost::asio::ip::tcp::v4(), 1234);
+
+
+
+
+To specify an IPv6 UDP endpoint for port 9876, use:
+
+ boost::asio::ip::udp::endpoint ep(boost::asio::ip::udp::v6(), 9876);
+
+
+
+
+
+[endsect]
+
+
+
+[section:overload3 ip::basic_endpoint::basic_endpoint (3 of 4 overloads)]
+
+Construct an endpoint using a port number and an IP address. This constructor may be used for accepting connections on a specific interface or for making a connection to a remote endpoint.
+
+ basic_endpoint(
+ const boost::asio::ip::address & addr,
+ unsigned short port_num);
+
+
+
+[endsect]
+
+
+
+[section:overload4 ip::basic_endpoint::basic_endpoint (4 of 4 overloads)]
+
+Copy constructor.
+
+ basic_endpoint(
+ const basic_endpoint & other);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:capacity ip::basic_endpoint::capacity]
+
+Get the capacity of the endpoint in the native type.
+
+ std::size_t capacity() const;
+
+
+
+[endsect]
+
+
+[section:data ip::basic_endpoint::data]
+
+Get the underlying endpoint in the native type.
+
+ data_type * ``[link boost_asio.reference.ip__basic_endpoint.data.overload1 data]``();
+
+ const data_type * ``[link boost_asio.reference.ip__basic_endpoint.data.overload2 data]``() const;
+
+
+[section:overload1 ip::basic_endpoint::data (1 of 2 overloads)]
+
+Get the underlying endpoint in the native type.
+
+ data_type * data();
+
+
+
+[endsect]
+
+
+
+[section:overload2 ip::basic_endpoint::data (2 of 2 overloads)]
+
+Get the underlying endpoint in the native type.
+
+ const data_type * data() const;
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:data_type ip::basic_endpoint::data_type]
+
+The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer.
+
+ typedef implementation_defined data_type;
+
+
+
+
+[endsect]
+
+
+
+[section:operator_not__eq_ ip::basic_endpoint::operator!=]
+
+Compare two endpoints for inequality.
+
+ friend bool operator!=(
+ const basic_endpoint< InternetProtocol > & e1,
+ const basic_endpoint< InternetProtocol > & e2);
+
+
+
+[endsect]
+
+
+
+[section:operator_lt_ ip::basic_endpoint::operator<]
+
+Compare endpoints for ordering.
+
+ friend bool operator<(
+ const basic_endpoint< InternetProtocol > & e1,
+ const basic_endpoint< InternetProtocol > & e2);
+
+
+
+[endsect]
+
+
+
+[section:operator_lt__lt_ ip::basic_endpoint::operator<<]
+
+Output an endpoint as a string.
+
+ std::basic_ostream< Elem, Traits > & operator<<(
+ std::basic_ostream< Elem, Traits > & os,
+ const basic_endpoint< InternetProtocol > & endpoint);
+
+
+Used to output a human-readable string for a specified endpoint.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[os][The output stream to which the string will be written.]]
+
+[[endpoint][The endpoint to be written.]]
+
+]
+
+[heading Return Value]
+
+The output stream.
+
+
+
+[endsect]
+
+
+
+[section:operator_eq_ ip::basic_endpoint::operator=]
+
+Assign from another endpoint.
+
+ basic_endpoint & operator=(
+ const basic_endpoint & other);
+
+
+
+[endsect]
+
+
+
+[section:operator_eq__eq_ ip::basic_endpoint::operator==]
+
+Compare two endpoints for equality.
+
+ friend bool operator==(
+ const basic_endpoint< InternetProtocol > & e1,
+ const basic_endpoint< InternetProtocol > & e2);
+
+
+
+[endsect]
+
+
+[section:port ip::basic_endpoint::port]
+
+Get the port associated with the endpoint. The port number is always in the host's byte order.
+
+ unsigned short ``[link boost_asio.reference.ip__basic_endpoint.port.overload1 port]``() const;
+
+ void ``[link boost_asio.reference.ip__basic_endpoint.port.overload2 port]``(
+ unsigned short port_num);
+
+
+[section:overload1 ip::basic_endpoint::port (1 of 2 overloads)]
+
+Get the port associated with the endpoint. The port number is always in the host's byte order.
+
+ unsigned short port() const;
+
+
+
+[endsect]
+
+
+
+[section:overload2 ip::basic_endpoint::port (2 of 2 overloads)]
+
+Set the port associated with the endpoint. The port number is always in the host's byte order.
+
+ void port(
+ unsigned short port_num);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:protocol ip::basic_endpoint::protocol]
+
+The protocol associated with the endpoint.
+
+ protocol_type protocol() const;
+
+
+
+[endsect]
+
+
+
+[section:protocol_type ip::basic_endpoint::protocol_type]
+
+The protocol type associated with the endpoint.
+
+ typedef InternetProtocol protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:resize ip::basic_endpoint::resize]
+
+Set the underlying size of the endpoint in the native type.
+
+ void resize(
+ std::size_t size);
+
+
+
+[endsect]
+
+
+
+[section:size ip::basic_endpoint::size]
+
+Get the underlying size of the endpoint in the native type.
+
+ std::size_t size() const;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:ip__basic_resolver ip::basic_resolver]
+
+Provides endpoint resolution functionality.
+
+ template<
+ typename ``[link boost_asio.reference.InternetProtocol InternetProtocol]``,
+ typename ``[link boost_asio.reference.ResolverService ResolverService]`` = resolver_service<InternetProtocol>>
+ class basic_resolver :
+ public basic_io_object< ResolverService >
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.ip__basic_resolver.endpoint_type [*endpoint_type]]]
+ [The endpoint type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__basic_resolver.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__basic_resolver.iterator [*iterator]]]
+ [The iterator type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__basic_resolver.protocol_type [*protocol_type]]]
+ [The protocol type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__basic_resolver.query [*query]]]
+ [The query type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__basic_resolver.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.async_resolve [*async_resolve]]]
+ [Asynchronously resolve a query to a list of entries. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.basic_resolver [*basic_resolver]]]
+ [Constructor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.cancel [*cancel]]]
+ [Cancel any asynchronous operations that are waiting on the resolver. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.resolve [*resolve]]]
+ [Resolve a query to a list of entries. ]
+ ]
+
+]
+
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
+
+]
+
+The basic_resolver class template provides the ability to resolve a query to a list of endpoints.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
+
+
+[section:async_resolve ip::basic_resolver::async_resolve]
+
+Asynchronously resolve a query to a list of entries.
+
+ template<
+ typename ``[link boost_asio.reference.ResolveHandler ResolveHandler]``>
+ void ``[link boost_asio.reference.ip__basic_resolver.async_resolve.overload1 async_resolve]``(
+ const query & q,
+ ResolveHandler handler);
+
+ template<
+ typename ``[link boost_asio.reference.ResolveHandler ResolveHandler]``>
+ void ``[link boost_asio.reference.ip__basic_resolver.async_resolve.overload2 async_resolve]``(
+ const endpoint_type & e,
+ ResolveHandler handler);
+
+
+[section:overload1 ip::basic_resolver::async_resolve (1 of 2 overloads)]
+
+Asynchronously resolve a query to a list of entries.
+
+ template<
+ typename ``[link boost_asio.reference.ResolveHandler ResolveHandler]``>
+ void async_resolve(
+ const query & q,
+ ResolveHandler handler);
+
+
+This function is used to asynchronously resolve a query into a list of endpoint entries.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[q][A query object that determines what endpoints will be returned.]]
+
+[[handler][The handler to be called when the resolve operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ resolver::iterator iterator // Forward-only iterator that can
+ // be used to traverse the list
+ // of endpoint entries.
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
+
+]
+
+[heading Remarks]
+
+A default constructed iterator represents the end of the list.
+
+A successful resolve operation is guaranteed to pass at least one entry to the handler.
+
+
+[endsect]
+
+
+
+[section:overload2 ip::basic_resolver::async_resolve (2 of 2 overloads)]
+
+Asynchronously resolve an endpoint to a list of entries.
+
+ template<
+ typename ``[link boost_asio.reference.ResolveHandler ResolveHandler]``>
+ void async_resolve(
+ const endpoint_type & e,
+ ResolveHandler handler);
+
+
+This function is used to asynchronously resolve an endpoint into a list of endpoint entries.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[e][An endpoint object that determines what endpoints will be returned.]]
+
+[[handler][The handler to be called when the resolve operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ resolver::iterator iterator // Forward-only iterator that can
+ // be used to traverse the list
+ // of endpoint entries.
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
+
+]
+
+[heading Remarks]
+
+A default constructed iterator represents the end of the list.
+
+A successful resolve operation is guaranteed to pass at least one entry to the handler.
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:basic_resolver ip::basic_resolver::basic_resolver]
+
+Constructor.
+
+ basic_resolver(
+ boost::asio::io_service & io_service);
+
+
+This constructor creates a basic_resolver.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[io_service][The io\_service object that the resolver will use to dispatch handlers for any asynchronous operations performed on the timer. ]]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:cancel ip::basic_resolver::cancel]
+
+Cancel any asynchronous operations that are waiting on the resolver.
+
+ void cancel();
+
+
+This function forces the completion of any pending asynchronous operations on the host resolver. The handler for each cancelled operation will be invoked with the boost::asio::error::operation\_aborted error code.
+
+
+[endsect]
+
+
+
+[section:endpoint_type ip::basic_resolver::endpoint_type]
+
+The endpoint type.
+
+ typedef InternetProtocol::endpoint endpoint_type;
+
+
+
+
+[endsect]
+
+
+
+[section:get_io_service ip::basic_resolver::get_io_service]
+
+
+['Inherited from basic_io_object.]
+
+Get the io_service associated with the object.
+
+ boost::asio::io_service & get_io_service();
+
+
+This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
+
+
+[heading Return Value]
+
+A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
+
+
+
+[endsect]
+
+
+
+[section:implementation ip::basic_resolver::implementation]
+
+
+['Inherited from basic_io_object.]
+
+The underlying implementation of the I/O object.
+
+ implementation_type implementation;
+
+
+
+[endsect]
+
+
+
+[section:implementation_type ip::basic_resolver::implementation_type]
+
+
+['Inherited from basic_io_object.]
+
+The underlying implementation type of I/O object.
+
+ typedef service_type::implementation_type implementation_type;
+
+
+
+
+[endsect]
+
+
+
+[section:io_service ip::basic_resolver::io_service]
+
+
+['Inherited from basic_io_object.]
+
+(Deprecated: use get_io_service().) Get the io_service associated with the object.
+
+ boost::asio::io_service & io_service();
+
+
+This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
+
+
+[heading Return Value]
+
+A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
+
+
+
+[endsect]
+
+
+
+[section:iterator ip::basic_resolver::iterator]
+
+The iterator type.
+
+ typedef InternetProtocol::resolver_iterator iterator;
+
+
+
+
+[endsect]
+
+
+
+[section:protocol_type ip::basic_resolver::protocol_type]
+
+The protocol type.
+
+ typedef InternetProtocol protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:query ip::basic_resolver::query]
+
+The query type.
+
+ typedef InternetProtocol::resolver_query query;
+
+
+
+
+[endsect]
+
+
+[section:resolve ip::basic_resolver::resolve]
+
+Resolve a query to a list of entries.
+
+ iterator ``[link boost_asio.reference.ip__basic_resolver.resolve.overload1 resolve]``(
+ const query & q);
+
+ iterator ``[link boost_asio.reference.ip__basic_resolver.resolve.overload2 resolve]``(
+ const query & q,
+ boost::system::error_code & ec);
+
+ iterator ``[link boost_asio.reference.ip__basic_resolver.resolve.overload3 resolve]``(
+ const endpoint_type & e);
+
+ iterator ``[link boost_asio.reference.ip__basic_resolver.resolve.overload4 resolve]``(
+ const endpoint_type & e,
+ boost::system::error_code & ec);
+
+
+[section:overload1 ip::basic_resolver::resolve (1 of 4 overloads)]
+
+Resolve a query to a list of entries.
+
+ iterator resolve(
+ const query & q);
+
+
+This function is used to resolve a query into a list of endpoint entries.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[q][A query object that determines what endpoints will be returned.]]
+
+]
+
+[heading Return Value]
+
+A forward-only iterator that can be used to traverse the list of endpoint entries.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Remarks]
+
+A default constructed iterator represents the end of the list.
+
+A successful call to this function is guaranteed to return at least one entry.
+
+
+[endsect]
+
+
+
+[section:overload2 ip::basic_resolver::resolve (2 of 4 overloads)]
+
+Resolve a query to a list of entries.
+
+ iterator resolve(
+ const query & q,
+ boost::system::error_code & ec);
+
+
+This function is used to resolve a query into a list of endpoint entries.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[q][A query object that determines what endpoints will be returned.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Return Value]
+
+A forward-only iterator that can be used to traverse the list of endpoint entries. Returns a default constructed iterator if an error occurs.
+
+[heading Remarks]
+
+A default constructed iterator represents the end of the list.
+
+A successful call to this function is guaranteed to return at least one entry.
+
+
+[endsect]
+
+
+
+[section:overload3 ip::basic_resolver::resolve (3 of 4 overloads)]
+
+Resolve an endpoint to a list of entries.
+
+ iterator resolve(
+ const endpoint_type & e);
+
+
+This function is used to resolve an endpoint into a list of endpoint entries.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[e][An endpoint object that determines what endpoints will be returned.]]
+
+]
+
+[heading Return Value]
+
+A forward-only iterator that can be used to traverse the list of endpoint entries.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Remarks]
+
+A default constructed iterator represents the end of the list.
+
+A successful call to this function is guaranteed to return at least one entry.
+
+
+[endsect]
+
+
+
+[section:overload4 ip::basic_resolver::resolve (4 of 4 overloads)]
+
+Resolve an endpoint to a list of entries.
+
+ iterator resolve(
+ const endpoint_type & e,
+ boost::system::error_code & ec);
+
+
+This function is used to resolve an endpoint into a list of endpoint entries.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[e][An endpoint object that determines what endpoints will be returned.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Return Value]
+
+A forward-only iterator that can be used to traverse the list of endpoint entries. Returns a default constructed iterator if an error occurs.
+
+[heading Remarks]
+
+A default constructed iterator represents the end of the list.
+
+A successful call to this function is guaranteed to return at least one entry.
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:service ip::basic_resolver::service]
+
+
+['Inherited from basic_io_object.]
+
+The service associated with the I/O object.
+
+ service_type & service;
+
+
+
+[endsect]
+
+
+
+[section:service_type ip::basic_resolver::service_type]
+
+
+['Inherited from basic_io_object.]
+
+The type of the service that will be used to provide I/O operations.
+
+ typedef ResolverService service_type;
+
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:ip__basic_resolver_entry ip::basic_resolver_entry]
+
+An entry produced by a resolver.
+
+ template<
+ typename ``[link boost_asio.reference.InternetProtocol InternetProtocol]``>
+ class basic_resolver_entry
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.ip__basic_resolver_entry.endpoint_type [*endpoint_type]]]
+ [The endpoint type associated with the endpoint entry. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__basic_resolver_entry.protocol_type [*protocol_type]]]
+ [The protocol type associated with the endpoint entry. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_entry.basic_resolver_entry [*basic_resolver_entry]]]
+ [Default constructor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_entry.endpoint [*endpoint]]]
+ [Get the endpoint associated with the entry. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_entry.host_name [*host_name]]]
+ [Get the host name associated with the entry. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_entry.operator_endpoint_type [*operator endpoint_type]]]
+ [Convert to the endpoint associated with the entry. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_entry.service_name [*service_name]]]
+ [Get the service name associated with the entry. ]
+ ]
+
+]
+
+The
+[link boost_asio.reference.ip__basic_resolver_entry ip::basic_resolver_entry] class template describes an entry as returned by a resolver.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
+
+
+[section:basic_resolver_entry ip::basic_resolver_entry::basic_resolver_entry]
+
+Default constructor.
+
+ ``[link boost_asio.reference.ip__basic_resolver_entry.basic_resolver_entry.overload1 basic_resolver_entry]``();
+
+ ``[link boost_asio.reference.ip__basic_resolver_entry.basic_resolver_entry.overload2 basic_resolver_entry]``(
+ const endpoint_type & endpoint,
+ const std::string & host_name,
+ const std::string & service_name);
+
+
+[section:overload1 ip::basic_resolver_entry::basic_resolver_entry (1 of 2 overloads)]
+
+Default constructor.
+
+ basic_resolver_entry();
+
+
+
+[endsect]
+
+
+
+[section:overload2 ip::basic_resolver_entry::basic_resolver_entry (2 of 2 overloads)]
+
+Construct with specified endpoint, host name and service name.
+
+ basic_resolver_entry(
+ const endpoint_type & endpoint,
+ const std::string & host_name,
+ const std::string & service_name);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:endpoint ip::basic_resolver_entry::endpoint]
+
+Get the endpoint associated with the entry.
+
+ endpoint_type endpoint() const;
+
+
+
+[endsect]
+
+
+
+[section:endpoint_type ip::basic_resolver_entry::endpoint_type]
+
+The endpoint type associated with the endpoint entry.
+
+ typedef InternetProtocol::endpoint endpoint_type;
+
+
+
+
+[endsect]
+
+
+
+[section:host_name ip::basic_resolver_entry::host_name]
+
+Get the host name associated with the entry.
+
+ std::string host_name() const;
+
+
+
+[endsect]
+
+
+
+[section:operator_endpoint_type ip::basic_resolver_entry::operator endpoint_type]
+
+Convert to the endpoint associated with the entry.
+
+ operator endpoint_type() const;
+
+
+
+[endsect]
+
+
+
+[section:protocol_type ip::basic_resolver_entry::protocol_type]
+
+The protocol type associated with the endpoint entry.
+
+ typedef InternetProtocol protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:service_name ip::basic_resolver_entry::service_name]
+
+Get the service name associated with the entry.
+
+ std::string service_name() const;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:ip__basic_resolver_iterator ip::basic_resolver_iterator]
+
+An iterator over the entries produced by a resolver.
+
+ template<
+ typename ``[link boost_asio.reference.InternetProtocol InternetProtocol]``>
+ class basic_resolver_iterator
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_iterator.basic_resolver_iterator [*basic_resolver_iterator]]]
+ [Default constructor creates an end iterator. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_iterator.create [*create]]]
+ [Create an iterator from an addrinfo list returned by getaddrinfo. ]
+ ]
+
+]
+
+The
+[link boost_asio.reference.ip__basic_resolver_iterator ip::basic_resolver_iterator] class template is used to define iterators over the results returned by a resolver.
+
+The iterator's value\_type, obtained when the iterator is dereferenced, is:
+
+ const basic_resolver_entry<InternetProtocol>
+
+
+
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
+
+
+
+[section:basic_resolver_iterator ip::basic_resolver_iterator::basic_resolver_iterator]
+
+Default constructor creates an end iterator.
+
+ basic_resolver_iterator();
+
+
+
+[endsect]
+
+
+[section:create ip::basic_resolver_iterator::create]
+
+Create an iterator from an addrinfo list returned by getaddrinfo.
+
+ static basic_resolver_iterator ``[link boost_asio.reference.ip__basic_resolver_iterator.create.overload1 create]``(
+ boost::asio::detail::addrinfo_type * address_info,
+ const std::string & host_name,
+ const std::string & service_name);
+
+ static basic_resolver_iterator ``[link boost_asio.reference.ip__basic_resolver_iterator.create.overload2 create]``(
+ const typename InternetProtocol::endpoint & endpoint,
+ const std::string & host_name,
+ const std::string & service_name);
+
+
+[section:overload1 ip::basic_resolver_iterator::create (1 of 2 overloads)]
+
+Create an iterator from an addrinfo list returned by getaddrinfo.
+
+ static basic_resolver_iterator create(
+ boost::asio::detail::addrinfo_type * address_info,
+ const std::string & host_name,
+ const std::string & service_name);
+
+
+
+[endsect]
+
+
+
+[section:overload2 ip::basic_resolver_iterator::create (2 of 2 overloads)]
+
+Create an iterator from an endpoint, host name and service name.
+
+ static basic_resolver_iterator create(
+ const typename InternetProtocol::endpoint & endpoint,
+ const std::string & host_name,
+ const std::string & service_name);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[endsect]
+
+[section:ip__basic_resolver_query ip::basic_resolver_query]
+
+An query to be passed to a resolver.
+
+ template<
+ typename ``[link boost_asio.reference.InternetProtocol InternetProtocol]``>
+ class basic_resolver_query :
+ public ip::resolver_query_base
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.ip__basic_resolver_query.protocol_type [*protocol_type]]]
+ [The protocol type associated with the endpoint query. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.basic_resolver_query [*basic_resolver_query]]]
+ [Construct with specified service name for any protocol. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.hints [*hints]]]
+ [Get the hints associated with the query. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.host_name [*host_name]]]
+ [Get the host name associated with the query. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.service_name [*service_name]]]
+ [Get the service name associated with the query. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.address_configured [*address_configured]]]
+ [Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.all_matching [*all_matching]]]
+ [If used with v4_mapped, return all matching IPv6 and IPv4 addresses. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.canonical_name [*canonical_name]]]
+ [Determine the canonical name of the host specified in the query. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.numeric_host [*numeric_host]]]
+ [Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.numeric_service [*numeric_service]]]
+ [Service name should be treated as a numeric string defining a port number and no name resolution should be attempted. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.passive [*passive]]]
+ [Indicate that returned endpoint is intended for use as a locally bound socket endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.v4_mapped [*v4_mapped]]]
+ [If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. ]
+ ]
+
+]
+
+The
+[link boost_asio.reference.ip__basic_resolver_query ip::basic_resolver_query] class template describes a query that can be passed to a resolver.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
+
+
+
+[section:address_configured ip::basic_resolver_query::address_configured]
+
+
+['Inherited from ip::resolver_query_base.]
+
+Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system.
+
+ static const int address_configured = implementation_defined;
+
+
+
+[endsect]
+
+
+
+[section:all_matching ip::basic_resolver_query::all_matching]
+
+
+['Inherited from ip::resolver_query_base.]
+
+If used with v4_mapped, return all matching IPv6 and IPv4 addresses.
+
+ static const int all_matching = implementation_defined;
+
+
+
+[endsect]
+
+
+[section:basic_resolver_query ip::basic_resolver_query::basic_resolver_query]
+
+Construct with specified service name for any protocol.
+
+ ``[link boost_asio.reference.ip__basic_resolver_query.basic_resolver_query.overload1 basic_resolver_query]``(
+ const std::string & service_name,
+ int flags = passive|address_configured);
+
+ ``[link boost_asio.reference.ip__basic_resolver_query.basic_resolver_query.overload2 basic_resolver_query]``(
+ const protocol_type & protocol,
+ const std::string & service_name,
+ int flags = passive|address_configured);
+
+ ``[link boost_asio.reference.ip__basic_resolver_query.basic_resolver_query.overload3 basic_resolver_query]``(
+ const std::string & host_name,
+ const std::string & service_name,
+ int flags = address_configured);
+
+ ``[link boost_asio.reference.ip__basic_resolver_query.basic_resolver_query.overload4 basic_resolver_query]``(
+ const protocol_type & protocol,
+ const std::string & host_name,
+ const std::string & service_name,
+ int flags = address_configured);
+
+
+[section:overload1 ip::basic_resolver_query::basic_resolver_query (1 of 4 overloads)]
+
+Construct with specified service name for any protocol.
+
+ basic_resolver_query(
+ const std::string & service_name,
+ int flags = passive|address_configured);
+
+
+
+[endsect]
+
+
+
+[section:overload2 ip::basic_resolver_query::basic_resolver_query (2 of 4 overloads)]
+
+Construct with specified service name for a given protocol.
+
+ basic_resolver_query(
+ const protocol_type & protocol,
+ const std::string & service_name,
+ int flags = passive|address_configured);
+
+
+
+[endsect]
+
+
+
+[section:overload3 ip::basic_resolver_query::basic_resolver_query (3 of 4 overloads)]
+
+Construct with specified host name and service name for any protocol.
+
+ basic_resolver_query(
+ const std::string & host_name,
+ const std::string & service_name,
+ int flags = address_configured);
+
+
+
+[endsect]
+
+
+
+[section:overload4 ip::basic_resolver_query::basic_resolver_query (4 of 4 overloads)]
+
+Construct with specified host name and service name for a given protocol.
+
+ basic_resolver_query(
+ const protocol_type & protocol,
+ const std::string & host_name,
+ const std::string & service_name,
+ int flags = address_configured);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:canonical_name ip::basic_resolver_query::canonical_name]
+
+
+['Inherited from ip::resolver_query_base.]
+
+Determine the canonical name of the host specified in the query.
+
+ static const int canonical_name = implementation_defined;
+
+
+
+[endsect]
+
+
+
+[section:hints ip::basic_resolver_query::hints]
+
+Get the hints associated with the query.
+
+ const boost::asio::detail::addrinfo_type & hints() const;
+
+
+
+[endsect]
+
+
+
+[section:host_name ip::basic_resolver_query::host_name]
+
+Get the host name associated with the query.
+
+ std::string host_name() const;
+
+
+
+[endsect]
+
+
+
+[section:numeric_host ip::basic_resolver_query::numeric_host]
+
+
+['Inherited from ip::resolver_query_base.]
+
+Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted.
+
+ static const int numeric_host = implementation_defined;
+
+
+
+[endsect]
+
+
+
+[section:numeric_service ip::basic_resolver_query::numeric_service]
+
+
+['Inherited from ip::resolver_query_base.]
+
+Service name should be treated as a numeric string defining a port number and no name resolution should be attempted.
+
+ static const int numeric_service = implementation_defined;
+
+
+
+[endsect]
+
+
+
+[section:passive ip::basic_resolver_query::passive]
+
+
+['Inherited from ip::resolver_query_base.]
+
+Indicate that returned endpoint is intended for use as a locally bound socket endpoint.
+
+ static const int passive = implementation_defined;
+
+
+
+[endsect]
+
+
+
+[section:protocol_type ip::basic_resolver_query::protocol_type]
+
+The protocol type associated with the endpoint query.
+
+ typedef InternetProtocol protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:service_name ip::basic_resolver_query::service_name]
+
+Get the service name associated with the query.
+
+ std::string service_name() const;
+
+
+
+[endsect]
+
+
+
+[section:v4_mapped ip::basic_resolver_query::v4_mapped]
+
+
+['Inherited from ip::resolver_query_base.]
+
+If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses.
+
+ static const int v4_mapped = implementation_defined;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:ip__host_name ip::host_name]
+
+Get the current host name.
+
+ std::string ``[link boost_asio.reference.ip__host_name.overload1 host_name]``();
+
+ std::string ``[link boost_asio.reference.ip__host_name.overload2 host_name]``(
+ boost::system::error_code & ec);
+
+
+[section:overload1 ip::host_name (1 of 2 overloads)]
+
+Get the current host name.
+
+ std::string host_name();
+
+
+
+[endsect]
+
+
+
+[section:overload2 ip::host_name (2 of 2 overloads)]
+
+Get the current host name.
+
+ std::string host_name(
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:ip__icmp ip::icmp]
+
+Encapsulates the flags needed for ICMP.
+
+ class icmp
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.ip__icmp.endpoint [*endpoint]]]
+ [The type of a ICMP endpoint. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__icmp.resolver [*resolver]]]
+ [The ICMP resolver type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__icmp.resolver_iterator [*resolver_iterator]]]
+ [The type of a resolver iterator. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__icmp.resolver_query [*resolver_query]]]
+ [The type of a resolver query. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__icmp.socket [*socket]]]
+ [The ICMP socket type. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__icmp.family [*family]]]
+ [Obtain an identifier for the protocol family. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__icmp.protocol [*protocol]]]
+ [Obtain an identifier for the protocol. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__icmp.type [*type]]]
+ [Obtain an identifier for the type of the protocol. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__icmp.v4 [*v4]]]
+ [Construct to represent the IPv4 ICMP protocol. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__icmp.v6 [*v6]]]
+ [Construct to represent the IPv6 ICMP protocol. ]
+ ]
+
+]
+
+[heading Friends]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__icmp.operator_not__eq_ [*operator!=]]]
+ [Compare two protocols for inequality. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__icmp.operator_eq__eq_ [*operator==]]]
+ [Compare two protocols for equality. ]
+ ]
+
+]
+
+The
+[link boost_asio.reference.ip__icmp ip::icmp] class contains flags necessary for ICMP sockets.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Safe.
+
+
+
+[section:endpoint ip::icmp::endpoint]
+
+The type of a ICMP endpoint.
+
+ typedef basic_endpoint< icmp > endpoint;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.ip__basic_endpoint.data_type [*data_type]]]
+ [The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__basic_endpoint.protocol_type [*protocol_type]]]
+ [The protocol type associated with the endpoint. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.address [*address]]]
+ [Get the IP address associated with the endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.basic_endpoint [*basic_endpoint]]]
+ [Default constructor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.capacity [*capacity]]]
+ [Get the capacity of the endpoint in the native type. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.data [*data]]]
+ [Get the underlying endpoint in the native type. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.operator_eq_ [*operator=]]]
+ [Assign from another endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.port [*port]]]
+ [Get the port associated with the endpoint. The port number is always in the host's byte order. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.protocol [*protocol]]]
+ [The protocol associated with the endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.resize [*resize]]]
+ [Set the underlying size of the endpoint in the native type. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.size [*size]]]
+ [Get the underlying size of the endpoint in the native type. ]
+ ]
+
+]
+
+[heading Friends]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.operator_not__eq_ [*operator!=]]]
+ [Compare two endpoints for inequality. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.operator_lt_ [*operator<]]]
+ [Compare endpoints for ordering. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.operator_eq__eq_ [*operator==]]]
+ [Compare two endpoints for equality. ]
+ ]
+
+]
+
+[heading Related Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.operator_lt__lt_ [*operator<<]]]
+ [Output an endpoint as a string. ]
+ ]
+
+]
+
+The
+[link boost_asio.reference.ip__basic_endpoint ip::basic_endpoint] class template describes an endpoint that may be associated with a particular socket.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
+
+
+
+
+[endsect]
+
+
+
+[section:family ip::icmp::family]
+
+Obtain an identifier for the protocol family.
+
+ int family() const;
+
+
+
+[endsect]
+
+
+
+[section:operator_not__eq_ ip::icmp::operator!=]
+
+Compare two protocols for inequality.
+
+ friend bool operator!=(
+ const icmp & p1,
+ const icmp & p2);
+
+
+
+[endsect]
+
+
+
+[section:operator_eq__eq_ ip::icmp::operator==]
+
+Compare two protocols for equality.
+
+ friend bool operator==(
+ const icmp & p1,
+ const icmp & p2);
+
+
+
+[endsect]
+
+
+
+[section:protocol ip::icmp::protocol]
+
+Obtain an identifier for the protocol.
+
+ int protocol() const;
+
+
+
+[endsect]
+
+
+
+[section:resolver ip::icmp::resolver]
+
+The ICMP resolver type.
+
+ typedef basic_resolver< icmp > resolver;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.ip__basic_resolver.endpoint_type [*endpoint_type]]]
+ [The endpoint type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__basic_resolver.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__basic_resolver.iterator [*iterator]]]
+ [The iterator type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__basic_resolver.protocol_type [*protocol_type]]]
+ [The protocol type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__basic_resolver.query [*query]]]
+ [The query type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__basic_resolver.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.async_resolve [*async_resolve]]]
+ [Asynchronously resolve a query to a list of entries. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.basic_resolver [*basic_resolver]]]
+ [Constructor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.cancel [*cancel]]]
+ [Cancel any asynchronous operations that are waiting on the resolver. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.resolve [*resolve]]]
+ [Resolve a query to a list of entries. ]
+ ]
+
+]
+
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
+
+]
+
+The basic_resolver class template provides the ability to resolve a query to a list of endpoints.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
+
+
+
+
+[endsect]
+
+
+
+[section:resolver_iterator ip::icmp::resolver_iterator]
+
+The type of a resolver iterator.
+
+ typedef basic_resolver_iterator< icmp > resolver_iterator;
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_iterator.basic_resolver_iterator [*basic_resolver_iterator]]]
+ [Default constructor creates an end iterator. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_iterator.create [*create]]]
+ [Create an iterator from an addrinfo list returned by getaddrinfo. ]
+ ]
+
+]
+
+The
+[link boost_asio.reference.ip__basic_resolver_iterator ip::basic_resolver_iterator] class template is used to define iterators over the results returned by a resolver.
+
+The iterator's value\_type, obtained when the iterator is dereferenced, is:
+
+ const basic_resolver_entry<InternetProtocol>
+
+
+
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
+
+
+
+
+[endsect]
+
+
+
+[section:resolver_query ip::icmp::resolver_query]
+
+The type of a resolver query.
+
+ typedef basic_resolver_query< icmp > resolver_query;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.ip__basic_resolver_query.protocol_type [*protocol_type]]]
+ [The protocol type associated with the endpoint query. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.basic_resolver_query [*basic_resolver_query]]]
+ [Construct with specified service name for any protocol. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.hints [*hints]]]
+ [Get the hints associated with the query. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.host_name [*host_name]]]
+ [Get the host name associated with the query. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.service_name [*service_name]]]
+ [Get the service name associated with the query. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.address_configured [*address_configured]]]
+ [Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.all_matching [*all_matching]]]
+ [If used with v4_mapped, return all matching IPv6 and IPv4 addresses. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.canonical_name [*canonical_name]]]
+ [Determine the canonical name of the host specified in the query. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.numeric_host [*numeric_host]]]
+ [Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.numeric_service [*numeric_service]]]
+ [Service name should be treated as a numeric string defining a port number and no name resolution should be attempted. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.passive [*passive]]]
+ [Indicate that returned endpoint is intended for use as a locally bound socket endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.v4_mapped [*v4_mapped]]]
+ [If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. ]
+ ]
+
+]
+
+The
+[link boost_asio.reference.ip__basic_resolver_query ip::basic_resolver_query] class template describes a query that can be passed to a resolver.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
+
+
+
+
+[endsect]
+
+
+
+[section:socket ip::icmp::socket]
+
+The ICMP socket type.
+
+ typedef basic_raw_socket< icmp > socket;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.basic_raw_socket.broadcast [*broadcast]]]
+ [Socket option to permit sending of broadcast messages. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_raw_socket.bytes_readable [*bytes_readable]]]
+ [IO control command to get the amount of data that can be read without blocking. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_raw_socket.debug [*debug]]]
+ [Socket option to enable socket-level debugging. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_raw_socket.do_not_route [*do_not_route]]]
+ [Socket option to prevent routing, use local interfaces only. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_raw_socket.enable_connection_aborted [*enable_connection_aborted]]]
+ [Socket option to report aborted connections on accept. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_raw_socket.endpoint_type [*endpoint_type]]]
+ [The endpoint type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_raw_socket.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_raw_socket.keep_alive [*keep_alive]]]
+ [Socket option to send keep-alives. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_raw_socket.linger [*linger]]]
+ [Socket option to specify whether the socket lingers on close if unsent data is present. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_raw_socket.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_socket is always the lowest layer. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_raw_socket.message_flags [*message_flags]]]
+ [Bitmask type for flags that can be passed to send and receive operations. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_raw_socket.native_type [*native_type]]]
+ [The native representation of a socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_raw_socket.non_blocking_io [*non_blocking_io]]]
+ [IO control command to set the blocking mode of the socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_raw_socket.protocol_type [*protocol_type]]]
+ [The protocol type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_raw_socket.receive_buffer_size [*receive_buffer_size]]]
+ [Socket option for the receive buffer size of a socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_raw_socket.receive_low_watermark [*receive_low_watermark]]]
+ [Socket option for the receive low watermark. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_raw_socket.reuse_address [*reuse_address]]]
+ [Socket option to allow the socket to be bound to an address that is already in use. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_raw_socket.send_buffer_size [*send_buffer_size]]]
+ [Socket option for the send buffer size of a socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_raw_socket.send_low_watermark [*send_low_watermark]]]
+ [Socket option for the send low watermark. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_raw_socket.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_raw_socket.shutdown_type [*shutdown_type]]]
+ [Different ways a socket may be shutdown. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.assign [*assign]]]
+ [Assign an existing native socket to the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.async_connect [*async_connect]]]
+ [Start an asynchronous connect. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.async_receive [*async_receive]]]
+ [Start an asynchronous receive on a connected socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.async_receive_from [*async_receive_from]]]
+ [Start an asynchronous receive. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.async_send [*async_send]]]
+ [Start an asynchronous send on a connected socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.async_send_to [*async_send_to]]]
+ [Start an asynchronous send. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.at_mark [*at_mark]]]
+ [Determine whether the socket is at the out-of-band data mark. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.available [*available]]]
+ [Determine the number of bytes available for reading. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.basic_raw_socket [*basic_raw_socket]]]
+ [Construct a basic_raw_socket without opening it. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.bind [*bind]]]
+ [Bind the socket to the given local endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.close [*close]]]
+ [Close the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.connect [*connect]]]
+ [Connect the socket to the specified endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.get_option [*get_option]]]
+ [Get an option from the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.io_control [*io_control]]]
+ [Perform an IO control command on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.is_open [*is_open]]]
+ [Determine whether the socket is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.local_endpoint [*local_endpoint]]]
+ [Get the local endpoint of the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.native [*native]]]
+ [Get the native socket representation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.open [*open]]]
+ [Open the socket using the specified protocol. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.receive [*receive]]]
+ [Receive some data on a connected socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.receive_from [*receive_from]]]
+ [Receive raw data with the endpoint of the sender. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.remote_endpoint [*remote_endpoint]]]
+ [Get the remote endpoint of the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.send [*send]]]
+ [Send some data on a connected socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.send_to [*send_to]]]
+ [Send raw data to the specified endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.set_option [*set_option]]]
+ [Set an option on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.shutdown [*shutdown]]]
+ [Disable sends or receives on the socket. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.max_connections [*max_connections]]]
+ [The maximum length of the queue of pending incoming connections. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.message_do_not_route [*message_do_not_route]]]
+ [Specify that the data should not be subject to routing. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.message_out_of_band [*message_out_of_band]]]
+ [Process out-of-band data. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.message_peek [*message_peek]]]
+ [Peek at incoming data without removing it from the input queue. ]
+ ]
+
+]
+
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_raw_socket.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
+
+]
+
+The basic_raw_socket class template provides asynchronous and blocking raw-oriented socket functionality.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
+
+
+
+
+[endsect]
+
+
+
+[section:type ip::icmp::type]
+
+Obtain an identifier for the type of the protocol.
+
+ int type() const;
+
+
+
+[endsect]
+
+
+
+[section:v4 ip::icmp::v4]
+
+Construct to represent the IPv4 ICMP protocol.
+
+ static icmp v4();
+
+
+
+[endsect]
+
+
+
+[section:v6 ip::icmp::v6]
+
+Construct to represent the IPv6 ICMP protocol.
+
+ static icmp v6();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+
+[section:ip__multicast__enable_loopback ip::multicast::enable_loopback]
+
+Socket option determining whether outgoing multicast packets will be received on the same socket if it is a member of the multicast group.
+
+ typedef implementation_defined enable_loopback;
+
+
+
+Implements the IPPROTO\_IP/IP\_MULTICAST\_LOOP socket option.
+
+
+[heading Examples]
+
+Setting the option:
+
+ boost::asio::ip::udp::socket socket(io_service);
+ ...
+ boost::asio::ip::multicast::enable_loopback option(true);
+ socket.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::udp::socket socket(io_service);
+ ...
+ boost::asio::ip::multicast::enable_loopback option;
+ socket.get_option(option);
+ bool is_set = option.value();
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:ip__multicast__hops ip::multicast::hops]
+
+Socket option for time-to-live associated with outgoing multicast packets.
+
+ typedef implementation_defined hops;
+
+
+
+Implements the IPPROTO\_IP/IP\_MULTICAST\_TTL socket option.
+
+
+[heading Examples]
+
+Setting the option:
+
+ boost::asio::ip::udp::socket socket(io_service);
+ ...
+ boost::asio::ip::multicast::hops option(4);
+ socket.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::udp::socket socket(io_service);
+ ...
+ boost::asio::ip::multicast::hops option;
+ socket.get_option(option);
+ int ttl = option.value();
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:ip__multicast__join_group ip::multicast::join_group]
+
+Socket option to join a multicast group on a specified interface.
+
+ typedef implementation_defined join_group;
+
+
+
+Implements the IPPROTO\_IP/IP\_ADD\_MEMBERSHIP socket option.
+
+
+[heading Examples]
+
+Setting the option to join a multicast group:
+
+ boost::asio::ip::udp::socket socket(io_service);
+ ...
+ boost::asio::ip::address multicast_address =
+ boost::asio::ip::address::from_string("225.0.0.1");
+ boost::asio::ip::multicast::join_group option(multicast_address);
+ socket.set_option(option);
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:ip__multicast__leave_group ip::multicast::leave_group]
+
+Socket option to leave a multicast group on a specified interface.
+
+ typedef implementation_defined leave_group;
+
+
+
+Implements the IPPROTO\_IP/IP\_DROP\_MEMBERSHIP socket option.
+
+
+[heading Examples]
+
+Setting the option to leave a multicast group:
+
+ boost::asio::ip::udp::socket socket(io_service);
+ ...
+ boost::asio::ip::address multicast_address =
+ boost::asio::ip::address::from_string("225.0.0.1");
+ boost::asio::ip::multicast::leave_group option(multicast_address);
+ socket.set_option(option);
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:ip__multicast__outbound_interface ip::multicast::outbound_interface]
+
+Socket option for local interface to use for outgoing multicast packets.
+
+ typedef implementation_defined outbound_interface;
+
+
+
+Implements the IPPROTO\_IP/IP\_MULTICAST\_IF socket option.
+
+
+[heading Examples]
+
+Setting the option:
+
+ boost::asio::ip::udp::socket socket(io_service);
+ ...
+ boost::asio::ip::address_v4 local_interface =
+ boost::asio::ip::address_v4::from_string("1.2.3.4");
+ boost::asio::ip::multicast::outbound_interface option(local_interface);
+ socket.set_option(option);
+
+
+
+
+
+
+[endsect]
+
+
+[section:ip__resolver_query_base ip::resolver_query_base]
+
+The resolver_query_base class is used as a base for the basic_resolver_query class templates to provide a common place to define the flag constants.
+
+ class resolver_query_base
+
+
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__resolver_query_base._resolver_query_base [*~resolver_query_base]]]
+ [Protected destructor to prevent deletion through this type. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__resolver_query_base.address_configured [*address_configured]]]
+ [Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__resolver_query_base.all_matching [*all_matching]]]
+ [If used with v4_mapped, return all matching IPv6 and IPv4 addresses. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__resolver_query_base.canonical_name [*canonical_name]]]
+ [Determine the canonical name of the host specified in the query. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__resolver_query_base.numeric_host [*numeric_host]]]
+ [Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__resolver_query_base.numeric_service [*numeric_service]]]
+ [Service name should be treated as a numeric string defining a port number and no name resolution should be attempted. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__resolver_query_base.passive [*passive]]]
+ [Indicate that returned endpoint is intended for use as a locally bound socket endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__resolver_query_base.v4_mapped [*v4_mapped]]]
+ [If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. ]
+ ]
+
+]
+
+
+[section:address_configured ip::resolver_query_base::address_configured]
+
+Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system.
+
+ static const int address_configured = implementation_defined;
+
+
+
+[endsect]
+
+
+
+[section:all_matching ip::resolver_query_base::all_matching]
+
+If used with v4_mapped, return all matching IPv6 and IPv4 addresses.
+
+ static const int all_matching = implementation_defined;
+
+
+
+[endsect]
+
+
+
+[section:canonical_name ip::resolver_query_base::canonical_name]
+
+Determine the canonical name of the host specified in the query.
+
+ static const int canonical_name = implementation_defined;
+
+
+
+[endsect]
+
+
+
+[section:numeric_host ip::resolver_query_base::numeric_host]
+
+Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted.
+
+ static const int numeric_host = implementation_defined;
+
+
+
+[endsect]
+
+
+
+[section:numeric_service ip::resolver_query_base::numeric_service]
+
+Service name should be treated as a numeric string defining a port number and no name resolution should be attempted.
+
+ static const int numeric_service = implementation_defined;
+
+
+
+[endsect]
+
+
+
+[section:passive ip::resolver_query_base::passive]
+
+Indicate that returned endpoint is intended for use as a locally bound socket endpoint.
+
+ static const int passive = implementation_defined;
+
+
+
+[endsect]
+
+
+
+[section:v4_mapped ip::resolver_query_base::v4_mapped]
+
+If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses.
+
+ static const int v4_mapped = implementation_defined;
+
+
+
+[endsect]
+
+
+
+[section:_resolver_query_base ip::resolver_query_base::~resolver_query_base]
+
+Protected destructor to prevent deletion through this type.
+
+ ~resolver_query_base();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:ip__resolver_service ip::resolver_service]
+
+Default service implementation for a resolver.
+
+ template<
+ typename ``[link boost_asio.reference.InternetProtocol InternetProtocol]``>
+ class resolver_service :
+ public io_service::service
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.ip__resolver_service.endpoint_type [*endpoint_type]]]
+ [The endpoint type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__resolver_service.implementation_type [*implementation_type]]]
+ [The type of a resolver implementation. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__resolver_service.iterator_type [*iterator_type]]]
+ [The iterator type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__resolver_service.protocol_type [*protocol_type]]]
+ [The protocol type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__resolver_service.query_type [*query_type]]]
+ [The query type. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__resolver_service.async_resolve [*async_resolve]]]
+ [Asynchronously resolve a query to a list of entries. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__resolver_service.cancel [*cancel]]]
+ [Cancel pending asynchronous operations. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__resolver_service.construct [*construct]]]
+ [Construct a new resolver implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__resolver_service.destroy [*destroy]]]
+ [Destroy a resolver implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__resolver_service.get_io_service [*get_io_service]]]
+ [Get the io_service object that owns the service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__resolver_service.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service object that owns the service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__resolver_service.resolve [*resolve]]]
+ [Resolve a query to a list of entries. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__resolver_service.resolver_service [*resolver_service]]]
+ [Construct a new resolver service for the specified io_service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__resolver_service.shutdown_service [*shutdown_service]]]
+ [Destroy all user-defined handler objects owned by the service. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__resolver_service.id [*id]]]
+ [The unique service identifier. ]
+ ]
+
+]
+
+[section:async_resolve ip::resolver_service::async_resolve]
+
+Asynchronously resolve a query to a list of entries.
+
+ template<
+ typename ``[link boost_asio.reference.Handler Handler]``>
+ void ``[link boost_asio.reference.ip__resolver_service.async_resolve.overload1 async_resolve]``(
+ implementation_type & impl,
+ const query_type & query,
+ Handler handler);
+
+ template<
+ typename ``[link boost_asio.reference.ResolveHandler ResolveHandler]``>
+ void ``[link boost_asio.reference.ip__resolver_service.async_resolve.overload2 async_resolve]``(
+ implementation_type & impl,
+ const endpoint_type & endpoint,
+ ResolveHandler handler);
+
+
+[section:overload1 ip::resolver_service::async_resolve (1 of 2 overloads)]
+
+Asynchronously resolve a query to a list of entries.
+
+ template<
+ typename ``[link boost_asio.reference.Handler Handler]``>
+ void async_resolve(
+ implementation_type & impl,
+ const query_type & query,
+ Handler handler);
+
+
+
+[endsect]
+
+
+
+[section:overload2 ip::resolver_service::async_resolve (2 of 2 overloads)]
+
+Asynchronously resolve an endpoint to a list of entries.
+
+ template<
+ typename ``[link boost_asio.reference.ResolveHandler ResolveHandler]``>
+ void async_resolve(
+ implementation_type & impl,
+ const endpoint_type & endpoint,
+ ResolveHandler handler);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:cancel ip::resolver_service::cancel]
+
+Cancel pending asynchronous operations.
+
+ void cancel(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:construct ip::resolver_service::construct]
+
+Construct a new resolver implementation.
+
+ void construct(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:destroy ip::resolver_service::destroy]
+
+Destroy a resolver implementation.
+
+ void destroy(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:endpoint_type ip::resolver_service::endpoint_type]
+
+The endpoint type.
+
+ typedef InternetProtocol::endpoint endpoint_type;
+
+
+
+
+[endsect]
+
+
+
+[section:get_io_service ip::resolver_service::get_io_service]
+
+
+['Inherited from io_service.]
+
+Get the io_service object that owns the service.
+
+ boost::asio::io_service & get_io_service();
+
+
+
+[endsect]
+
+
+
+[section:id ip::resolver_service::id]
+
+The unique service identifier.
+
+ static boost::asio::io_service::id id;
+
+
+
+[endsect]
+
+
+
+[section:implementation_type ip::resolver_service::implementation_type]
+
+The type of a resolver implementation.
+
+ typedef implementation_defined implementation_type;
+
+
+
+
+[endsect]
+
+
+
+[section:io_service ip::resolver_service::io_service]
+
+
+['Inherited from io_service.]
+
+(Deprecated: use get_io_service().) Get the io_service object that owns the service.
+
+ boost::asio::io_service & io_service();
+
+
+
+[endsect]
+
+
+
+[section:iterator_type ip::resolver_service::iterator_type]
+
+The iterator type.
+
+ typedef InternetProtocol::resolver_iterator iterator_type;
+
+
+
+
+[endsect]
+
+
+
+[section:protocol_type ip::resolver_service::protocol_type]
+
+The protocol type.
+
+ typedef InternetProtocol protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:query_type ip::resolver_service::query_type]
+
+The query type.
+
+ typedef InternetProtocol::resolver_query query_type;
+
+
+
+
+[endsect]
+
+
+[section:resolve ip::resolver_service::resolve]
+
+Resolve a query to a list of entries.
+
+ iterator_type ``[link boost_asio.reference.ip__resolver_service.resolve.overload1 resolve]``(
+ implementation_type & impl,
+ const query_type & query,
+ boost::system::error_code & ec);
+
+ iterator_type ``[link boost_asio.reference.ip__resolver_service.resolve.overload2 resolve]``(
+ implementation_type & impl,
+ const endpoint_type & endpoint,
+ boost::system::error_code & ec);
+
+
+[section:overload1 ip::resolver_service::resolve (1 of 2 overloads)]
+
+Resolve a query to a list of entries.
+
+ iterator_type resolve(
+ implementation_type & impl,
+ const query_type & query,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 ip::resolver_service::resolve (2 of 2 overloads)]
+
+Resolve an endpoint to a list of entries.
+
+ iterator_type resolve(
+ implementation_type & impl,
+ const endpoint_type & endpoint,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:resolver_service ip::resolver_service::resolver_service]
+
+Construct a new resolver service for the specified io_service.
+
+ resolver_service(
+ boost::asio::io_service & io_service);
+
+
+
+[endsect]
+
+
+
+[section:shutdown_service ip::resolver_service::shutdown_service]
+
+Destroy all user-defined handler objects owned by the service.
+
+ void shutdown_service();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:ip__tcp ip::tcp]
+
+Encapsulates the flags needed for TCP.
+
+ class tcp
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.ip__tcp.acceptor [*acceptor]]]
+ [The TCP acceptor type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__tcp.endpoint [*endpoint]]]
+ [The type of a TCP endpoint. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__tcp.iostream [*iostream]]]
+ [The TCP iostream type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__tcp.no_delay [*no_delay]]]
+ [Socket option for disabling the Nagle algorithm. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__tcp.resolver [*resolver]]]
+ [The TCP resolver type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__tcp.resolver_iterator [*resolver_iterator]]]
+ [The type of a resolver iterator. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__tcp.resolver_query [*resolver_query]]]
+ [The type of a resolver query. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__tcp.socket [*socket]]]
+ [The TCP socket type. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__tcp.family [*family]]]
+ [Obtain an identifier for the protocol family. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__tcp.protocol [*protocol]]]
+ [Obtain an identifier for the protocol. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__tcp.type [*type]]]
+ [Obtain an identifier for the type of the protocol. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__tcp.v4 [*v4]]]
+ [Construct to represent the IPv4 TCP protocol. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__tcp.v6 [*v6]]]
+ [Construct to represent the IPv6 TCP protocol. ]
+ ]
+
+]
+
+[heading Friends]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__tcp.operator_not__eq_ [*operator!=]]]
+ [Compare two protocols for inequality. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__tcp.operator_eq__eq_ [*operator==]]]
+ [Compare two protocols for equality. ]
+ ]
+
+]
+
+The
+[link boost_asio.reference.ip__tcp ip::tcp] class contains flags necessary for TCP sockets.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Safe.
+
+
+
+[section:acceptor ip::tcp::acceptor]
+
+The TCP acceptor type.
+
+ typedef basic_socket_acceptor< tcp > acceptor;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.basic_socket_acceptor.broadcast [*broadcast]]]
+ [Socket option to permit sending of broadcast messages. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket_acceptor.bytes_readable [*bytes_readable]]]
+ [IO control command to get the amount of data that can be read without blocking. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket_acceptor.debug [*debug]]]
+ [Socket option to enable socket-level debugging. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket_acceptor.do_not_route [*do_not_route]]]
+ [Socket option to prevent routing, use local interfaces only. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket_acceptor.enable_connection_aborted [*enable_connection_aborted]]]
+ [Socket option to report aborted connections on accept. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket_acceptor.endpoint_type [*endpoint_type]]]
+ [The endpoint type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket_acceptor.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket_acceptor.keep_alive [*keep_alive]]]
+ [Socket option to send keep-alives. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket_acceptor.linger [*linger]]]
+ [Socket option to specify whether the socket lingers on close if unsent data is present. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket_acceptor.message_flags [*message_flags]]]
+ [Bitmask type for flags that can be passed to send and receive operations. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket_acceptor.native_type [*native_type]]]
+ [The native representation of an acceptor. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket_acceptor.non_blocking_io [*non_blocking_io]]]
+ [IO control command to set the blocking mode of the socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket_acceptor.protocol_type [*protocol_type]]]
+ [The protocol type. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket_acceptor.receive_buffer_size [*receive_buffer_size]]]
+ [Socket option for the receive buffer size of a socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket_acceptor.receive_low_watermark [*receive_low_watermark]]]
+ [Socket option for the receive low watermark. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket_acceptor.reuse_address [*reuse_address]]]
+ [Socket option to allow the socket to be bound to an address that is already in use. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket_acceptor.send_buffer_size [*send_buffer_size]]]
+ [Socket option for the send buffer size of a socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket_acceptor.send_low_watermark [*send_low_watermark]]]
+ [Socket option for the send low watermark. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket_acceptor.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_socket_acceptor.shutdown_type [*shutdown_type]]]
+ [Different ways a socket may be shutdown. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.accept [*accept]]]
+ [Accept a new connection. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.assign [*assign]]]
+ [Assigns an existing native acceptor to the acceptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.async_accept [*async_accept]]]
+ [Start an asynchronous accept. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.basic_socket_acceptor [*basic_socket_acceptor]]]
+ [Construct an acceptor without opening it. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.bind [*bind]]]
+ [Bind the acceptor to the given local endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the acceptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.close [*close]]]
+ [Close the acceptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.get_option [*get_option]]]
+ [Get an option from the acceptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.is_open [*is_open]]]
+ [Determine whether the acceptor is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.listen [*listen]]]
+ [Place the acceptor into the state where it will listen for new connections. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.local_endpoint [*local_endpoint]]]
+ [Get the local endpoint of the acceptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.native [*native]]]
+ [Get the native acceptor representation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.open [*open]]]
+ [Open the acceptor using the specified protocol. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.set_option [*set_option]]]
+ [Set an option on the acceptor. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.max_connections [*max_connections]]]
+ [The maximum length of the queue of pending incoming connections. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.message_do_not_route [*message_do_not_route]]]
+ [Specify that the data should not be subject to routing. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.message_out_of_band [*message_out_of_band]]]
+ [Process out-of-band data. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.message_peek [*message_peek]]]
+ [Peek at incoming data without removing it from the input queue. ]
+ ]
+
+]
+
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
+
+]
+
+The basic_socket_acceptor class template is used for accepting new socket connections.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
+
+[heading Example]
+
+Opening a socket acceptor with the SO\_REUSEADDR option enabled:
+
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::tcp::v4(), port);
+ acceptor.open(endpoint.protocol());
+ acceptor.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true));
+ acceptor.bind(endpoint);
+ acceptor.listen();
+
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:endpoint ip::tcp::endpoint]
+
+The type of a TCP endpoint.
+
+ typedef basic_endpoint< tcp > endpoint;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.ip__basic_endpoint.data_type [*data_type]]]
+ [The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ip__basic_endpoint.protocol_type [*protocol_type]]]
+ [The protocol type associated with the endpoint. ]
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.address [*address]]]
+ [Get the IP address associated with the endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.basic_endpoint [*basic_endpoint]]]
+ [Default constructor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.capacity [*capacity]]]
+ [Get the capacity of the endpoint in the native type. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.data [*data]]]
+ [Get the underlying endpoint in the native type. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.operator_eq_ [*operator=]]]
+ [Assign from another endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.port [*port]]]
+ [Get the port associated with the endpoint. The port number is always in the host's byte order. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.protocol [*protocol]]]
+ [The protocol associated with the endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.resize [*resize]]]
+ [Set the underlying size of the endpoint in the native type. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.size [*size]]]
+ [Get the underlying size of the endpoint in the native type. ]
+ ]
+
+]
+
+[heading Friends]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.operator_not__eq_ [*operator!=]]]
+ [Compare two endpoints for inequality. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.operator_lt_ [*operator<]]]
+ [Compare endpoints for ordering. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.operator_eq__eq_ [*operator==]]]
+ [Compare two endpoints for equality. ]
+ ]
+
+]
 
+[heading Related Functions]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.operator_lt__lt_ [*operator<<]]]
+ [Output an endpoint as a string. ]
+ ]
+
+]
 
+The
+[link boost_asio.reference.ip__basic_endpoint ip::basic_endpoint] class template describes an endpoint that may be associated with a particular socket.
 
 
-[section:overload1 buffer (1 of 22 overloads)]
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
-Create a new modifiable buffer from an existing buffer.
+[*Shared] [*objects:] Unsafe.
 
- mutable_buffers_1 buffer(
- const mutable_buffer & b);
 
 
 
@@ -19292,13 +38342,11 @@
 
 
 
-[section:overload2 buffer (2 of 22 overloads)]
+[section:family ip::tcp::family]
 
-Create a new modifiable buffer from an existing buffer.
+Obtain an identifier for the protocol family.
 
- mutable_buffers_1 buffer(
- const mutable_buffer & b,
- std::size_t max_size_in_bytes);
+ int family() const;
 
 
 
@@ -19306,54 +38354,78 @@
 
 
 
-[section:overload3 buffer (3 of 22 overloads)]
+[section:iostream ip::tcp::iostream]
 
-Create a new non-modifiable buffer from an existing buffer.
+The TCP iostream type.
 
- const_buffers_1 buffer(
- const const_buffer & b);
+ typedef basic_socket_iostream< tcp > iostream;
 
 
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
-[endsect]
+ [
+ [[link boost_asio.reference.basic_socket_iostream.basic_socket_iostream [*basic_socket_iostream]]]
+ [Construct a basic_socket_iostream without establishing a connection. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_iostream.close [*close]]]
+ [Close the connection. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_iostream.connect [*connect]]]
+ [Establish a connection to an endpoint corresponding to a resolver query. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_iostream.rdbuf [*rdbuf]]]
+ [Return a pointer to the underlying streambuf. ]
+ ]
+
+]
 
 
 
-[section:overload4 buffer (4 of 22 overloads)]
+[endsect]
 
-Create a new non-modifiable buffer from an existing buffer.
 
- const_buffers_1 buffer(
- const const_buffer & b,
- std::size_t max_size_in_bytes);
 
+[section:no_delay ip::tcp::no_delay]
 
+Socket option for disabling the Nagle algorithm.
 
-[endsect]
+ typedef implementation_defined no_delay;
 
 
 
-[section:overload5 buffer (5 of 22 overloads)]
+Implements the IPPROTO\_TCP/TCP\_NODELAY socket option.
 
-Create a new modifiable buffer that represents the given memory range.
 
- mutable_buffers_1 buffer(
- void * data,
- std::size_t size_in_bytes);
+[heading Examples]
+
+Setting the option:
 
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::ip::tcp::no_delay option(true);
+ socket.set_option(option);
 
 
-[endsect]
 
 
+Getting the current option value:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::ip::tcp::no_delay option;
+ socket.get_option(option);
+ bool is_set = option.value();
 
-[section:overload6 buffer (6 of 22 overloads)]
 
-Create a new non-modifiable buffer that represents the given memory range.
 
- const_buffers_1 buffer(
- const void * data,
- std::size_t size_in_bytes);
 
 
 
@@ -19361,15 +38433,13 @@
 
 
 
-[section:overload7 buffer (7 of 22 overloads)]
+[section:operator_not__eq_ ip::tcp::operator!=]
 
-Create a new modifiable buffer that represents the given POD array.
+Compare two protocols for inequality.
 
- template<
- typename PodType,
- std::size_t N>
- mutable_buffers_1 buffer(
- PodType & data);
+ friend bool operator!=(
+ const tcp & p1,
+ const tcp & p2);
 
 
 
@@ -19377,16 +38447,13 @@
 
 
 
-[section:overload8 buffer (8 of 22 overloads)]
+[section:operator_eq__eq_ ip::tcp::operator==]
 
-Create a new modifiable buffer that represents the given POD array.
+Compare two protocols for equality.
 
- template<
- typename PodType,
- std::size_t N>
- mutable_buffers_1 buffer(
- PodType & data,
- std::size_t max_size_in_bytes);
+ friend bool operator==(
+ const tcp & p1,
+ const tcp & p2);
 
 
 
@@ -19394,15 +38461,11 @@
 
 
 
-[section:overload9 buffer (9 of 22 overloads)]
+[section:protocol ip::tcp::protocol]
 
-Create a new non-modifiable buffer that represents the given POD array.
+Obtain an identifier for the protocol.
 
- template<
- typename PodType,
- std::size_t N>
- const_buffers_1 buffer(
- const PodType & data);
+ int protocol() const;
 
 
 
@@ -19410,115 +38473,169 @@
 
 
 
-[section:overload10 buffer (10 of 22 overloads)]
-
-Create a new non-modifiable buffer that represents the given POD array.
+[section:resolver ip::tcp::resolver]
 
- template<
- typename PodType,
- std::size_t N>
- const_buffers_1 buffer(
- const PodType & data,
- std::size_t max_size_in_bytes);
+The TCP resolver type.
 
+ typedef basic_resolver< tcp > resolver;
 
 
-[endsect]
+[heading Types]
+[table
+ [[Name][Description]]
 
+ [
 
+ [[link boost_asio.reference.ip__basic_resolver.endpoint_type [*endpoint_type]]]
+ [The endpoint type. ]
+
+ ]
 
-[section:overload11 buffer (11 of 22 overloads)]
+ [
 
-Create a new modifiable buffer that represents the given POD array.
+ [[link boost_asio.reference.ip__basic_resolver.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
 
- template<
- typename PodType,
- std::size_t N>
- mutable_buffers_1 buffer(
- boost::array< PodType, N > & data);
+ [
 
+ [[link boost_asio.reference.ip__basic_resolver.iterator [*iterator]]]
+ [The iterator type. ]
+
+ ]
 
+ [
 
-[endsect]
+ [[link boost_asio.reference.ip__basic_resolver.protocol_type [*protocol_type]]]
+ [The protocol type. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.ip__basic_resolver.query [*query]]]
+ [The query type. ]
+
+ ]
 
-[section:overload12 buffer (12 of 22 overloads)]
+ [
 
-Create a new modifiable buffer that represents the given POD array.
+ [[link boost_asio.reference.ip__basic_resolver.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
+
+ ]
 
- template<
- typename PodType,
- std::size_t N>
- mutable_buffers_1 buffer(
- boost::array< PodType, N > & data,
- std::size_t max_size_in_bytes);
+]
 
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.ip__basic_resolver.async_resolve [*async_resolve]]]
+ [Asynchronously resolve a query to a list of entries. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.basic_resolver [*basic_resolver]]]
+ [Constructor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.cancel [*cancel]]]
+ [Cancel any asynchronous operations that are waiting on the resolver. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.resolve [*resolve]]]
+ [Resolve a query to a list of entries. ]
+ ]
+
+]
 
-[endsect]
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.ip__basic_resolver.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
 
+ [
+ [[link boost_asio.reference.ip__basic_resolver.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
 
-[section:overload13 buffer (13 of 22 overloads)]
+]
 
-Create a new non-modifiable buffer that represents the given POD array.
+The basic_resolver class template provides the ability to resolve a query to a list of endpoints.
 
- template<
- typename PodType,
- std::size_t N>
- const_buffers_1 buffer(
- boost::array< const PodType, N > & data);
 
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
+[*Shared] [*objects:] Unsafe.
 
-[endsect]
 
 
 
-[section:overload14 buffer (14 of 22 overloads)]
+[endsect]
 
-Create a new non-modifiable buffer that represents the given POD array.
 
- template<
- typename PodType,
- std::size_t N>
- const_buffers_1 buffer(
- boost::array< const PodType, N > & data,
- std::size_t max_size_in_bytes);
 
+[section:resolver_iterator ip::tcp::resolver_iterator]
 
+The type of a resolver iterator.
 
-[endsect]
+ typedef basic_resolver_iterator< tcp > resolver_iterator;
 
 
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
-[section:overload15 buffer (15 of 22 overloads)]
+ [
+ [[link boost_asio.reference.ip__basic_resolver_iterator.basic_resolver_iterator [*basic_resolver_iterator]]]
+ [Default constructor creates an end iterator. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_iterator.create [*create]]]
+ [Create an iterator from an addrinfo list returned by getaddrinfo. ]
+ ]
+
+]
 
-Create a new non-modifiable buffer that represents the given POD array.
+The
+[link boost_asio.reference.ip__basic_resolver_iterator ip::basic_resolver_iterator] class template is used to define iterators over the results returned by a resolver.
 
- template<
- typename PodType,
- std::size_t N>
- const_buffers_1 buffer(
- const boost::array< PodType, N > & data);
+The iterator's value\_type, obtained when the iterator is dereferenced, is:
 
+ const basic_resolver_entry<InternetProtocol>
 
 
-[endsect]
 
 
 
-[section:overload16 buffer (16 of 22 overloads)]
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
-Create a new non-modifiable buffer that represents the given POD array.
+[*Shared] [*objects:] Unsafe.
 
- template<
- typename PodType,
- std::size_t N>
- const_buffers_1 buffer(
- const boost::array< PodType, N > & data,
- std::size_t max_size_in_bytes);
 
 
 
@@ -19526,161 +38643,265 @@
 
 
 
-[section:overload17 buffer (17 of 22 overloads)]
+[section:resolver_query ip::tcp::resolver_query]
 
-Create a new modifiable buffer that represents the given POD vector.
+The type of a resolver query.
+
+ typedef basic_resolver_query< tcp > resolver_query;
 
- template<
- typename PodType,
- typename Allocator>
- mutable_buffers_1 buffer(
- std::vector< PodType, Allocator > & data);
 
+[heading Types]
+[table
+ [[Name][Description]]
 
+ [
 
-[heading Remarks]
-
-The buffer is invalidated by any vector operation that would also invalidate iterators.
+ [[link boost_asio.reference.ip__basic_resolver_query.protocol_type [*protocol_type]]]
+ [The protocol type associated with the endpoint query. ]
+
+ ]
 
+]
 
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
-[endsect]
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.basic_resolver_query [*basic_resolver_query]]]
+ [Construct with specified service name for any protocol. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.hints [*hints]]]
+ [Get the hints associated with the query. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.host_name [*host_name]]]
+ [Get the host name associated with the query. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.service_name [*service_name]]]
+ [Get the service name associated with the query. ]
+ ]
+
+]
 
+[heading Data Members]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.address_configured [*address_configured]]]
+ [Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system. ]
+ ]
 
-[section:overload18 buffer (18 of 22 overloads)]
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.all_matching [*all_matching]]]
+ [If used with v4_mapped, return all matching IPv6 and IPv4 addresses. ]
+ ]
 
-Create a new modifiable buffer that represents the given POD vector.
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.canonical_name [*canonical_name]]]
+ [Determine the canonical name of the host specified in the query. ]
+ ]
 
- template<
- typename PodType,
- typename Allocator>
- mutable_buffers_1 buffer(
- std::vector< PodType, Allocator > & data,
- std::size_t max_size_in_bytes);
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.numeric_host [*numeric_host]]]
+ [Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. ]
+ ]
 
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.numeric_service [*numeric_service]]]
+ [Service name should be treated as a numeric string defining a port number and no name resolution should be attempted. ]
+ ]
 
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.passive [*passive]]]
+ [Indicate that returned endpoint is intended for use as a locally bound socket endpoint. ]
+ ]
 
-[heading Remarks]
-
-The buffer is invalidated by any vector operation that would also invalidate iterators.
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.v4_mapped [*v4_mapped]]]
+ [If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. ]
+ ]
 
+]
 
+The
+[link boost_asio.reference.ip__basic_resolver_query ip::basic_resolver_query] class template describes a query that can be passed to a resolver.
 
-[endsect]
 
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
+[*Shared] [*objects:] Unsafe.
 
-[section:overload19 buffer (19 of 22 overloads)]
 
-Create a new non-modifiable buffer that represents the given POD vector.
 
- template<
- typename PodType,
- typename Allocator>
- const_buffers_1 buffer(
- const std::vector< PodType, Allocator > & data);
 
+[endsect]
 
 
-[heading Remarks]
-
-The buffer is invalidated by any vector operation that would also invalidate iterators.
 
+[section:socket ip::tcp::socket]
 
+The TCP socket type.
 
-[endsect]
+ typedef basic_stream_socket< tcp > socket;
 
 
+[heading Types]
+[table
+ [[Name][Description]]
 
-[section:overload20 buffer (20 of 22 overloads)]
+ [
 
-Create a new non-modifiable buffer that represents the given POD vector.
+ [[link boost_asio.reference.basic_stream_socket.broadcast [*broadcast]]]
+ [Socket option to permit sending of broadcast messages. ]
+
+ ]
 
- template<
- typename PodType,
- typename Allocator>
- const_buffers_1 buffer(
- const std::vector< PodType, Allocator > & data,
- std::size_t max_size_in_bytes);
+ [
 
+ [[link boost_asio.reference.basic_stream_socket.bytes_readable [*bytes_readable]]]
+ [IO control command to get the amount of data that can be read without blocking. ]
+
+ ]
 
+ [
 
-[heading Remarks]
-
-The buffer is invalidated by any vector operation that would also invalidate iterators.
+ [[link boost_asio.reference.basic_stream_socket.debug [*debug]]]
+ [Socket option to enable socket-level debugging. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.basic_stream_socket.do_not_route [*do_not_route]]]
+ [Socket option to prevent routing, use local interfaces only. ]
+
+ ]
 
-[endsect]
+ [
 
+ [[link boost_asio.reference.basic_stream_socket.enable_connection_aborted [*enable_connection_aborted]]]
+ [Socket option to report aborted connections on accept. ]
+
+ ]
 
+ [
 
-[section:overload21 buffer (21 of 22 overloads)]
+ [[link boost_asio.reference.basic_stream_socket.endpoint_type [*endpoint_type]]]
+ [The endpoint type. ]
+
+ ]
 
-Create a new non-modifiable buffer that represents the given string.
+ [
 
- const_buffers_1 buffer(
- const std::string & data);
+ [[link boost_asio.reference.basic_stream_socket.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.basic_stream_socket.keep_alive [*keep_alive]]]
+ [Socket option to send keep-alives. ]
+
+ ]
 
-[heading Remarks]
-
-The buffer is invalidated by any non-const operation called on the given string object.
+ [
 
+ [[link boost_asio.reference.basic_stream_socket.linger [*linger]]]
+ [Socket option to specify whether the socket lingers on close if unsent data is present. ]
+
+ ]
 
+ [
 
-[endsect]
+ [[link boost_asio.reference.basic_stream_socket.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_socket is always the lowest layer. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.basic_stream_socket.message_flags [*message_flags]]]
+ [Bitmask type for flags that can be passed to send and receive operations. ]
+
+ ]
 
-[section:overload22 buffer (22 of 22 overloads)]
+ [
 
-Create a new non-modifiable buffer that represents the given string.
+ [[link boost_asio.reference.basic_stream_socket.native_type [*native_type]]]
+ [The native representation of a socket. ]
+
+ ]
 
- const_buffers_1 buffer(
- const std::string & data,
- std::size_t max_size_in_bytes);
+ [
 
+ [[link boost_asio.reference.basic_stream_socket.non_blocking_io [*non_blocking_io]]]
+ [IO control command to set the blocking mode of the socket. ]
+
+ ]
 
+ [
 
-[heading Remarks]
-
-The buffer is invalidated by any non-const operation called on the given string object.
+ [[link boost_asio.reference.basic_stream_socket.protocol_type [*protocol_type]]]
+ [The protocol type. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.basic_stream_socket.receive_buffer_size [*receive_buffer_size]]]
+ [Socket option for the receive buffer size of a socket. ]
+
+ ]
 
-[endsect]
+ [
 
+ [[link boost_asio.reference.basic_stream_socket.receive_low_watermark [*receive_low_watermark]]]
+ [Socket option for the receive low watermark. ]
+
+ ]
 
-[endsect]
+ [
 
-[section:buffered_read_stream buffered_read_stream]
+ [[link boost_asio.reference.basic_stream_socket.reuse_address [*reuse_address]]]
+ [Socket option to allow the socket to be bound to an address that is already in use. ]
+
+ ]
 
-Adds buffering to the read-related operations of a stream.
+ [
 
- template<
- typename Stream>
- class buffered_read_stream :
- noncopyable
+ [[link boost_asio.reference.basic_stream_socket.send_buffer_size [*send_buffer_size]]]
+ [Socket option for the send buffer size of a socket. ]
+
+ ]
 
+ [
 
-[heading Types]
-[table
- [[Name][Description]]
+ [[link boost_asio.reference.basic_stream_socket.send_low_watermark [*send_low_watermark]]]
+ [Socket option for the send low watermark. ]
+
+ ]
 
   [
 
- [[link boost_asio.reference.buffered_read_stream.lowest_layer_type [*lowest_layer_type]]]
- [The type of the lowest layer. ]
+ [[link boost_asio.reference.basic_stream_socket.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.buffered_read_stream.next_layer_type [*next_layer_type]]]
- [The type of the next layer. ]
+ [[link boost_asio.reference.basic_stream_socket.shutdown_type [*shutdown_type]]]
+ [Different ways a socket may be shutdown. ]
   
   ]
 
@@ -19691,73 +38912,148 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.buffered_read_stream.async_fill [*async_fill]]]
- [Start an asynchronous fill. ]
+ [[link boost_asio.reference.basic_stream_socket.assign [*assign]]]
+ [Assign an existing native socket to the socket. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_read_stream.async_read_some [*async_read_some]]]
- [Start an asynchronous read. The buffer into which the data will be read must be valid for the lifetime of the asynchronous operation. ]
+ [[link boost_asio.reference.basic_stream_socket.async_connect [*async_connect]]]
+ [Start an asynchronous connect. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_read_stream.async_write_some [*async_write_some]]]
- [Start an asynchronous write. The data being written must be valid for the lifetime of the asynchronous operation. ]
+ [[link boost_asio.reference.basic_stream_socket.async_read_some [*async_read_some]]]
+ [Start an asynchronous read. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_read_stream.buffered_read_stream [*buffered_read_stream]]]
- [Construct, passing the specified argument to initialise the next layer. ]
+ [[link boost_asio.reference.basic_stream_socket.async_receive [*async_receive]]]
+ [Start an asynchronous receive. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_read_stream.close [*close]]]
- [Close the stream. ]
+ [[link boost_asio.reference.basic_stream_socket.async_send [*async_send]]]
+ [Start an asynchronous send. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_read_stream.fill [*fill]]]
- [Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation. Throws an exception on failure. ]
+ [[link boost_asio.reference.basic_stream_socket.async_write_some [*async_write_some]]]
+ [Start an asynchronous write. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_read_stream.get_io_service [*get_io_service]]]
+ [[link boost_asio.reference.basic_stream_socket.at_mark [*at_mark]]]
+ [Determine whether the socket is at the out-of-band data mark. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.available [*available]]]
+ [Determine the number of bytes available for reading. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.basic_stream_socket [*basic_stream_socket]]]
+ [Construct a basic_stream_socket without opening it. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.bind [*bind]]]
+ [Bind the socket to the given local endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.close [*close]]]
+ [Close the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.connect [*connect]]]
+ [Connect the socket to the specified endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.get_io_service [*get_io_service]]]
     [Get the io_service associated with the object. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_read_stream.in_avail [*in_avail]]]
- [Determine the amount of data that may be read without blocking. ]
+ [[link boost_asio.reference.basic_stream_socket.get_option [*get_option]]]
+ [Get an option from the socket. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_read_stream.io_service [*io_service]]]
+ [[link boost_asio.reference.basic_stream_socket.io_control [*io_control]]]
+ [Perform an IO control command on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.io_service [*io_service]]]
     [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_read_stream.lowest_layer [*lowest_layer]]]
+ [[link boost_asio.reference.basic_stream_socket.is_open [*is_open]]]
+ [Determine whether the socket is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.local_endpoint [*local_endpoint]]]
+ [Get the local endpoint of the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.lowest_layer [*lowest_layer]]]
     [Get a reference to the lowest layer. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_read_stream.next_layer [*next_layer]]]
- [Get a reference to the next layer. ]
+ [[link boost_asio.reference.basic_stream_socket.native [*native]]]
+ [Get the native socket representation. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_read_stream.peek [*peek]]]
- [Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure. ]
+ [[link boost_asio.reference.basic_stream_socket.open [*open]]]
+ [Open the socket using the specified protocol. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_read_stream.read_some [*read_some]]]
- [Read some data from the stream. Returns the number of bytes read. Throws an exception on failure. ]
+ [[link boost_asio.reference.basic_stream_socket.read_some [*read_some]]]
+ [Read some data from the socket. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_read_stream.write_some [*write_some]]]
- [Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure. ]
+ [[link boost_asio.reference.basic_stream_socket.receive [*receive]]]
+ [Receive some data on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.remote_endpoint [*remote_endpoint]]]
+ [Get the remote endpoint of the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.send [*send]]]
+ [Send some data on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.set_option [*set_option]]]
+ [Set an option on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.shutdown [*shutdown]]]
+ [Disable sends or receives on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.write_some [*write_some]]]
+ [Write some data to the socket. ]
   ]
   
 ]
@@ -19767,31 +39063,52 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.buffered_read_stream.default_buffer_size [*default_buffer_size]]]
- [The default buffer size. ]
+ [[link boost_asio.reference.basic_stream_socket.max_connections [*max_connections]]]
+ [The maximum length of the queue of pending incoming connections. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.message_do_not_route [*message_do_not_route]]]
+ [Specify that the data should not be subject to routing. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.message_out_of_band [*message_out_of_band]]]
+ [Process out-of-band data. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.message_peek [*message_peek]]]
+ [Peek at incoming data without removing it from the input queue. ]
   ]
 
 ]
 
-The buffered_read_stream class template can be used to add buffering to the synchronous and asynchronous read operations of a stream.
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.basic_stream_socket.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
 
-[heading Thread Safety]
-
-[*Distinct] [*objects:] Safe.
+ [
+ [[link boost_asio.reference.basic_stream_socket.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
 
-[*Shared] [*objects:] Unsafe.
+]
 
+The basic_stream_socket class template provides asynchronous and blocking stream-oriented socket functionality.
 
 
-[section:async_fill buffered_read_stream::async_fill]
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
-Start an asynchronous fill.
+[*Shared] [*objects:] Unsafe.
 
- template<
- typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
- void async_fill(
- ReadHandler handler);
 
 
 
@@ -19799,16 +39116,11 @@
 
 
 
-[section:async_read_some buffered_read_stream::async_read_some]
+[section:type ip::tcp::type]
 
-Start an asynchronous read. The buffer into which the data will be read must be valid for the lifetime of the asynchronous operation.
+Obtain an identifier for the type of the protocol.
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
- void async_read_some(
- const MutableBufferSequence & buffers,
- ReadHandler handler);
+ int type() const;
 
 
 
@@ -19816,133 +39128,259 @@
 
 
 
-[section:async_write_some buffered_read_stream::async_write_some]
+[section:v4 ip::tcp::v4]
 
-Start an asynchronous write. The data being written must be valid for the lifetime of the asynchronous operation.
+Construct to represent the IPv4 TCP protocol.
 
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
- void async_write_some(
- const ConstBufferSequence & buffers,
- WriteHandler handler);
+ static tcp v4();
 
 
 
 [endsect]
 
 
-[section:buffered_read_stream buffered_read_stream::buffered_read_stream]
-
-Construct, passing the specified argument to initialise the next layer.
 
- template<
- typename Arg>
- ``[link boost_asio.reference.buffered_read_stream.buffered_read_stream.overload1 buffered_read_stream]``(
- Arg & a);
+[section:v6 ip::tcp::v6]
 
- template<
- typename Arg>
- ``[link boost_asio.reference.buffered_read_stream.buffered_read_stream.overload2 buffered_read_stream]``(
- Arg & a,
- std::size_t buffer_size);
+Construct to represent the IPv6 TCP protocol.
 
+ static tcp v6();
 
-[section:overload1 buffered_read_stream::buffered_read_stream (1 of 2 overloads)]
 
-Construct, passing the specified argument to initialise the next layer.
 
- template<
- typename Arg>
- buffered_read_stream(
- Arg & a);
+[endsect]
 
 
 
 [endsect]
 
+[section:ip__udp ip::udp]
 
+Encapsulates the flags needed for UDP.
 
-[section:overload2 buffered_read_stream::buffered_read_stream (2 of 2 overloads)]
+ class udp
 
-Construct, passing the specified argument to initialise the next layer.
 
- template<
- typename Arg>
- buffered_read_stream(
- Arg & a,
- std::size_t buffer_size);
+[heading Types]
+[table
+ [[Name][Description]]
 
+ [
 
+ [[link boost_asio.reference.ip__udp.endpoint [*endpoint]]]
+ [The type of a UDP endpoint. ]
+
+ ]
 
-[endsect]
+ [
 
+ [[link boost_asio.reference.ip__udp.resolver [*resolver]]]
+ [The UDP resolver type. ]
+
+ ]
 
-[endsect]
+ [
 
-[section:close buffered_read_stream::close]
+ [[link boost_asio.reference.ip__udp.resolver_iterator [*resolver_iterator]]]
+ [The type of a resolver iterator. ]
+
+ ]
 
-Close the stream.
+ [
 
- void ``[link boost_asio.reference.buffered_read_stream.close.overload1 close]``();
+ [[link boost_asio.reference.ip__udp.resolver_query [*resolver_query]]]
+ [The type of a resolver query. ]
+
+ ]
 
- boost::system::error_code ``[link boost_asio.reference.buffered_read_stream.close.overload2 close]``(
- boost::system::error_code & ec);
+ [
 
+ [[link boost_asio.reference.ip__udp.socket [*socket]]]
+ [The UDP socket type. ]
+
+ ]
 
-[section:overload1 buffered_read_stream::close (1 of 2 overloads)]
+]
 
-Close the stream.
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
- void close();
+ [
+ [[link boost_asio.reference.ip__udp.family [*family]]]
+ [Obtain an identifier for the protocol family. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__udp.protocol [*protocol]]]
+ [Obtain an identifier for the protocol. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__udp.type [*type]]]
+ [Obtain an identifier for the type of the protocol. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__udp.v4 [*v4]]]
+ [Construct to represent the IPv4 UDP protocol. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__udp.v6 [*v6]]]
+ [Construct to represent the IPv6 UDP protocol. ]
+ ]
+
+]
 
+[heading Friends]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.ip__udp.operator_not__eq_ [*operator!=]]]
+ [Compare two protocols for inequality. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__udp.operator_eq__eq_ [*operator==]]]
+ [Compare two protocols for equality. ]
+ ]
+
+]
 
-[endsect]
+The
+[link boost_asio.reference.ip__udp ip::udp] class contains flags necessary for UDP sockets.
 
 
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
-[section:overload2 buffered_read_stream::close (2 of 2 overloads)]
+[*Shared] [*objects:] Safe.
 
-Close the stream.
 
- boost::system::error_code close(
- boost::system::error_code & ec);
 
+[section:endpoint ip::udp::endpoint]
 
+The type of a UDP endpoint.
 
-[endsect]
+ typedef basic_endpoint< udp > endpoint;
 
 
-[endsect]
+[heading Types]
+[table
+ [[Name][Description]]
 
+ [
 
-[section:default_buffer_size buffered_read_stream::default_buffer_size]
+ [[link boost_asio.reference.ip__basic_endpoint.data_type [*data_type]]]
+ [The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. ]
+
+ ]
 
-The default buffer size.
+ [
 
- static const std::size_t default_buffer_size = implementation_defined;
+ [[link boost_asio.reference.ip__basic_endpoint.protocol_type [*protocol_type]]]
+ [The protocol type associated with the endpoint. ]
+
+ ]
 
+]
 
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
-[endsect]
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.address [*address]]]
+ [Get the IP address associated with the endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.basic_endpoint [*basic_endpoint]]]
+ [Default constructor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.capacity [*capacity]]]
+ [Get the capacity of the endpoint in the native type. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.data [*data]]]
+ [Get the underlying endpoint in the native type. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.operator_eq_ [*operator=]]]
+ [Assign from another endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.port [*port]]]
+ [Get the port associated with the endpoint. The port number is always in the host's byte order. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.protocol [*protocol]]]
+ [The protocol associated with the endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.resize [*resize]]]
+ [Set the underlying size of the endpoint in the native type. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.size [*size]]]
+ [Get the underlying size of the endpoint in the native type. ]
+ ]
+
+]
 
+[heading Friends]
+[table
+ [[Name][Description]]
 
-[section:fill buffered_read_stream::fill]
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.operator_not__eq_ [*operator!=]]]
+ [Compare two endpoints for inequality. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.operator_lt_ [*operator<]]]
+ [Compare endpoints for ordering. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.operator_eq__eq_ [*operator==]]]
+ [Compare two endpoints for equality. ]
+ ]
+
+]
 
-Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation. Throws an exception on failure.
+[heading Related Functions]
+[table
+ [[Name][Description]]
 
- std::size_t ``[link boost_asio.reference.buffered_read_stream.fill.overload1 fill]``();
+ [
+ [[link boost_asio.reference.ip__basic_endpoint.operator_lt__lt_ [*operator<<]]]
+ [Output an endpoint as a string. ]
+ ]
+
+]
 
- std::size_t ``[link boost_asio.reference.buffered_read_stream.fill.overload2 fill]``(
- boost::system::error_code & ec);
+The
+[link boost_asio.reference.ip__basic_endpoint ip::basic_endpoint] class template describes an endpoint that may be associated with a particular socket.
 
 
-[section:overload1 buffered_read_stream::fill (1 of 2 overloads)]
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
-Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation. Throws an exception on failure.
+[*Shared] [*objects:] Unsafe.
 
- std::size_t fill();
 
 
 
@@ -19950,47 +39388,51 @@
 
 
 
-[section:overload2 buffered_read_stream::fill (2 of 2 overloads)]
+[section:family ip::udp::family]
 
-Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation, or 0 if an error occurred.
+Obtain an identifier for the protocol family.
 
- std::size_t fill(
- boost::system::error_code & ec);
+ int family() const;
 
 
 
 [endsect]
 
 
-[endsect]
-
 
-[section:get_io_service buffered_read_stream::get_io_service]
+[section:operator_not__eq_ ip::udp::operator!=]
 
-Get the io_service associated with the object.
+Compare two protocols for inequality.
 
- boost::asio::io_service & get_io_service();
+ friend bool operator!=(
+ const udp & p1,
+ const udp & p2);
 
 
 
 [endsect]
 
 
-[section:in_avail buffered_read_stream::in_avail]
 
-Determine the amount of data that may be read without blocking.
+[section:operator_eq__eq_ ip::udp::operator==]
 
- std::size_t ``[link boost_asio.reference.buffered_read_stream.in_avail.overload1 in_avail]``();
+Compare two protocols for equality.
+
+ friend bool operator==(
+ const udp & p1,
+ const udp & p2);
+
+
+
+[endsect]
 
- std::size_t ``[link boost_asio.reference.buffered_read_stream.in_avail.overload2 in_avail]``(
- boost::system::error_code & ec);
 
 
-[section:overload1 buffered_read_stream::in_avail (1 of 2 overloads)]
+[section:protocol ip::udp::protocol]
 
-Determine the amount of data that may be read without blocking.
+Obtain an identifier for the protocol.
 
- std::size_t in_avail();
+ int protocol() const;
 
 
 
@@ -19998,50 +39440,121 @@
 
 
 
-[section:overload2 buffered_read_stream::in_avail (2 of 2 overloads)]
+[section:resolver ip::udp::resolver]
 
-Determine the amount of data that may be read without blocking.
+The UDP resolver type.
 
- std::size_t in_avail(
- boost::system::error_code & ec);
+ typedef basic_resolver< udp > resolver;
 
 
+[heading Types]
+[table
+ [[Name][Description]]
 
-[endsect]
+ [
 
+ [[link boost_asio.reference.ip__basic_resolver.endpoint_type [*endpoint_type]]]
+ [The endpoint type. ]
+
+ ]
 
-[endsect]
+ [
 
+ [[link boost_asio.reference.ip__basic_resolver.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
 
-[section:io_service buffered_read_stream::io_service]
+ [
 
-(Deprecated: use get_io_service().) Get the io_service associated with the object.
+ [[link boost_asio.reference.ip__basic_resolver.iterator [*iterator]]]
+ [The iterator type. ]
+
+ ]
 
- boost::asio::io_service & io_service();
+ [
 
+ [[link boost_asio.reference.ip__basic_resolver.protocol_type [*protocol_type]]]
+ [The protocol type. ]
+
+ ]
 
+ [
 
-[endsect]
+ [[link boost_asio.reference.ip__basic_resolver.query [*query]]]
+ [The query type. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.ip__basic_resolver.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
+
+ ]
 
-[section:lowest_layer buffered_read_stream::lowest_layer]
+]
 
-Get a reference to the lowest layer.
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
- lowest_layer_type & lowest_layer();
+ [
+ [[link boost_asio.reference.ip__basic_resolver.async_resolve [*async_resolve]]]
+ [Asynchronously resolve a query to a list of entries. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.basic_resolver [*basic_resolver]]]
+ [Constructor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.cancel [*cancel]]]
+ [Cancel any asynchronous operations that are waiting on the resolver. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver.resolve [*resolve]]]
+ [Resolve a query to a list of entries. ]
+ ]
+
+]
 
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.ip__basic_resolver.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
 
-[endsect]
+ [
+ [[link boost_asio.reference.ip__basic_resolver.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
 
+]
 
+The basic_resolver class template provides the ability to resolve a query to a list of endpoints.
 
-[section:lowest_layer_type buffered_read_stream::lowest_layer_type]
 
-The type of the lowest layer.
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
- typedef next_layer_type::lowest_layer_type lowest_layer_type;
+[*Shared] [*objects:] Unsafe.
 
 
 
@@ -20050,102 +39563,150 @@
 
 
 
-[section:next_layer buffered_read_stream::next_layer]
+[section:resolver_iterator ip::udp::resolver_iterator]
 
-Get a reference to the next layer.
+The type of a resolver iterator.
 
- next_layer_type & next_layer();
+ typedef basic_resolver_iterator< udp > resolver_iterator;
 
 
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
-[endsect]
+ [
+ [[link boost_asio.reference.ip__basic_resolver_iterator.basic_resolver_iterator [*basic_resolver_iterator]]]
+ [Default constructor creates an end iterator. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_iterator.create [*create]]]
+ [Create an iterator from an addrinfo list returned by getaddrinfo. ]
+ ]
+
+]
 
+The
+[link boost_asio.reference.ip__basic_resolver_iterator ip::basic_resolver_iterator] class template is used to define iterators over the results returned by a resolver.
 
+The iterator's value\_type, obtained when the iterator is dereferenced, is:
 
-[section:next_layer_type buffered_read_stream::next_layer_type]
+ const basic_resolver_entry<InternetProtocol>
 
-The type of the next layer.
 
- typedef boost::remove_reference< Stream >::type next_layer_type;
 
 
 
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
-[endsect]
+[*Shared] [*objects:] Unsafe.
 
 
-[section:peek buffered_read_stream::peek]
 
-Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure.
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link boost_asio.reference.buffered_read_stream.peek.overload1 peek]``(
- const MutableBufferSequence & buffers);
+[endsect]
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link boost_asio.reference.buffered_read_stream.peek.overload2 peek]``(
- const MutableBufferSequence & buffers,
- boost::system::error_code & ec);
 
 
-[section:overload1 buffered_read_stream::peek (1 of 2 overloads)]
+[section:resolver_query ip::udp::resolver_query]
 
-Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure.
+The type of a resolver query.
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t peek(
- const MutableBufferSequence & buffers);
+ typedef basic_resolver_query< udp > resolver_query;
 
 
+[heading Types]
+[table
+ [[Name][Description]]
 
-[endsect]
+ [
 
+ [[link boost_asio.reference.ip__basic_resolver_query.protocol_type [*protocol_type]]]
+ [The protocol type associated with the endpoint query. ]
+
+ ]
 
+]
 
-[section:overload2 buffered_read_stream::peek (2 of 2 overloads)]
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
-Peek at the incoming data on the stream. Returns the number of bytes read, or 0 if an error occurred.
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.basic_resolver_query [*basic_resolver_query]]]
+ [Construct with specified service name for any protocol. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.hints [*hints]]]
+ [Get the hints associated with the query. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.host_name [*host_name]]]
+ [Get the host name associated with the query. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.service_name [*service_name]]]
+ [Get the service name associated with the query. ]
+ ]
+
+]
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t peek(
- const MutableBufferSequence & buffers,
- boost::system::error_code & ec);
+[heading Data Members]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.address_configured [*address_configured]]]
+ [Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system. ]
+ ]
 
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.all_matching [*all_matching]]]
+ [If used with v4_mapped, return all matching IPv6 and IPv4 addresses. ]
+ ]
 
-[endsect]
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.canonical_name [*canonical_name]]]
+ [Determine the canonical name of the host specified in the query. ]
+ ]
 
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.numeric_host [*numeric_host]]]
+ [Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. ]
+ ]
 
-[endsect]
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.numeric_service [*numeric_service]]]
+ [Service name should be treated as a numeric string defining a port number and no name resolution should be attempted. ]
+ ]
 
-[section:read_some buffered_read_stream::read_some]
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.passive [*passive]]]
+ [Indicate that returned endpoint is intended for use as a locally bound socket endpoint. ]
+ ]
 
-Read some data from the stream. Returns the number of bytes read. Throws an exception on failure.
+ [
+ [[link boost_asio.reference.ip__basic_resolver_query.v4_mapped [*v4_mapped]]]
+ [If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. ]
+ ]
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link boost_asio.reference.buffered_read_stream.read_some.overload1 read_some]``(
- const MutableBufferSequence & buffers);
+]
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link boost_asio.reference.buffered_read_stream.read_some.overload2 read_some]``(
- const MutableBufferSequence & buffers,
- boost::system::error_code & ec);
+The
+[link boost_asio.reference.ip__basic_resolver_query ip::basic_resolver_query] class template describes a query that can be passed to a resolver.
 
 
-[section:overload1 buffered_read_stream::read_some (1 of 2 overloads)]
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
-Read some data from the stream. Returns the number of bytes read. Throws an exception on failure.
+[*Shared] [*objects:] Unsafe.
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers);
 
 
 
@@ -20153,99 +39714,161 @@
 
 
 
-[section:overload2 buffered_read_stream::read_some (2 of 2 overloads)]
+[section:socket ip::udp::socket]
 
-Read some data from the stream. Returns the number of bytes read or 0 if an error occurred.
+The UDP socket type.
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers,
- boost::system::error_code & ec);
+ typedef basic_datagram_socket< udp > socket;
 
 
+[heading Types]
+[table
+ [[Name][Description]]
 
-[endsect]
+ [
 
+ [[link boost_asio.reference.basic_datagram_socket.broadcast [*broadcast]]]
+ [Socket option to permit sending of broadcast messages. ]
+
+ ]
 
-[endsect]
+ [
 
-[section:write_some buffered_read_stream::write_some]
+ [[link boost_asio.reference.basic_datagram_socket.bytes_readable [*bytes_readable]]]
+ [IO control command to get the amount of data that can be read without blocking. ]
+
+ ]
 
-Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure.
+ [
 
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link boost_asio.reference.buffered_read_stream.write_some.overload1 write_some]``(
- const ConstBufferSequence & buffers);
+ [[link boost_asio.reference.basic_datagram_socket.debug [*debug]]]
+ [Socket option to enable socket-level debugging. ]
+
+ ]
 
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link boost_asio.reference.buffered_read_stream.write_some.overload2 write_some]``(
- const ConstBufferSequence & buffers,
- boost::system::error_code & ec);
+ [
 
+ [[link boost_asio.reference.basic_datagram_socket.do_not_route [*do_not_route]]]
+ [Socket option to prevent routing, use local interfaces only. ]
+
+ ]
 
-[section:overload1 buffered_read_stream::write_some (1 of 2 overloads)]
+ [
 
-Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure.
+ [[link boost_asio.reference.basic_datagram_socket.enable_connection_aborted [*enable_connection_aborted]]]
+ [Socket option to report aborted connections on accept. ]
+
+ ]
 
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers);
+ [
 
+ [[link boost_asio.reference.basic_datagram_socket.endpoint_type [*endpoint_type]]]
+ [The endpoint type. ]
+
+ ]
 
+ [
 
-[endsect]
+ [[link boost_asio.reference.basic_datagram_socket.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.basic_datagram_socket.keep_alive [*keep_alive]]]
+ [Socket option to send keep-alives. ]
+
+ ]
 
-[section:overload2 buffered_read_stream::write_some (2 of 2 overloads)]
+ [
 
-Write the given data to the stream. Returns the number of bytes written, or 0 if an error occurred.
+ [[link boost_asio.reference.basic_datagram_socket.linger [*linger]]]
+ [Socket option to specify whether the socket lingers on close if unsent data is present. ]
+
+ ]
 
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers,
- boost::system::error_code & ec);
+ [
 
+ [[link boost_asio.reference.basic_datagram_socket.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_socket is always the lowest layer. ]
+
+ ]
 
+ [
 
-[endsect]
+ [[link boost_asio.reference.basic_datagram_socket.message_flags [*message_flags]]]
+ [Bitmask type for flags that can be passed to send and receive operations. ]
+
+ ]
 
+ [
 
-[endsect]
+ [[link boost_asio.reference.basic_datagram_socket.native_type [*native_type]]]
+ [The native representation of a socket. ]
+
+ ]
 
+ [
 
-[endsect]
+ [[link boost_asio.reference.basic_datagram_socket.non_blocking_io [*non_blocking_io]]]
+ [IO control command to set the blocking mode of the socket. ]
+
+ ]
 
-[section:buffered_stream buffered_stream]
+ [
 
-Adds buffering to the read- and write-related operations of a stream.
+ [[link boost_asio.reference.basic_datagram_socket.protocol_type [*protocol_type]]]
+ [The protocol type. ]
+
+ ]
 
- template<
- typename Stream>
- class buffered_stream :
- noncopyable
+ [
 
+ [[link boost_asio.reference.basic_datagram_socket.receive_buffer_size [*receive_buffer_size]]]
+ [Socket option for the receive buffer size of a socket. ]
+
+ ]
 
-[heading Types]
-[table
- [[Name][Description]]
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.receive_low_watermark [*receive_low_watermark]]]
+ [Socket option for the receive low watermark. ]
+
+ ]
 
   [
 
- [[link boost_asio.reference.buffered_stream.lowest_layer_type [*lowest_layer_type]]]
- [The type of the lowest layer. ]
+ [[link boost_asio.reference.basic_datagram_socket.reuse_address [*reuse_address]]]
+ [Socket option to allow the socket to be bound to an address that is already in use. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.buffered_stream.next_layer_type [*next_layer_type]]]
- [The type of the next layer. ]
+ [[link boost_asio.reference.basic_datagram_socket.send_buffer_size [*send_buffer_size]]]
+ [Socket option for the send buffer size of a socket. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.send_low_watermark [*send_low_watermark]]]
+ [Socket option for the send low watermark. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.shutdown_type [*shutdown_type]]]
+ [Different ways a socket may be shutdown. ]
   
   ]
 
@@ -20256,262 +39879,203 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.buffered_stream.async_fill [*async_fill]]]
- [Start an asynchronous fill. ]
+ [[link boost_asio.reference.basic_datagram_socket.assign [*assign]]]
+ [Assign an existing native socket to the socket. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_stream.async_flush [*async_flush]]]
- [Start an asynchronous flush. ]
+ [[link boost_asio.reference.basic_datagram_socket.async_connect [*async_connect]]]
+ [Start an asynchronous connect. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_stream.async_read_some [*async_read_some]]]
- [Start an asynchronous read. The buffer into which the data will be read must be valid for the lifetime of the asynchronous operation. ]
+ [[link boost_asio.reference.basic_datagram_socket.async_receive [*async_receive]]]
+ [Start an asynchronous receive on a connected socket. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_stream.async_write_some [*async_write_some]]]
- [Start an asynchronous write. The data being written must be valid for the lifetime of the asynchronous operation. ]
+ [[link boost_asio.reference.basic_datagram_socket.async_receive_from [*async_receive_from]]]
+ [Start an asynchronous receive. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_stream.buffered_stream [*buffered_stream]]]
- [Construct, passing the specified argument to initialise the next layer. ]
+ [[link boost_asio.reference.basic_datagram_socket.async_send [*async_send]]]
+ [Start an asynchronous send on a connected socket. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_stream.close [*close]]]
- [Close the stream. ]
+ [[link boost_asio.reference.basic_datagram_socket.async_send_to [*async_send_to]]]
+ [Start an asynchronous send. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_stream.fill [*fill]]]
- [Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation. Throws an exception on failure. ]
+ [[link boost_asio.reference.basic_datagram_socket.at_mark [*at_mark]]]
+ [Determine whether the socket is at the out-of-band data mark. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_datagram_socket.available [*available]]]
+ [Determine the number of bytes available for reading. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_datagram_socket.basic_datagram_socket [*basic_datagram_socket]]]
+ [Construct a basic_datagram_socket without opening it. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_datagram_socket.bind [*bind]]]
+ [Bind the socket to the given local endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_datagram_socket.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_datagram_socket.close [*close]]]
+ [Close the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_datagram_socket.connect [*connect]]]
+ [Connect the socket to the specified endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_datagram_socket.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_datagram_socket.get_option [*get_option]]]
+ [Get an option from the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_datagram_socket.io_control [*io_control]]]
+ [Perform an IO control command on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_datagram_socket.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_datagram_socket.is_open [*is_open]]]
+ [Determine whether the socket is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_datagram_socket.local_endpoint [*local_endpoint]]]
+ [Get the local endpoint of the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_datagram_socket.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_stream.flush [*flush]]]
- [Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation. Throws an exception on failure. ]
+ [[link boost_asio.reference.basic_datagram_socket.native [*native]]]
+ [Get the native socket representation. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_stream.get_io_service [*get_io_service]]]
- [Get the io_service associated with the object. ]
+ [[link boost_asio.reference.basic_datagram_socket.open [*open]]]
+ [Open the socket using the specified protocol. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_stream.in_avail [*in_avail]]]
- [Determine the amount of data that may be read without blocking. ]
+ [[link boost_asio.reference.basic_datagram_socket.receive [*receive]]]
+ [Receive some data on a connected socket. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_stream.io_service [*io_service]]]
- [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ [[link boost_asio.reference.basic_datagram_socket.receive_from [*receive_from]]]
+ [Receive a datagram with the endpoint of the sender. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_stream.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer. ]
+ [[link boost_asio.reference.basic_datagram_socket.remote_endpoint [*remote_endpoint]]]
+ [Get the remote endpoint of the socket. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_stream.next_layer [*next_layer]]]
- [Get a reference to the next layer. ]
+ [[link boost_asio.reference.basic_datagram_socket.send [*send]]]
+ [Send some data on a connected socket. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_stream.peek [*peek]]]
- [Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure. ]
+ [[link boost_asio.reference.basic_datagram_socket.send_to [*send_to]]]
+ [Send a datagram to the specified endpoint. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_stream.read_some [*read_some]]]
- [Read some data from the stream. Returns the number of bytes read. Throws an exception on failure. ]
+ [[link boost_asio.reference.basic_datagram_socket.set_option [*set_option]]]
+ [Set an option on the socket. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_stream.write_some [*write_some]]]
- [Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure. ]
+ [[link boost_asio.reference.basic_datagram_socket.shutdown [*shutdown]]]
+ [Disable sends or receives on the socket. ]
   ]
   
 ]
 
-The buffered_stream class template can be used to add buffering to the synchronous and asynchronous read and write operations of a stream.
-
-
-[heading Thread Safety]
-
-[*Distinct] [*objects:] Safe.
-
-[*Shared] [*objects:] Unsafe.
-
-
-
-[section:async_fill buffered_stream::async_fill]
-
-Start an asynchronous fill.
-
- template<
- typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
- void async_fill(
- ReadHandler handler);
-
-
-
-[endsect]
-
-
-
-[section:async_flush buffered_stream::async_flush]
-
-Start an asynchronous flush.
-
- template<
- typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
- void async_flush(
- WriteHandler handler);
-
-
-
-[endsect]
-
-
-
-[section:async_read_some buffered_stream::async_read_some]
-
-Start an asynchronous read. The buffer into which the data will be read must be valid for the lifetime of the asynchronous operation.
-
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
- void async_read_some(
- const MutableBufferSequence & buffers,
- ReadHandler handler);
-
-
-
-[endsect]
-
-
-
-[section:async_write_some buffered_stream::async_write_some]
-
-Start an asynchronous write. The data being written must be valid for the lifetime of the asynchronous operation.
-
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
- void async_write_some(
- const ConstBufferSequence & buffers,
- WriteHandler handler);
-
-
-
-[endsect]
-
-
-[section:buffered_stream buffered_stream::buffered_stream]
-
-Construct, passing the specified argument to initialise the next layer.
-
- template<
- typename Arg>
- ``[link boost_asio.reference.buffered_stream.buffered_stream.overload1 buffered_stream]``(
- Arg & a);
-
- template<
- typename Arg>
- ``[link boost_asio.reference.buffered_stream.buffered_stream.overload2 buffered_stream]``(
- Arg & a,
- std::size_t read_buffer_size,
- std::size_t write_buffer_size);
-
-
-[section:overload1 buffered_stream::buffered_stream (1 of 2 overloads)]
-
-Construct, passing the specified argument to initialise the next layer.
-
- template<
- typename Arg>
- buffered_stream(
- Arg & a);
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_stream::buffered_stream (2 of 2 overloads)]
-
-Construct, passing the specified argument to initialise the next layer.
-
- template<
- typename Arg>
- buffered_stream(
- Arg & a,
- std::size_t read_buffer_size,
- std::size_t write_buffer_size);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:close buffered_stream::close]
-
-Close the stream.
-
- void ``[link boost_asio.reference.buffered_stream.close.overload1 close]``();
-
- boost::system::error_code ``[link boost_asio.reference.buffered_stream.close.overload2 close]``(
- boost::system::error_code & ec);
-
-
-[section:overload1 buffered_stream::close (1 of 2 overloads)]
-
-Close the stream.
-
- void close();
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_stream::close (2 of 2 overloads)]
-
-Close the stream.
+[heading Data Members]
+[table
+ [[Name][Description]]
 
- boost::system::error_code close(
- boost::system::error_code & ec);
+ [
+ [[link boost_asio.reference.basic_datagram_socket.max_connections [*max_connections]]]
+ [The maximum length of the queue of pending incoming connections. ]
+ ]
 
+ [
+ [[link boost_asio.reference.basic_datagram_socket.message_do_not_route [*message_do_not_route]]]
+ [Specify that the data should not be subject to routing. ]
+ ]
 
+ [
+ [[link boost_asio.reference.basic_datagram_socket.message_out_of_band [*message_out_of_band]]]
+ [Process out-of-band data. ]
+ ]
 
-[endsect]
+ [
+ [[link boost_asio.reference.basic_datagram_socket.message_peek [*message_peek]]]
+ [Peek at incoming data without removing it from the input queue. ]
+ ]
 
+]
 
-[endsect]
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
 
-[section:fill buffered_stream::fill]
+ [
+ [[link boost_asio.reference.basic_datagram_socket.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
 
-Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation. Throws an exception on failure.
+ [
+ [[link boost_asio.reference.basic_datagram_socket.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
 
- std::size_t ``[link boost_asio.reference.buffered_stream.fill.overload1 fill]``();
+]
 
- std::size_t ``[link boost_asio.reference.buffered_stream.fill.overload2 fill]``(
- boost::system::error_code & ec);
+The basic_datagram_socket class template provides asynchronous and blocking datagram-oriented socket functionality.
 
 
-[section:overload1 buffered_stream::fill (1 of 2 overloads)]
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
-Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation. Throws an exception on failure.
+[*Shared] [*objects:] Unsafe.
 
- std::size_t fill();
 
 
 
@@ -20519,35 +40083,23 @@
 
 
 
-[section:overload2 buffered_stream::fill (2 of 2 overloads)]
-
-Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation, or 0 if an error occurred.
-
- std::size_t fill(
- boost::system::error_code & ec);
+[section:type ip::udp::type]
 
+Obtain an identifier for the type of the protocol.
 
+ int type() const;
 
-[endsect]
 
 
 [endsect]
 
-[section:flush buffered_stream::flush]
-
-Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation. Throws an exception on failure.
-
- std::size_t ``[link boost_asio.reference.buffered_stream.flush.overload1 flush]``();
-
- std::size_t ``[link boost_asio.reference.buffered_stream.flush.overload2 flush]``(
- boost::system::error_code & ec);
 
 
-[section:overload1 buffered_stream::flush (1 of 2 overloads)]
+[section:v4 ip::udp::v4]
 
-Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation. Throws an exception on failure.
+Construct to represent the IPv4 UDP protocol.
 
- std::size_t flush();
+ static udp v4();
 
 
 
@@ -20555,98 +40107,93 @@
 
 
 
-[section:overload2 buffered_stream::flush (2 of 2 overloads)]
-
-Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation, or 0 if an error occurred.
-
- std::size_t flush(
- boost::system::error_code & ec);
+[section:v6 ip::udp::v6]
 
+Construct to represent the IPv6 UDP protocol.
 
+ static udp v6();
 
-[endsect]
 
 
 [endsect]
 
 
-[section:get_io_service buffered_stream::get_io_service]
-
-Get the io_service associated with the object.
-
- boost::asio::io_service & get_io_service();
-
-
 
 [endsect]
 
 
-[section:in_avail buffered_stream::in_avail]
-
-Determine the amount of data that may be read without blocking.
+[section:ip__unicast__hops ip::unicast::hops]
 
- std::size_t ``[link boost_asio.reference.buffered_stream.in_avail.overload1 in_avail]``();
+Socket option for time-to-live associated with outgoing unicast packets.
 
- std::size_t ``[link boost_asio.reference.buffered_stream.in_avail.overload2 in_avail]``(
- boost::system::error_code & ec);
+ typedef implementation_defined hops;
 
 
-[section:overload1 buffered_stream::in_avail (1 of 2 overloads)]
 
-Determine the amount of data that may be read without blocking.
+Implements the IPPROTO\_IP/IP\_UNICAST\_TTL socket option.
 
- std::size_t in_avail();
 
+[heading Examples]
+
+Setting the option:
 
+ boost::asio::ip::udp::socket socket(io_service);
+ ...
+ boost::asio::ip::unicast::hops option(4);
+ socket.set_option(option);
 
-[endsect]
 
 
 
-[section:overload2 buffered_stream::in_avail (2 of 2 overloads)]
+Getting the current option value:
 
-Determine the amount of data that may be read without blocking.
+ boost::asio::ip::udp::socket socket(io_service);
+ ...
+ boost::asio::ip::unicast::hops option;
+ socket.get_option(option);
+ int ttl = option.value();
 
- std::size_t in_avail(
- boost::system::error_code & ec);
 
 
 
-[endsect]
 
 
 [endsect]
 
 
-[section:io_service buffered_stream::io_service]
-
-(Deprecated: use get_io_service().) Get the io_service associated with the object.
-
- boost::asio::io_service & io_service();
 
+[section:ip__v6_only ip::v6_only]
 
+Socket option for determining whether an IPv6 socket supports IPv6 communication only.
 
-[endsect]
+ typedef implementation_defined v6_only;
 
 
 
-[section:lowest_layer buffered_stream::lowest_layer]
+Implements the IPPROTO\_IPV6/IP\_V6ONLY socket option.
 
-Get a reference to the lowest layer.
 
- lowest_layer_type & lowest_layer();
+[heading Examples]
+
+Setting the option:
 
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::ip::v6_only option(true);
+ socket.set_option(option);
 
 
-[endsect]
 
 
+Getting the current option value:
 
-[section:lowest_layer_type buffered_stream::lowest_layer_type]
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::ip::v6_only option;
+ socket.get_option(option);
+ bool v6_only = option.value();
 
-The type of the lowest layer.
 
- typedef next_layer_type::lowest_layer_type lowest_layer_type;
 
 
 
@@ -20654,103 +40201,67 @@
 [endsect]
 
 
+[section:is_match_condition is_match_condition]
 
-[section:next_layer buffered_stream::next_layer]
-
-Get a reference to the next layer.
-
- next_layer_type & next_layer();
+Type trait used to determine whether a type can be used as a match condition function with read_until and async_read_until.
 
+ template<
+ typename T>
+ struct is_match_condition
 
 
-[endsect]
+[heading Data Members]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.is_match_condition.value [*value]]]
+ [The value member is true if the type may be used as a match condition. ]
+ ]
 
+]
 
-[section:next_layer_type buffered_stream::next_layer_type]
 
-The type of the next layer.
+[section:value is_match_condition::value]
 
- typedef boost::remove_reference< Stream >::type next_layer_type;
+The value member is true if the type may be used as a match condition.
 
+ static const bool value;
 
 
 
 [endsect]
 
 
-[section:peek buffered_stream::peek]
-
-Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure.
-
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link boost_asio.reference.buffered_stream.peek.overload1 peek]``(
- const MutableBufferSequence & buffers);
-
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link boost_asio.reference.buffered_stream.peek.overload2 peek]``(
- const MutableBufferSequence & buffers,
- boost::system::error_code & ec);
-
-
-[section:overload1 buffered_stream::peek (1 of 2 overloads)]
-
-Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure.
-
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t peek(
- const MutableBufferSequence & buffers);
-
-
 
 [endsect]
 
+[section:is_read_buffered is_read_buffered]
 
-
-[section:overload2 buffered_stream::peek (2 of 2 overloads)]
-
-Peek at the incoming data on the stream. Returns the number of bytes read, or 0 if an error occurred.
+The is_read_buffered class is a traits class that may be used to determine whether a stream type supports buffering of read data.
 
   template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t peek(
- const MutableBufferSequence & buffers,
- boost::system::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
+ typename Stream>
+ class is_read_buffered
 
-[section:read_some buffered_stream::read_some]
 
-Read some data from the stream. Returns the number of bytes read. Throws an exception on failure.
+[heading Data Members]
+[table
+ [[Name][Description]]
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link boost_asio.reference.buffered_stream.read_some.overload1 read_some]``(
- const MutableBufferSequence & buffers);
+ [
+ [[link boost_asio.reference.is_read_buffered.value [*value]]]
+ [The value member is true only if the Stream type supports buffering of read data. ]
+ ]
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link boost_asio.reference.buffered_stream.read_some.overload2 read_some]``(
- const MutableBufferSequence & buffers,
- boost::system::error_code & ec);
+]
 
 
-[section:overload1 buffered_stream::read_some (1 of 2 overloads)]
+[section:value is_read_buffered::value]
 
-Read some data from the stream. Returns the number of bytes read. Throws an exception on failure.
+The value member is true only if the Stream type supports buffering of read data.
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers);
+ static const bool value;
 
 
 
@@ -20758,82 +40269,50 @@
 
 
 
-[section:overload2 buffered_stream::read_some (2 of 2 overloads)]
-
-Read some data from the stream. Returns the number of bytes read or 0 if an error occurred.
-
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers,
- boost::system::error_code & ec);
-
-
-
-[endsect]
-
-
 [endsect]
 
-[section:write_some buffered_stream::write_some]
-
-Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure.
-
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link boost_asio.reference.buffered_stream.write_some.overload1 write_some]``(
- const ConstBufferSequence & buffers);
-
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link boost_asio.reference.buffered_stream.write_some.overload2 write_some]``(
- const ConstBufferSequence & buffers,
- boost::system::error_code & ec);
-
-
-[section:overload1 buffered_stream::write_some (1 of 2 overloads)]
+[section:is_write_buffered is_write_buffered]
 
-Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure.
+The is_write_buffered class is a traits class that may be used to determine whether a stream type supports buffering of written data.
 
   template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers);
+ typename Stream>
+ class is_write_buffered
 
 
+[heading Data Members]
+[table
+ [[Name][Description]]
 
-[endsect]
+ [
+ [[link boost_asio.reference.is_write_buffered.value [*value]]]
+ [The value member is true only if the Stream type supports buffering of written data. ]
+ ]
 
+]
 
 
-[section:overload2 buffered_stream::write_some (2 of 2 overloads)]
+[section:value is_write_buffered::value]
 
-Write the given data to the stream. Returns the number of bytes written, or 0 if an error occurred.
+The value member is true only if the Stream type supports buffering of written data.
 
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers,
- boost::system::error_code & ec);
+ static const bool value;
 
 
 
 [endsect]
 
 
-[endsect]
-
 
 [endsect]
 
-[section:buffered_write_stream buffered_write_stream]
+[section:local__basic_endpoint local::basic_endpoint]
 
-Adds buffering to the write-related operations of a stream.
+Describes an endpoint for a UNIX socket.
 
   template<
- typename Stream>
- class buffered_write_stream :
- noncopyable
+ typename ``[link boost_asio.reference.Protocol Protocol]``>
+ class basic_endpoint
 
 
 [heading Types]
@@ -20842,15 +40321,15 @@
 
   [
 
- [[link boost_asio.reference.buffered_write_stream.lowest_layer_type [*lowest_layer_type]]]
- [The type of the lowest layer. ]
+ [[link boost_asio.reference.local__basic_endpoint.data_type [*data_type]]]
+ [The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.buffered_write_stream.next_layer_type [*next_layer_type]]]
- [The type of the next layer. ]
+ [[link boost_asio.reference.local__basic_endpoint.protocol_type [*protocol_type]]]
+ [The protocol type associated with the endpoint. ]
   
   ]
 
@@ -20861,89 +40340,81 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.buffered_write_stream.async_flush [*async_flush]]]
- [Start an asynchronous flush. ]
- ]
-
- [
- [[link boost_asio.reference.buffered_write_stream.async_read_some [*async_read_some]]]
- [Start an asynchronous read. The buffer into which the data will be read must be valid for the lifetime of the asynchronous operation. ]
- ]
-
- [
- [[link boost_asio.reference.buffered_write_stream.async_write_some [*async_write_some]]]
- [Start an asynchronous write. The data being written must be valid for the lifetime of the asynchronous operation. ]
- ]
-
- [
- [[link boost_asio.reference.buffered_write_stream.buffered_write_stream [*buffered_write_stream]]]
- [Construct, passing the specified argument to initialise the next layer. ]
+ [[link boost_asio.reference.local__basic_endpoint.basic_endpoint [*basic_endpoint]]]
+ [Default constructor. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_write_stream.close [*close]]]
- [Close the stream. ]
+ [[link boost_asio.reference.local__basic_endpoint.capacity [*capacity]]]
+ [Get the capacity of the endpoint in the native type. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_write_stream.flush [*flush]]]
- [Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation. Throws an exception on failure. ]
+ [[link boost_asio.reference.local__basic_endpoint.data [*data]]]
+ [Get the underlying endpoint in the native type. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_write_stream.get_io_service [*get_io_service]]]
- [Get the io_service associated with the object. ]
+ [[link boost_asio.reference.local__basic_endpoint.operator_eq_ [*operator=]]]
+ [Assign from another endpoint. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_write_stream.in_avail [*in_avail]]]
- [Determine the amount of data that may be read without blocking. ]
+ [[link boost_asio.reference.local__basic_endpoint.path [*path]]]
+ [Get the path associated with the endpoint. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_write_stream.io_service [*io_service]]]
- [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ [[link boost_asio.reference.local__basic_endpoint.protocol [*protocol]]]
+ [The protocol associated with the endpoint. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_write_stream.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer. ]
+ [[link boost_asio.reference.local__basic_endpoint.resize [*resize]]]
+ [Set the underlying size of the endpoint in the native type. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_write_stream.next_layer [*next_layer]]]
- [Get a reference to the next layer. ]
+ [[link boost_asio.reference.local__basic_endpoint.size [*size]]]
+ [Get the underlying size of the endpoint in the native type. ]
   ]
   
+]
+
+[heading Friends]
+[table
+ [[Name][Description]]
+
   [
- [[link boost_asio.reference.buffered_write_stream.peek [*peek]]]
- [Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure. ]
+ [[link boost_asio.reference.local__basic_endpoint.operator_not__eq_ [*operator!=]]]
+ [Compare two endpoints for inequality. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_write_stream.read_some [*read_some]]]
- [Read some data from the stream. Returns the number of bytes read. Throws an exception on failure. ]
+ [[link boost_asio.reference.local__basic_endpoint.operator_lt_ [*operator<]]]
+ [Compare endpoints for ordering. ]
   ]
   
   [
- [[link boost_asio.reference.buffered_write_stream.write_some [*write_some]]]
- [Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure. ]
+ [[link boost_asio.reference.local__basic_endpoint.operator_eq__eq_ [*operator==]]]
+ [Compare two endpoints for equality. ]
   ]
   
 ]
 
-[heading Data Members]
+[heading Related Functions]
 [table
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.buffered_write_stream.default_buffer_size [*default_buffer_size]]]
- [The default buffer size. ]
+ [[link boost_asio.reference.local__basic_endpoint.operator_lt__lt_ [*operator<<]]]
+ [Output an endpoint as a string. ]
   ]
-
+
 ]
 
-The buffered_write_stream class template can be used to add buffering to the synchronous and asynchronous write operations of a stream.
+The
+[link boost_asio.reference.local__basic_endpoint local::basic_endpoint] class template describes an endpoint that may be associated with a particular UNIX socket.
 
 
 [heading Thread Safety]
@@ -20953,32 +40424,27 @@
 [*Shared] [*objects:] Unsafe.
 
 
+[section:basic_endpoint local::basic_endpoint::basic_endpoint]
 
-[section:async_flush buffered_write_stream::async_flush]
-
-Start an asynchronous flush.
-
- template<
- typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
- void async_flush(
- WriteHandler handler);
+Default constructor.
 
+ ``[link boost_asio.reference.local__basic_endpoint.basic_endpoint.overload1 basic_endpoint]``();
 
+ ``[link boost_asio.reference.local__basic_endpoint.basic_endpoint.overload2 basic_endpoint]``(
+ const char * path);
 
-[endsect]
+ ``[link boost_asio.reference.local__basic_endpoint.basic_endpoint.overload3 basic_endpoint]``(
+ const std::string & path);
 
+ ``[link boost_asio.reference.local__basic_endpoint.basic_endpoint.overload4 basic_endpoint]``(
+ const basic_endpoint & other);
 
 
-[section:async_read_some buffered_write_stream::async_read_some]
+[section:overload1 local::basic_endpoint::basic_endpoint (1 of 4 overloads)]
 
-Start an asynchronous read. The buffer into which the data will be read must be valid for the lifetime of the asynchronous operation.
+Default constructor.
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
- void async_read_some(
- const MutableBufferSequence & buffers,
- ReadHandler handler);
+ basic_endpoint();
 
 
 
@@ -20986,46 +40452,25 @@
 
 
 
-[section:async_write_some buffered_write_stream::async_write_some]
+[section:overload2 local::basic_endpoint::basic_endpoint (2 of 4 overloads)]
 
-Start an asynchronous write. The data being written must be valid for the lifetime of the asynchronous operation.
+Construct an endpoint using the specified path name.
 
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
- void async_write_some(
- const ConstBufferSequence & buffers,
- WriteHandler handler);
+ basic_endpoint(
+ const char * path);
 
 
 
 [endsect]
 
 
-[section:buffered_write_stream buffered_write_stream::buffered_write_stream]
-
-Construct, passing the specified argument to initialise the next layer.
-
- template<
- typename Arg>
- ``[link boost_asio.reference.buffered_write_stream.buffered_write_stream.overload1 buffered_write_stream]``(
- Arg & a);
-
- template<
- typename Arg>
- ``[link boost_asio.reference.buffered_write_stream.buffered_write_stream.overload2 buffered_write_stream]``(
- Arg & a,
- std::size_t buffer_size);
-
 
-[section:overload1 buffered_write_stream::buffered_write_stream (1 of 2 overloads)]
+[section:overload3 local::basic_endpoint::basic_endpoint (3 of 4 overloads)]
 
-Construct, passing the specified argument to initialise the next layer.
+Construct an endpoint using the specified path name.
 
- template<
- typename Arg>
- buffered_write_stream(
- Arg & a);
+ basic_endpoint(
+ const std::string & path);
 
 
 
@@ -21033,15 +40478,12 @@
 
 
 
-[section:overload2 buffered_write_stream::buffered_write_stream (2 of 2 overloads)]
+[section:overload4 local::basic_endpoint::basic_endpoint (4 of 4 overloads)]
 
-Construct, passing the specified argument to initialise the next layer.
+Copy constructor.
 
- template<
- typename Arg>
- buffered_write_stream(
- Arg & a,
- std::size_t buffer_size);
+ basic_endpoint(
+ const basic_endpoint & other);
 
 
 
@@ -21050,69 +40492,59 @@
 
 [endsect]
 
-[section:close buffered_write_stream::close]
 
-Close the stream.
+[section:capacity local::basic_endpoint::capacity]
 
- void ``[link boost_asio.reference.buffered_write_stream.close.overload1 close]``();
+Get the capacity of the endpoint in the native type.
 
- boost::system::error_code ``[link boost_asio.reference.buffered_write_stream.close.overload2 close]``(
- boost::system::error_code & ec);
+ std::size_t capacity() const;
 
 
-[section:overload1 buffered_write_stream::close (1 of 2 overloads)]
 
-Close the stream.
+[endsect]
 
- void close();
 
+[section:data local::basic_endpoint::data]
 
+Get the underlying endpoint in the native type.
 
-[endsect]
+ data_type * ``[link boost_asio.reference.local__basic_endpoint.data.overload1 data]``();
 
+ const data_type * ``[link boost_asio.reference.local__basic_endpoint.data.overload2 data]``() const;
 
 
-[section:overload2 buffered_write_stream::close (2 of 2 overloads)]
+[section:overload1 local::basic_endpoint::data (1 of 2 overloads)]
 
-Close the stream.
+Get the underlying endpoint in the native type.
 
- boost::system::error_code close(
- boost::system::error_code & ec);
+ data_type * data();
 
 
 
 [endsect]
 
 
-[endsect]
-
 
-[section:default_buffer_size buffered_write_stream::default_buffer_size]
+[section:overload2 local::basic_endpoint::data (2 of 2 overloads)]
 
-The default buffer size.
+Get the underlying endpoint in the native type.
 
- static const std::size_t default_buffer_size = implementation_defined;
+ const data_type * data() const;
 
 
 
 [endsect]
 
 
-[section:flush buffered_write_stream::flush]
-
-Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation. Throws an exception on failure.
-
- std::size_t ``[link boost_asio.reference.buffered_write_stream.flush.overload1 flush]``();
+[endsect]
 
- std::size_t ``[link boost_asio.reference.buffered_write_stream.flush.overload2 flush]``(
- boost::system::error_code & ec);
 
+[section:data_type local::basic_endpoint::data_type]
 
-[section:overload1 buffered_write_stream::flush (1 of 2 overloads)]
+The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer.
 
-Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation. Throws an exception on failure.
+ typedef implementation_defined data_type;
 
- std::size_t flush();
 
 
 
@@ -21120,74 +40552,73 @@
 
 
 
-[section:overload2 buffered_write_stream::flush (2 of 2 overloads)]
+[section:operator_not__eq_ local::basic_endpoint::operator!=]
 
-Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation, or 0 if an error occurred.
+Compare two endpoints for inequality.
 
- std::size_t flush(
- boost::system::error_code & ec);
+ friend bool operator!=(
+ const basic_endpoint< Protocol > & e1,
+ const basic_endpoint< Protocol > & e2);
 
 
 
 [endsect]
 
 
-[endsect]
-
 
-[section:get_io_service buffered_write_stream::get_io_service]
+[section:operator_lt_ local::basic_endpoint::operator<]
 
-Get the io_service associated with the object.
+Compare endpoints for ordering.
 
- boost::asio::io_service & get_io_service();
+ friend bool operator<(
+ const basic_endpoint< Protocol > & e1,
+ const basic_endpoint< Protocol > & e2);
 
 
 
 [endsect]
 
 
-[section:in_avail buffered_write_stream::in_avail]
-
-Determine the amount of data that may be read without blocking.
-
- std::size_t ``[link boost_asio.reference.buffered_write_stream.in_avail.overload1 in_avail]``();
-
- std::size_t ``[link boost_asio.reference.buffered_write_stream.in_avail.overload2 in_avail]``(
- boost::system::error_code & ec);
-
 
-[section:overload1 buffered_write_stream::in_avail (1 of 2 overloads)]
+[section:operator_lt__lt_ local::basic_endpoint::operator<<]
 
-Determine the amount of data that may be read without blocking.
+Output an endpoint as a string.
 
- std::size_t in_avail();
+ std::basic_ostream< Elem, Traits > & operator<<(
+ std::basic_ostream< Elem, Traits > & os,
+ const basic_endpoint< Protocol > & endpoint);
 
 
+Used to output a human-readable string for a specified endpoint.
 
-[endsect]
 
+[heading Parameters]
+
 
+[variablelist
+
+[[os][The output stream to which the string will be written.]]
 
-[section:overload2 buffered_write_stream::in_avail (2 of 2 overloads)]
+[[endpoint][The endpoint to be written.]]
 
-Determine the amount of data that may be read without blocking.
+]
 
- std::size_t in_avail(
- boost::system::error_code & ec);
+[heading Return Value]
+
+The output stream.
 
 
 
 [endsect]
 
 
-[endsect]
-
 
-[section:io_service buffered_write_stream::io_service]
+[section:operator_eq_ local::basic_endpoint::operator=]
 
-(Deprecated: use get_io_service().) Get the io_service associated with the object.
+Assign from another endpoint.
 
- boost::asio::io_service & io_service();
+ basic_endpoint & operator=(
+ const basic_endpoint & other);
 
 
 
@@ -21195,79 +40626,77 @@
 
 
 
-[section:lowest_layer buffered_write_stream::lowest_layer]
+[section:operator_eq__eq_ local::basic_endpoint::operator==]
 
-Get a reference to the lowest layer.
+Compare two endpoints for equality.
 
- lowest_layer_type & lowest_layer();
+ friend bool operator==(
+ const basic_endpoint< Protocol > & e1,
+ const basic_endpoint< Protocol > & e2);
 
 
 
 [endsect]
 
 
+[section:path local::basic_endpoint::path]
 
-[section:lowest_layer_type buffered_write_stream::lowest_layer_type]
+Get the path associated with the endpoint.
 
-The type of the lowest layer.
+ std::string ``[link boost_asio.reference.local__basic_endpoint.path.overload1 path]``() const;
 
- typedef next_layer_type::lowest_layer_type lowest_layer_type;
+ void ``[link boost_asio.reference.local__basic_endpoint.path.overload2 path]``(
+ const char * p);
 
+ void ``[link boost_asio.reference.local__basic_endpoint.path.overload3 path]``(
+ const std::string & p);
 
 
+[section:overload1 local::basic_endpoint::path (1 of 3 overloads)]
 
-[endsect]
+Get the path associated with the endpoint.
 
+ std::string path() const;
 
 
-[section:next_layer buffered_write_stream::next_layer]
 
-Get a reference to the next layer.
+[endsect]
 
- next_layer_type & next_layer();
 
 
+[section:overload2 local::basic_endpoint::path (2 of 3 overloads)]
 
-[endsect]
+Set the path associated with the endpoint.
 
+ void path(
+ const char * p);
 
 
-[section:next_layer_type buffered_write_stream::next_layer_type]
 
-The type of the next layer.
+[endsect]
 
- typedef boost::remove_reference< Stream >::type next_layer_type;
 
 
+[section:overload3 local::basic_endpoint::path (3 of 3 overloads)]
 
+Set the path associated with the endpoint.
 
-[endsect]
+ void path(
+ const std::string & p);
 
 
-[section:peek buffered_write_stream::peek]
 
-Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure.
+[endsect]
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link boost_asio.reference.buffered_write_stream.peek.overload1 peek]``(
- const MutableBufferSequence & buffers);
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link boost_asio.reference.buffered_write_stream.peek.overload2 peek]``(
- const MutableBufferSequence & buffers,
- boost::system::error_code & ec);
+[endsect]
 
 
-[section:overload1 buffered_write_stream::peek (1 of 2 overloads)]
+[section:protocol local::basic_endpoint::protocol]
 
-Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure.
+The protocol associated with the endpoint.
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t peek(
- const MutableBufferSequence & buffers);
+ protocol_type protocol() const;
 
 
 
@@ -21275,47 +40704,25 @@
 
 
 
-[section:overload2 buffered_write_stream::peek (2 of 2 overloads)]
-
-Peek at the incoming data on the stream. Returns the number of bytes read, or 0 if an error occurred.
+[section:protocol_type local::basic_endpoint::protocol_type]
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t peek(
- const MutableBufferSequence & buffers,
- boost::system::error_code & ec);
+The protocol type associated with the endpoint.
 
+ typedef Protocol protocol_type;
 
 
-[endsect]
 
 
 [endsect]
 
-[section:read_some buffered_write_stream::read_some]
-
-Read some data from the stream. Returns the number of bytes read. Throws an exception on failure.
-
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link boost_asio.reference.buffered_write_stream.read_some.overload1 read_some]``(
- const MutableBufferSequence & buffers);
-
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link boost_asio.reference.buffered_write_stream.read_some.overload2 read_some]``(
- const MutableBufferSequence & buffers,
- boost::system::error_code & ec);
 
 
-[section:overload1 buffered_write_stream::read_some (1 of 2 overloads)]
+[section:resize local::basic_endpoint::resize]
 
-Read some data from the stream. Returns the number of bytes read. Throws an exception on failure.
+Set the underlying size of the endpoint in the native type.
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers);
+ void resize(
+ std::size_t size);
 
 
 
@@ -21323,47 +40730,53 @@
 
 
 
-[section:overload2 buffered_write_stream::read_some (2 of 2 overloads)]
+[section:size local::basic_endpoint::size]
 
-Read some data from the stream. Returns the number of bytes read or 0 if an error occurred.
+Get the underlying size of the endpoint in the native type.
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers,
- boost::system::error_code & ec);
+ std::size_t size() const;
 
 
 
 [endsect]
 
 
+
 [endsect]
 
-[section:write_some buffered_write_stream::write_some]
+[section:local__connect_pair local::connect_pair]
 
-Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure.
+Create a pair of connected sockets.
 
   template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link boost_asio.reference.buffered_write_stream.write_some.overload1 write_some]``(
- const ConstBufferSequence & buffers);
+ typename ``[link boost_asio.reference.Protocol Protocol]``,
+ typename ``[link boost_asio.reference.SocketService1 SocketService1]``,
+ typename ``[link boost_asio.reference.SocketService2 SocketService2]``>
+ void ``[link boost_asio.reference.local__connect_pair.overload1 connect_pair]``(
+ basic_socket< Protocol, SocketService1 > & socket1,
+ basic_socket< Protocol, SocketService2 > & socket2);
 
   template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link boost_asio.reference.buffered_write_stream.write_some.overload2 write_some]``(
- const ConstBufferSequence & buffers,
+ typename ``[link boost_asio.reference.Protocol Protocol]``,
+ typename ``[link boost_asio.reference.SocketService1 SocketService1]``,
+ typename ``[link boost_asio.reference.SocketService2 SocketService2]``>
+ boost::system::error_code ``[link boost_asio.reference.local__connect_pair.overload2 connect_pair]``(
+ basic_socket< Protocol, SocketService1 > & socket1,
+ basic_socket< Protocol, SocketService2 > & socket2,
       boost::system::error_code & ec);
 
 
-[section:overload1 buffered_write_stream::write_some (1 of 2 overloads)]
+[section:overload1 local::connect_pair (1 of 2 overloads)]
 
-Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure.
+Create a pair of connected sockets.
 
   template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers);
+ typename ``[link boost_asio.reference.Protocol Protocol]``,
+ typename ``[link boost_asio.reference.SocketService1 SocketService1]``,
+ typename ``[link boost_asio.reference.SocketService2 SocketService2]``>
+ void connect_pair(
+ basic_socket< Protocol, SocketService1 > & socket1,
+ basic_socket< Protocol, SocketService2 > & socket2);
 
 
 
@@ -21371,14 +40784,17 @@
 
 
 
-[section:overload2 buffered_write_stream::write_some (2 of 2 overloads)]
+[section:overload2 local::connect_pair (2 of 2 overloads)]
 
-Write the given data to the stream. Returns the number of bytes written, or 0 if an error occurred and the error handler did not throw.
+Create a pair of connected sockets.
 
   template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers,
+ typename ``[link boost_asio.reference.Protocol Protocol]``,
+ typename ``[link boost_asio.reference.SocketService1 SocketService1]``,
+ typename ``[link boost_asio.reference.SocketService2 SocketService2]``>
+ boost::system::error_code connect_pair(
+ basic_socket< Protocol, SocketService1 > & socket1,
+ basic_socket< Protocol, SocketService2 > & socket2,
       boost::system::error_code & ec);
 
 
@@ -21388,134 +40804,71 @@
 
 [endsect]
 
+[section:local__datagram_protocol local::datagram_protocol]
 
-[endsect]
-
-[section:const_buffer const_buffer]
-
-Holds a buffer that cannot be modified.
+Encapsulates the flags needed for datagram-oriented UNIX sockets.
 
- class const_buffer
+ class datagram_protocol
 
 
-[heading Member Functions]
+[heading Types]
 [table
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.const_buffer.const_buffer [*const_buffer]]]
- [Construct an empty buffer. ]
+
+ [[link boost_asio.reference.local__datagram_protocol.endpoint [*endpoint]]]
+ [The type of a UNIX domain endpoint. ]
+
   ]
+
+ [
+
+ [[link boost_asio.reference.local__datagram_protocol.socket [*socket]]]
+ [The UNIX domain socket type. ]
   
+ ]
+
 ]
 
-[heading Friends]
+[heading Member Functions]
 [table
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.const_buffer.buffer_cast_helper [*buffer_cast_helper]]]
- []
+ [[link boost_asio.reference.local__datagram_protocol.family [*family]]]
+ [Obtain an identifier for the protocol family. ]
   ]
   
   [
- [[link boost_asio.reference.const_buffer.buffer_size_helper [*buffer_size_helper]]]
- []
+ [[link boost_asio.reference.local__datagram_protocol.protocol [*protocol]]]
+ [Obtain an identifier for the protocol. ]
+ ]
+
+ [
+ [[link boost_asio.reference.local__datagram_protocol.type [*type]]]
+ [Obtain an identifier for the type of the protocol. ]
   ]
   
 ]
 
-The const_buffer class provides a safe representation of a buffer that cannot be modified. It does not own the underlying data, and so is cheap to copy or assign.
-
-
-[section:buffer_cast_helper const_buffer::buffer_cast_helper]
-
-
-
- friend const void * buffer_cast_helper(
- const const_buffer & b);
-
-
-
-[endsect]
-
-
-
-[section:buffer_size_helper const_buffer::buffer_size_helper]
-
-
-
- friend std::size_t buffer_size_helper(
- const const_buffer & b);
-
-
-
-[endsect]
-
-
-[section:const_buffer const_buffer::const_buffer]
-
-Construct an empty buffer.
-
- ``[link boost_asio.reference.const_buffer.const_buffer.overload1 const_buffer]``();
-
- ``[link boost_asio.reference.const_buffer.const_buffer.overload2 const_buffer]``(
- const void * data,
- std::size_t size);
-
- ``[link boost_asio.reference.const_buffer.const_buffer.overload3 const_buffer]``(
- const mutable_buffer & b);
-
-
-[section:overload1 const_buffer::const_buffer (1 of 3 overloads)]
-
-Construct an empty buffer.
-
- const_buffer();
-
-
-
-[endsect]
-
-
-
-[section:overload2 const_buffer::const_buffer (2 of 3 overloads)]
-
-Construct a buffer to represent a given memory range.
-
- const_buffer(
- const void * data,
- std::size_t size);
-
-
-
-[endsect]
-
-
-
-[section:overload3 const_buffer::const_buffer (3 of 3 overloads)]
-
-Construct a non-modifiable buffer from a modifiable one.
-
- const_buffer(
- const mutable_buffer & b);
-
-
+The
+[link boost_asio.reference.local__datagram_protocol local::datagram_protocol] class contains flags necessary for datagram-oriented UNIX domain sockets.
 
-[endsect]
 
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
-[endsect]
+[*Shared] [*objects:] Safe.
 
 
-[endsect]
 
-[section:const_buffers_1 const_buffers_1]
+[section:endpoint local::datagram_protocol::endpoint]
 
-Adapts a single non-modifiable buffer so that it meets the requirements of the ConstBufferSequence concept.
+The type of a UNIX domain endpoint.
 
- class const_buffers_1 :
- public const_buffer
+ typedef basic_endpoint< datagram_protocol > endpoint;
 
 
 [heading Types]
@@ -21524,15 +40877,15 @@
 
   [
 
- [[link boost_asio.reference.const_buffers_1.const_iterator [*const_iterator]]]
- [A random-access iterator type that may be used to read elements. ]
+ [[link boost_asio.reference.local__basic_endpoint.data_type [*data_type]]]
+ [The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.const_buffers_1.value_type [*value_type]]]
- [The type for each element in the list of buffers. ]
+ [[link boost_asio.reference.local__basic_endpoint.protocol_type [*protocol_type]]]
+ [The protocol type associated with the endpoint. ]
   
   ]
 
@@ -21543,28 +40896,89 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.const_buffers_1.begin [*begin]]]
- [Get a random-access iterator to the first element. ]
+ [[link boost_asio.reference.local__basic_endpoint.basic_endpoint [*basic_endpoint]]]
+ [Default constructor. ]
   ]
   
   [
- [[link boost_asio.reference.const_buffers_1.const_buffers_1 [*const_buffers_1]]]
- [Construct to represent a single non-modifiable buffer. ]
+ [[link boost_asio.reference.local__basic_endpoint.capacity [*capacity]]]
+ [Get the capacity of the endpoint in the native type. ]
   ]
   
   [
- [[link boost_asio.reference.const_buffers_1.end [*end]]]
- [Get a random-access iterator for one past the last element. ]
+ [[link boost_asio.reference.local__basic_endpoint.data [*data]]]
+ [Get the underlying endpoint in the native type. ]
+ ]
+
+ [
+ [[link boost_asio.reference.local__basic_endpoint.operator_eq_ [*operator=]]]
+ [Assign from another endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.local__basic_endpoint.path [*path]]]
+ [Get the path associated with the endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.local__basic_endpoint.protocol [*protocol]]]
+ [The protocol associated with the endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.local__basic_endpoint.resize [*resize]]]
+ [Set the underlying size of the endpoint in the native type. ]
+ ]
+
+ [
+ [[link boost_asio.reference.local__basic_endpoint.size [*size]]]
+ [Get the underlying size of the endpoint in the native type. ]
   ]
   
 ]
 
+[heading Friends]
+[table
+ [[Name][Description]]
 
-[section:begin const_buffers_1::begin]
+ [
+ [[link boost_asio.reference.local__basic_endpoint.operator_not__eq_ [*operator!=]]]
+ [Compare two endpoints for inequality. ]
+ ]
+
+ [
+ [[link boost_asio.reference.local__basic_endpoint.operator_lt_ [*operator<]]]
+ [Compare endpoints for ordering. ]
+ ]
+
+ [
+ [[link boost_asio.reference.local__basic_endpoint.operator_eq__eq_ [*operator==]]]
+ [Compare two endpoints for equality. ]
+ ]
+
+]
 
-Get a random-access iterator to the first element.
+[heading Related Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.local__basic_endpoint.operator_lt__lt_ [*operator<<]]]
+ [Output an endpoint as a string. ]
+ ]
+
+]
+
+The
+[link boost_asio.reference.local__basic_endpoint local::basic_endpoint] class template describes an endpoint that may be associated with a particular UNIX socket.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
 
- const_iterator begin() const;
 
 
 
@@ -21572,12 +40986,11 @@
 
 
 
-[section:const_buffers_1 const_buffers_1::const_buffers_1]
+[section:family local::datagram_protocol::family]
 
-Construct to represent a single non-modifiable buffer.
+Obtain an identifier for the protocol family.
 
- const_buffers_1(
- const const_buffer & b);
+ int family() const;
 
 
 
@@ -21585,12 +40998,11 @@
 
 
 
-[section:const_iterator const_buffers_1::const_iterator]
-
-A random-access iterator type that may be used to read elements.
+[section:protocol local::datagram_protocol::protocol]
 
- typedef const const_buffer * const_iterator;
+Obtain an identifier for the protocol.
 
+ int protocol() const;
 
 
 
@@ -21598,101 +41010,161 @@
 
 
 
-[section:end const_buffers_1::end]
+[section:socket local::datagram_protocol::socket]
 
-Get a random-access iterator for one past the last element.
+The UNIX domain socket type.
 
- const_iterator end() const;
+ typedef basic_datagram_socket< datagram_protocol > socket;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.broadcast [*broadcast]]]
+ [Socket option to permit sending of broadcast messages. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.bytes_readable [*bytes_readable]]]
+ [IO control command to get the amount of data that can be read without blocking. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.basic_datagram_socket.debug [*debug]]]
+ [Socket option to enable socket-level debugging. ]
+
+ ]
 
-[endsect]
+ [
 
+ [[link boost_asio.reference.basic_datagram_socket.do_not_route [*do_not_route]]]
+ [Socket option to prevent routing, use local interfaces only. ]
+
+ ]
 
+ [
 
-[section:value_type const_buffers_1::value_type]
+ [[link boost_asio.reference.basic_datagram_socket.enable_connection_aborted [*enable_connection_aborted]]]
+ [Socket option to report aborted connections on accept. ]
+
+ ]
 
-The type for each element in the list of buffers.
+ [
 
- typedef const_buffer value_type;
+ [[link boost_asio.reference.basic_datagram_socket.endpoint_type [*endpoint_type]]]
+ [The endpoint type. ]
+
+ ]
 
+ [
 
-[heading Member Functions]
-[table
- [[Name][Description]]
+ [[link boost_asio.reference.basic_datagram_socket.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
 
   [
- [[link boost_asio.reference.const_buffer.const_buffer [*const_buffer]]]
- [Construct an empty buffer. ]
- ]
-
-]
 
-[heading Friends]
-[table
- [[Name][Description]]
+ [[link boost_asio.reference.basic_datagram_socket.keep_alive [*keep_alive]]]
+ [Socket option to send keep-alives. ]
+
+ ]
 
   [
- [[link boost_asio.reference.const_buffer.buffer_cast_helper [*buffer_cast_helper]]]
- []
- ]
+
+ [[link boost_asio.reference.basic_datagram_socket.linger [*linger]]]
+ [Socket option to specify whether the socket lingers on close if unsent data is present. ]
   
+ ]
+
   [
- [[link boost_asio.reference.const_buffer.buffer_size_helper [*buffer_size_helper]]]
- []
+
+ [[link boost_asio.reference.basic_datagram_socket.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_socket is always the lowest layer. ]
+
   ]
+
+ [
+
+ [[link boost_asio.reference.basic_datagram_socket.message_flags [*message_flags]]]
+ [Bitmask type for flags that can be passed to send and receive operations. ]
   
-]
+ ]
 
-The const_buffer class provides a safe representation of a buffer that cannot be modified. It does not own the underlying data, and so is cheap to copy or assign.
+ [
 
+ [[link boost_asio.reference.basic_datagram_socket.native_type [*native_type]]]
+ [The native representation of a socket. ]
+
+ ]
 
+ [
 
-[endsect]
+ [[link boost_asio.reference.basic_datagram_socket.non_blocking_io [*non_blocking_io]]]
+ [IO control command to set the blocking mode of the socket. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.basic_datagram_socket.protocol_type [*protocol_type]]]
+ [The protocol type. ]
+
+ ]
 
-[endsect]
+ [
 
-[section:datagram_socket_service datagram_socket_service]
+ [[link boost_asio.reference.basic_datagram_socket.receive_buffer_size [*receive_buffer_size]]]
+ [Socket option for the receive buffer size of a socket. ]
+
+ ]
 
-Default service implementation for a datagram socket.
+ [
 
- template<
- typename ``[link boost_asio.reference.Protocol Protocol]``>
- class datagram_socket_service :
- public io_service::service
+ [[link boost_asio.reference.basic_datagram_socket.receive_low_watermark [*receive_low_watermark]]]
+ [Socket option for the receive low watermark. ]
+
+ ]
 
+ [
 
-[heading Types]
-[table
- [[Name][Description]]
+ [[link boost_asio.reference.basic_datagram_socket.reuse_address [*reuse_address]]]
+ [Socket option to allow the socket to be bound to an address that is already in use. ]
+
+ ]
 
   [
 
- [[link boost_asio.reference.datagram_socket_service.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
+ [[link boost_asio.reference.basic_datagram_socket.send_buffer_size [*send_buffer_size]]]
+ [Socket option for the send buffer size of a socket. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.datagram_socket_service.implementation_type [*implementation_type]]]
- [The type of a datagram socket. ]
+ [[link boost_asio.reference.basic_datagram_socket.send_low_watermark [*send_low_watermark]]]
+ [Socket option for the send low watermark. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.datagram_socket_service.native_type [*native_type]]]
- [The native socket type. ]
+ [[link boost_asio.reference.basic_datagram_socket.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.datagram_socket_service.protocol_type [*protocol_type]]]
- [The protocol type. ]
+ [[link boost_asio.reference.basic_datagram_socket.shutdown_type [*shutdown_type]]]
+ [Different ways a socket may be shutdown. ]
   
   ]
 
@@ -21703,160 +41175,150 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.datagram_socket_service.assign [*assign]]]
- [Assign an existing native socket to a datagram socket. ]
+ [[link boost_asio.reference.basic_datagram_socket.assign [*assign]]]
+ [Assign an existing native socket to the socket. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.async_connect [*async_connect]]]
+ [[link boost_asio.reference.basic_datagram_socket.async_connect [*async_connect]]]
     [Start an asynchronous connect. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.async_receive [*async_receive]]]
- [Start an asynchronous receive. ]
+ [[link boost_asio.reference.basic_datagram_socket.async_receive [*async_receive]]]
+ [Start an asynchronous receive on a connected socket. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.async_receive_from [*async_receive_from]]]
- [Start an asynchronous receive that will get the endpoint of the sender. ]
+ [[link boost_asio.reference.basic_datagram_socket.async_receive_from [*async_receive_from]]]
+ [Start an asynchronous receive. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.async_send [*async_send]]]
- [Start an asynchronous send. ]
+ [[link boost_asio.reference.basic_datagram_socket.async_send [*async_send]]]
+ [Start an asynchronous send on a connected socket. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.async_send_to [*async_send_to]]]
+ [[link boost_asio.reference.basic_datagram_socket.async_send_to [*async_send_to]]]
     [Start an asynchronous send. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.at_mark [*at_mark]]]
+ [[link boost_asio.reference.basic_datagram_socket.at_mark [*at_mark]]]
     [Determine whether the socket is at the out-of-band data mark. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.available [*available]]]
+ [[link boost_asio.reference.basic_datagram_socket.available [*available]]]
     [Determine the number of bytes available for reading. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.bind [*bind]]]
- []
- ]
-
- [
- [[link boost_asio.reference.datagram_socket_service.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
+ [[link boost_asio.reference.basic_datagram_socket.basic_datagram_socket [*basic_datagram_socket]]]
+ [Construct a basic_datagram_socket without opening it. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.close [*close]]]
- [Close a datagram socket implementation. ]
+ [[link boost_asio.reference.basic_datagram_socket.bind [*bind]]]
+ [Bind the socket to the given local endpoint. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.connect [*connect]]]
- [Connect the datagram socket to the specified endpoint. ]
+ [[link boost_asio.reference.basic_datagram_socket.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the socket. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.construct [*construct]]]
- [Construct a new datagram socket implementation. ]
+ [[link boost_asio.reference.basic_datagram_socket.close [*close]]]
+ [Close the socket. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.datagram_socket_service [*datagram_socket_service]]]
- [Construct a new datagram socket service for the specified io_service. ]
+ [[link boost_asio.reference.basic_datagram_socket.connect [*connect]]]
+ [Connect the socket to the specified endpoint. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.destroy [*destroy]]]
- [Destroy a datagram socket implementation. ]
+ [[link boost_asio.reference.basic_datagram_socket.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.get_io_service [*get_io_service]]]
- [Get the io_service object that owns the service. ]
+ [[link boost_asio.reference.basic_datagram_socket.get_option [*get_option]]]
+ [Get an option from the socket. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.get_option [*get_option]]]
- [Get a socket option. ]
+ [[link boost_asio.reference.basic_datagram_socket.io_control [*io_control]]]
+ [Perform an IO control command on the socket. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
+ [[link boost_asio.reference.basic_datagram_socket.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.io_service [*io_service]]]
- [(Deprecated: use get_io_service().) Get the io_service object that owns the service. ]
+ [[link boost_asio.reference.basic_datagram_socket.is_open [*is_open]]]
+ [Determine whether the socket is open. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.is_open [*is_open]]]
- [Determine whether the socket is open. ]
+ [[link boost_asio.reference.basic_datagram_socket.local_endpoint [*local_endpoint]]]
+ [Get the local endpoint of the socket. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.local_endpoint [*local_endpoint]]]
- [Get the local endpoint. ]
+ [[link boost_asio.reference.basic_datagram_socket.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.native [*native]]]
- [Get the native socket implementation. ]
+ [[link boost_asio.reference.basic_datagram_socket.native [*native]]]
+ [Get the native socket representation. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.open [*open]]]
- []
+ [[link boost_asio.reference.basic_datagram_socket.open [*open]]]
+ [Open the socket using the specified protocol. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.receive [*receive]]]
- [Receive some data from the peer. ]
+ [[link boost_asio.reference.basic_datagram_socket.receive [*receive]]]
+ [Receive some data on a connected socket. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.receive_from [*receive_from]]]
+ [[link boost_asio.reference.basic_datagram_socket.receive_from [*receive_from]]]
     [Receive a datagram with the endpoint of the sender. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint. ]
+ [[link boost_asio.reference.basic_datagram_socket.remote_endpoint [*remote_endpoint]]]
+ [Get the remote endpoint of the socket. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.send [*send]]]
- [Send the given data to the peer. ]
+ [[link boost_asio.reference.basic_datagram_socket.send [*send]]]
+ [Send some data on a connected socket. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.send_to [*send_to]]]
+ [[link boost_asio.reference.basic_datagram_socket.send_to [*send_to]]]
     [Send a datagram to the specified endpoint. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.set_option [*set_option]]]
- [Set a socket option. ]
+ [[link boost_asio.reference.basic_datagram_socket.set_option [*set_option]]]
+ [Set an option on the socket. ]
   ]
   
   [
- [[link boost_asio.reference.datagram_socket_service.shutdown [*shutdown]]]
+ [[link boost_asio.reference.basic_datagram_socket.shutdown [*shutdown]]]
     [Disable sends or receives on the socket. ]
   ]
   
- [
- [[link boost_asio.reference.datagram_socket_service.shutdown_service [*shutdown_service]]]
- [Destroy all user-defined handler objects owned by the service. ]
- ]
-
 ]
 
 [heading Data Members]
@@ -21864,216 +41326,52 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.datagram_socket_service.id [*id]]]
- [The unique service identifier. ]
+ [[link boost_asio.reference.basic_datagram_socket.max_connections [*max_connections]]]
+ [The maximum length of the queue of pending incoming connections. ]
   ]
 
-]
-
-
-[section:assign datagram_socket_service::assign]
-
-Assign an existing native socket to a datagram socket.
-
- boost::system::error_code assign(
- implementation_type & impl,
- const protocol_type & protocol,
- const native_type & native_socket,
- boost::system::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:async_connect datagram_socket_service::async_connect]
-
-Start an asynchronous connect.
-
- template<
- typename ``[link boost_asio.reference.ConnectHandler ConnectHandler]``>
- void async_connect(
- implementation_type & impl,
- const endpoint_type & peer_endpoint,
- ConnectHandler handler);
-
-
-
-[endsect]
-
-
-
-[section:async_receive datagram_socket_service::async_receive]
-
-Start an asynchronous receive.
-
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
- void async_receive(
- implementation_type & impl,
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags,
- ReadHandler handler);
-
-
-
-[endsect]
-
-
-
-[section:async_receive_from datagram_socket_service::async_receive_from]
-
-Start an asynchronous receive that will get the endpoint of the sender.
-
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
- void async_receive_from(
- implementation_type & impl,
- const MutableBufferSequence & buffers,
- endpoint_type & sender_endpoint,
- socket_base::message_flags flags,
- ReadHandler handler);
-
-
-
-[endsect]
-
-
-
-[section:async_send datagram_socket_service::async_send]
-
-Start an asynchronous send.
-
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
- void async_send(
- implementation_type & impl,
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags,
- WriteHandler handler);
-
-
-
-[endsect]
-
-
-
-[section:async_send_to datagram_socket_service::async_send_to]
-
-Start an asynchronous send.
-
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
- void async_send_to(
- implementation_type & impl,
- const ConstBufferSequence & buffers,
- const endpoint_type & destination,
- socket_base::message_flags flags,
- WriteHandler handler);
-
-
-
-[endsect]
-
-
-
-[section:at_mark datagram_socket_service::at_mark]
-
-Determine whether the socket is at the out-of-band data mark.
-
- bool at_mark(
- const implementation_type & impl,
- boost::system::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:available datagram_socket_service::available]
-
-Determine the number of bytes available for reading.
-
- std::size_t available(
- const implementation_type & impl,
- boost::system::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:bind datagram_socket_service::bind]
-
-
-
- boost::system::error_code bind(
- implementation_type & impl,
- const endpoint_type & endpoint,
- boost::system::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:cancel datagram_socket_service::cancel]
-
-Cancel all asynchronous operations associated with the socket.
-
- boost::system::error_code cancel(
- implementation_type & impl,
- boost::system::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:close datagram_socket_service::close]
-
-Close a datagram socket implementation.
-
- boost::system::error_code close(
- implementation_type & impl,
- boost::system::error_code & ec);
-
-
-
-[endsect]
-
+ [
+ [[link boost_asio.reference.basic_datagram_socket.message_do_not_route [*message_do_not_route]]]
+ [Specify that the data should not be subject to routing. ]
+ ]
 
+ [
+ [[link boost_asio.reference.basic_datagram_socket.message_out_of_band [*message_out_of_band]]]
+ [Process out-of-band data. ]
+ ]
 
-[section:connect datagram_socket_service::connect]
+ [
+ [[link boost_asio.reference.basic_datagram_socket.message_peek [*message_peek]]]
+ [Peek at incoming data without removing it from the input queue. ]
+ ]
 
-Connect the datagram socket to the specified endpoint.
+]
 
- boost::system::error_code connect(
- implementation_type & impl,
- const endpoint_type & peer_endpoint,
- boost::system::error_code & ec);
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.basic_datagram_socket.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
 
+ [
+ [[link boost_asio.reference.basic_datagram_socket.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
 
-[endsect]
+]
 
+The basic_datagram_socket class template provides asynchronous and blocking datagram-oriented socket functionality.
 
 
-[section:construct datagram_socket_service::construct]
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
-Construct a new datagram socket implementation.
+[*Shared] [*objects:] Unsafe.
 
- void construct(
- implementation_type & impl);
 
 
 
@@ -22081,12 +41379,11 @@
 
 
 
-[section:datagram_socket_service datagram_socket_service::datagram_socket_service]
+[section:type local::datagram_protocol::type]
 
-Construct a new datagram socket service for the specified io_service.
+Obtain an identifier for the type of the protocol.
 
- datagram_socket_service(
- boost::asio::io_service & io_service);
+ int type() const;
 
 
 
@@ -22094,166 +41391,385 @@
 
 
 
-[section:destroy datagram_socket_service::destroy]
-
-Destroy a datagram socket implementation.
-
- void destroy(
- implementation_type & impl);
-
-
-
 [endsect]
 
+[section:local__stream_protocol local::stream_protocol]
 
+Encapsulates the flags needed for stream-oriented UNIX sockets.
 
-[section:endpoint_type datagram_socket_service::endpoint_type]
-
-The endpoint type.
-
- typedef Protocol::endpoint endpoint_type;
+ class stream_protocol
 
 
+[heading Types]
+[table
+ [[Name][Description]]
 
+ [
 
-[endsect]
+ [[link boost_asio.reference.local__stream_protocol.acceptor [*acceptor]]]
+ [The UNIX domain acceptor type. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.local__stream_protocol.endpoint [*endpoint]]]
+ [The type of a UNIX domain endpoint. ]
+
+ ]
 
-[section:get_io_service datagram_socket_service::get_io_service]
+ [
 
+ [[link boost_asio.reference.local__stream_protocol.iostream [*iostream]]]
+ [The UNIX domain iostream type. ]
+
+ ]
 
-['Inherited from io_service.]
+ [
 
-Get the io_service object that owns the service.
+ [[link boost_asio.reference.local__stream_protocol.socket [*socket]]]
+ [The UNIX domain socket type. ]
+
+ ]
 
- boost::asio::io_service & get_io_service();
+]
 
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.local__stream_protocol.family [*family]]]
+ [Obtain an identifier for the protocol family. ]
+ ]
+
+ [
+ [[link boost_asio.reference.local__stream_protocol.protocol [*protocol]]]
+ [Obtain an identifier for the protocol. ]
+ ]
+
+ [
+ [[link boost_asio.reference.local__stream_protocol.type [*type]]]
+ [Obtain an identifier for the type of the protocol. ]
+ ]
+
+]
 
-[endsect]
+The
+[link boost_asio.reference.local__stream_protocol local::stream_protocol] class contains flags necessary for stream-oriented UNIX domain sockets.
 
 
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
-[section:get_option datagram_socket_service::get_option]
+[*Shared] [*objects:] Safe.
 
-Get a socket option.
 
- template<
- typename ``[link boost_asio.reference.GettableSocketOption GettableSocketOption]``>
- boost::system::error_code get_option(
- const implementation_type & impl,
- GettableSocketOption & option,
- boost::system::error_code & ec) const;
 
+[section:acceptor local::stream_protocol::acceptor]
 
+The UNIX domain acceptor type.
 
-[endsect]
+ typedef basic_socket_acceptor< stream_protocol > acceptor;
 
 
+[heading Types]
+[table
+ [[Name][Description]]
 
-[section:id datagram_socket_service::id]
+ [
 
-The unique service identifier.
+ [[link boost_asio.reference.basic_socket_acceptor.broadcast [*broadcast]]]
+ [Socket option to permit sending of broadcast messages. ]
+
+ ]
 
- static boost::asio::io_service::id id;
+ [
 
+ [[link boost_asio.reference.basic_socket_acceptor.bytes_readable [*bytes_readable]]]
+ [IO control command to get the amount of data that can be read without blocking. ]
+
+ ]
 
+ [
 
-[endsect]
+ [[link boost_asio.reference.basic_socket_acceptor.debug [*debug]]]
+ [Socket option to enable socket-level debugging. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.basic_socket_acceptor.do_not_route [*do_not_route]]]
+ [Socket option to prevent routing, use local interfaces only. ]
+
+ ]
 
-[section:implementation_type datagram_socket_service::implementation_type]
+ [
 
-The type of a datagram socket.
+ [[link boost_asio.reference.basic_socket_acceptor.enable_connection_aborted [*enable_connection_aborted]]]
+ [Socket option to report aborted connections on accept. ]
+
+ ]
 
- typedef implementation_defined implementation_type;
+ [
 
+ [[link boost_asio.reference.basic_socket_acceptor.endpoint_type [*endpoint_type]]]
+ [The endpoint type. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.basic_socket_acceptor.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
 
-[endsect]
+ [
 
+ [[link boost_asio.reference.basic_socket_acceptor.keep_alive [*keep_alive]]]
+ [Socket option to send keep-alives. ]
+
+ ]
 
+ [
 
-[section:io_control datagram_socket_service::io_control]
+ [[link boost_asio.reference.basic_socket_acceptor.linger [*linger]]]
+ [Socket option to specify whether the socket lingers on close if unsent data is present. ]
+
+ ]
 
-Perform an IO control command on the socket.
+ [
 
- template<
- typename ``[link boost_asio.reference.IoControlCommand IoControlCommand]``>
- boost::system::error_code io_control(
- implementation_type & impl,
- IoControlCommand & command,
- boost::system::error_code & ec);
+ [[link boost_asio.reference.basic_socket_acceptor.message_flags [*message_flags]]]
+ [Bitmask type for flags that can be passed to send and receive operations. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.basic_socket_acceptor.native_type [*native_type]]]
+ [The native representation of an acceptor. ]
+
+ ]
 
-[endsect]
+ [
 
+ [[link boost_asio.reference.basic_socket_acceptor.non_blocking_io [*non_blocking_io]]]
+ [IO control command to set the blocking mode of the socket. ]
+
+ ]
 
+ [
 
-[section:io_service datagram_socket_service::io_service]
+ [[link boost_asio.reference.basic_socket_acceptor.protocol_type [*protocol_type]]]
+ [The protocol type. ]
+
+ ]
 
+ [
 
-['Inherited from io_service.]
+ [[link boost_asio.reference.basic_socket_acceptor.receive_buffer_size [*receive_buffer_size]]]
+ [Socket option for the receive buffer size of a socket. ]
+
+ ]
 
-(Deprecated: use get_io_service().) Get the io_service object that owns the service.
+ [
 
- boost::asio::io_service & io_service();
+ [[link boost_asio.reference.basic_socket_acceptor.receive_low_watermark [*receive_low_watermark]]]
+ [Socket option for the receive low watermark. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.basic_socket_acceptor.reuse_address [*reuse_address]]]
+ [Socket option to allow the socket to be bound to an address that is already in use. ]
+
+ ]
 
-[endsect]
+ [
 
+ [[link boost_asio.reference.basic_socket_acceptor.send_buffer_size [*send_buffer_size]]]
+ [Socket option for the send buffer size of a socket. ]
+
+ ]
 
+ [
 
-[section:is_open datagram_socket_service::is_open]
+ [[link boost_asio.reference.basic_socket_acceptor.send_low_watermark [*send_low_watermark]]]
+ [Socket option for the send low watermark. ]
+
+ ]
 
-Determine whether the socket is open.
+ [
 
- bool is_open(
- const implementation_type & impl) const;
+ [[link boost_asio.reference.basic_socket_acceptor.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.basic_socket_acceptor.shutdown_type [*shutdown_type]]]
+ [Different ways a socket may be shutdown. ]
+
+ ]
 
-[endsect]
+]
 
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.accept [*accept]]]
+ [Accept a new connection. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.assign [*assign]]]
+ [Assigns an existing native acceptor to the acceptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.async_accept [*async_accept]]]
+ [Start an asynchronous accept. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.basic_socket_acceptor [*basic_socket_acceptor]]]
+ [Construct an acceptor without opening it. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.bind [*bind]]]
+ [Bind the acceptor to the given local endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the acceptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.close [*close]]]
+ [Close the acceptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.get_option [*get_option]]]
+ [Get an option from the acceptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.is_open [*is_open]]]
+ [Determine whether the acceptor is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.listen [*listen]]]
+ [Place the acceptor into the state where it will listen for new connections. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.local_endpoint [*local_endpoint]]]
+ [Get the local endpoint of the acceptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.native [*native]]]
+ [Get the native acceptor representation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.open [*open]]]
+ [Open the acceptor using the specified protocol. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.set_option [*set_option]]]
+ [Set an option on the acceptor. ]
+ ]
+
+]
 
-[section:local_endpoint datagram_socket_service::local_endpoint]
+[heading Data Members]
+[table
+ [[Name][Description]]
 
-Get the local endpoint.
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.max_connections [*max_connections]]]
+ [The maximum length of the queue of pending incoming connections. ]
+ ]
 
- endpoint_type local_endpoint(
- const implementation_type & impl,
- boost::system::error_code & ec) const;
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.message_do_not_route [*message_do_not_route]]]
+ [Specify that the data should not be subject to routing. ]
+ ]
 
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.message_out_of_band [*message_out_of_band]]]
+ [Process out-of-band data. ]
+ ]
 
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.message_peek [*message_peek]]]
+ [Peek at incoming data without removing it from the input queue. ]
+ ]
 
-[endsect]
+]
 
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
 
-[section:native datagram_socket_service::native]
+ [
+ [[link boost_asio.reference.basic_socket_acceptor.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
 
-Get the native socket implementation.
+]
 
- native_type native(
- implementation_type & impl);
+The basic_socket_acceptor class template is used for accepting new socket connections.
 
 
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
-[endsect]
+[*Shared] [*objects:] Unsafe.
 
+[heading Example]
+
+Opening a socket acceptor with the SO\_REUSEADDR option enabled:
 
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::tcp::v4(), port);
+ acceptor.open(endpoint.protocol());
+ acceptor.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true));
+ acceptor.bind(endpoint);
+ acceptor.listen();
 
-[section:native_type datagram_socket_service::native_type]
 
-The native socket type.
 
- typedef implementation_defined native_type;
 
 
 
@@ -22262,45 +41778,121 @@
 
 
 
-[section:open datagram_socket_service::open]
+[section:endpoint local::stream_protocol::endpoint]
 
+The type of a UNIX domain endpoint.
 
+ typedef basic_endpoint< stream_protocol > endpoint;
 
- boost::system::error_code open(
- implementation_type & impl,
- const protocol_type & protocol,
- boost::system::error_code & ec);
 
+[heading Types]
+[table
+ [[Name][Description]]
 
+ [
 
-[endsect]
+ [[link boost_asio.reference.local__basic_endpoint.data_type [*data_type]]]
+ [The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.local__basic_endpoint.protocol_type [*protocol_type]]]
+ [The protocol type associated with the endpoint. ]
+
+ ]
 
-[section:protocol_type datagram_socket_service::protocol_type]
+]
 
-The protocol type.
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
- typedef Protocol protocol_type;
+ [
+ [[link boost_asio.reference.local__basic_endpoint.basic_endpoint [*basic_endpoint]]]
+ [Default constructor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.local__basic_endpoint.capacity [*capacity]]]
+ [Get the capacity of the endpoint in the native type. ]
+ ]
+
+ [
+ [[link boost_asio.reference.local__basic_endpoint.data [*data]]]
+ [Get the underlying endpoint in the native type. ]
+ ]
+
+ [
+ [[link boost_asio.reference.local__basic_endpoint.operator_eq_ [*operator=]]]
+ [Assign from another endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.local__basic_endpoint.path [*path]]]
+ [Get the path associated with the endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.local__basic_endpoint.protocol [*protocol]]]
+ [The protocol associated with the endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.local__basic_endpoint.resize [*resize]]]
+ [Set the underlying size of the endpoint in the native type. ]
+ ]
+
+ [
+ [[link boost_asio.reference.local__basic_endpoint.size [*size]]]
+ [Get the underlying size of the endpoint in the native type. ]
+ ]
+
+]
 
+[heading Friends]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.local__basic_endpoint.operator_not__eq_ [*operator!=]]]
+ [Compare two endpoints for inequality. ]
+ ]
+
+ [
+ [[link boost_asio.reference.local__basic_endpoint.operator_lt_ [*operator<]]]
+ [Compare endpoints for ordering. ]
+ ]
+
+ [
+ [[link boost_asio.reference.local__basic_endpoint.operator_eq__eq_ [*operator==]]]
+ [Compare two endpoints for equality. ]
+ ]
+
+]
 
+[heading Related Functions]
+[table
+ [[Name][Description]]
 
-[endsect]
+ [
+ [[link boost_asio.reference.local__basic_endpoint.operator_lt__lt_ [*operator<<]]]
+ [Output an endpoint as a string. ]
+ ]
+
+]
 
+The
+[link boost_asio.reference.local__basic_endpoint local::basic_endpoint] class template describes an endpoint that may be associated with a particular UNIX socket.
 
 
-[section:receive datagram_socket_service::receive]
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
-Receive some data from the peer.
+[*Shared] [*objects:] Unsafe.
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t receive(
- implementation_type & impl,
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags,
- boost::system::error_code & ec);
 
 
 
@@ -22308,18 +41900,11 @@
 
 
 
-[section:receive_from datagram_socket_service::receive_from]
+[section:family local::stream_protocol::family]
 
-Receive a datagram with the endpoint of the sender.
+Obtain an identifier for the protocol family.
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t receive_from(
- implementation_type & impl,
- const MutableBufferSequence & buffers,
- endpoint_type & sender_endpoint,
- socket_base::message_flags flags,
- boost::system::error_code & ec);
+ int family() const;
 
 
 
@@ -22327,147 +41912,212 @@
 
 
 
-[section:remote_endpoint datagram_socket_service::remote_endpoint]
+[section:iostream local::stream_protocol::iostream]
 
-Get the remote endpoint.
+The UNIX domain iostream type.
 
- endpoint_type remote_endpoint(
- const implementation_type & impl,
- boost::system::error_code & ec) const;
+ typedef basic_socket_iostream< stream_protocol > iostream;
 
 
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
-[endsect]
+ [
+ [[link boost_asio.reference.basic_socket_iostream.basic_socket_iostream [*basic_socket_iostream]]]
+ [Construct a basic_socket_iostream without establishing a connection. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_iostream.close [*close]]]
+ [Close the connection. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_iostream.connect [*connect]]]
+ [Establish a connection to an endpoint corresponding to a resolver query. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_socket_iostream.rdbuf [*rdbuf]]]
+ [Return a pointer to the underlying streambuf. ]
+ ]
+
+]
 
 
 
-[section:send datagram_socket_service::send]
+[endsect]
 
-Send the given data to the peer.
 
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t send(
- implementation_type & impl,
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags,
- boost::system::error_code & ec);
 
+[section:protocol local::stream_protocol::protocol]
 
+Obtain an identifier for the protocol.
 
-[endsect]
+ int protocol() const;
 
 
 
-[section:send_to datagram_socket_service::send_to]
+[endsect]
 
-Send a datagram to the specified endpoint.
 
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t send_to(
- implementation_type & impl,
- const ConstBufferSequence & buffers,
- const endpoint_type & destination,
- socket_base::message_flags flags,
- boost::system::error_code & ec);
 
+[section:socket local::stream_protocol::socket]
 
+The UNIX domain socket type.
+
+ typedef basic_stream_socket< stream_protocol > socket;
 
-[endsect]
 
+[heading Types]
+[table
+ [[Name][Description]]
 
+ [
 
-[section:set_option datagram_socket_service::set_option]
+ [[link boost_asio.reference.basic_stream_socket.broadcast [*broadcast]]]
+ [Socket option to permit sending of broadcast messages. ]
+
+ ]
 
-Set a socket option.
+ [
 
- template<
- typename ``[link boost_asio.reference.SettableSocketOption SettableSocketOption]``>
- boost::system::error_code set_option(
- implementation_type & impl,
- const SettableSocketOption & option,
- boost::system::error_code & ec);
+ [[link boost_asio.reference.basic_stream_socket.bytes_readable [*bytes_readable]]]
+ [IO control command to get the amount of data that can be read without blocking. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.basic_stream_socket.debug [*debug]]]
+ [Socket option to enable socket-level debugging. ]
+
+ ]
 
-[endsect]
+ [
 
+ [[link boost_asio.reference.basic_stream_socket.do_not_route [*do_not_route]]]
+ [Socket option to prevent routing, use local interfaces only. ]
+
+ ]
 
+ [
 
-[section:shutdown datagram_socket_service::shutdown]
+ [[link boost_asio.reference.basic_stream_socket.enable_connection_aborted [*enable_connection_aborted]]]
+ [Socket option to report aborted connections on accept. ]
+
+ ]
 
-Disable sends or receives on the socket.
+ [
 
- boost::system::error_code shutdown(
- implementation_type & impl,
- socket_base::shutdown_type what,
- boost::system::error_code & ec);
+ [[link boost_asio.reference.basic_stream_socket.endpoint_type [*endpoint_type]]]
+ [The endpoint type. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.basic_stream_socket.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
 
-[endsect]
+ [
 
+ [[link boost_asio.reference.basic_stream_socket.keep_alive [*keep_alive]]]
+ [Socket option to send keep-alives. ]
+
+ ]
 
+ [
 
-[section:shutdown_service datagram_socket_service::shutdown_service]
+ [[link boost_asio.reference.basic_stream_socket.linger [*linger]]]
+ [Socket option to specify whether the socket lingers on close if unsent data is present. ]
+
+ ]
 
-Destroy all user-defined handler objects owned by the service.
+ [
 
- void shutdown_service();
+ [[link boost_asio.reference.basic_stream_socket.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_socket is always the lowest layer. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.basic_stream_socket.message_flags [*message_flags]]]
+ [Bitmask type for flags that can be passed to send and receive operations. ]
+
+ ]
 
-[endsect]
+ [
 
+ [[link boost_asio.reference.basic_stream_socket.native_type [*native_type]]]
+ [The native representation of a socket. ]
+
+ ]
 
+ [
 
-[endsect]
+ [[link boost_asio.reference.basic_stream_socket.non_blocking_io [*non_blocking_io]]]
+ [IO control command to set the blocking mode of the socket. ]
+
+ ]
 
+ [
 
-[section:deadline_timer deadline_timer]
+ [[link boost_asio.reference.basic_stream_socket.protocol_type [*protocol_type]]]
+ [The protocol type. ]
+
+ ]
 
-Typedef for the typical usage of timer.
+ [
 
- typedef basic_deadline_timer< boost::posix_time::ptime > deadline_timer;
+ [[link boost_asio.reference.basic_stream_socket.receive_buffer_size [*receive_buffer_size]]]
+ [Socket option for the receive buffer size of a socket. ]
+
+ ]
 
+ [
 
-[heading Types]
-[table
- [[Name][Description]]
+ [[link boost_asio.reference.basic_stream_socket.receive_low_watermark [*receive_low_watermark]]]
+ [Socket option for the receive low watermark. ]
+
+ ]
 
   [
 
- [[link boost_asio.reference.basic_deadline_timer.duration_type [*duration_type]]]
- [The duration type. ]
+ [[link boost_asio.reference.basic_stream_socket.reuse_address [*reuse_address]]]
+ [Socket option to allow the socket to be bound to an address that is already in use. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_deadline_timer.implementation_type [*implementation_type]]]
- [The underlying implementation type of I/O object. ]
+ [[link boost_asio.reference.basic_stream_socket.send_buffer_size [*send_buffer_size]]]
+ [Socket option for the send buffer size of a socket. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_deadline_timer.service_type [*service_type]]]
- [The type of the service that will be used to provide I/O operations. ]
+ [[link boost_asio.reference.basic_stream_socket.send_low_watermark [*send_low_watermark]]]
+ [Socket option for the send low watermark. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_deadline_timer.time_type [*time_type]]]
- [The time type. ]
+ [[link boost_asio.reference.basic_stream_socket.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_deadline_timer.traits_type [*traits_type]]]
- [The time traits type. ]
+ [[link boost_asio.reference.basic_stream_socket.shutdown_type [*shutdown_type]]]
+ [Different ways a socket may be shutdown. ]
   
   ]
 
@@ -22478,266 +42128,274 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.basic_deadline_timer.async_wait [*async_wait]]]
- [Start an asynchronous wait on the timer. ]
+ [[link boost_asio.reference.basic_stream_socket.assign [*assign]]]
+ [Assign an existing native socket to the socket. ]
   ]
   
   [
- [[link boost_asio.reference.basic_deadline_timer.basic_deadline_timer [*basic_deadline_timer]]]
- [Constructor. ]
+ [[link boost_asio.reference.basic_stream_socket.async_connect [*async_connect]]]
+ [Start an asynchronous connect. ]
   ]
   
   [
- [[link boost_asio.reference.basic_deadline_timer.cancel [*cancel]]]
- [Cancel any asynchronous operations that are waiting on the timer. ]
+ [[link boost_asio.reference.basic_stream_socket.async_read_some [*async_read_some]]]
+ [Start an asynchronous read. ]
   ]
   
   [
- [[link boost_asio.reference.basic_deadline_timer.expires_at [*expires_at]]]
- [Get the timer's expiry time as an absolute time. ]
+ [[link boost_asio.reference.basic_stream_socket.async_receive [*async_receive]]]
+ [Start an asynchronous receive. ]
   ]
   
   [
- [[link boost_asio.reference.basic_deadline_timer.expires_from_now [*expires_from_now]]]
- [Get the timer's expiry time relative to now. ]
+ [[link boost_asio.reference.basic_stream_socket.async_send [*async_send]]]
+ [Start an asynchronous send. ]
   ]
   
   [
- [[link boost_asio.reference.basic_deadline_timer.get_io_service [*get_io_service]]]
+ [[link boost_asio.reference.basic_stream_socket.async_write_some [*async_write_some]]]
+ [Start an asynchronous write. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.at_mark [*at_mark]]]
+ [Determine whether the socket is at the out-of-band data mark. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.available [*available]]]
+ [Determine the number of bytes available for reading. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.basic_stream_socket [*basic_stream_socket]]]
+ [Construct a basic_stream_socket without opening it. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.bind [*bind]]]
+ [Bind the socket to the given local endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.close [*close]]]
+ [Close the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.connect [*connect]]]
+ [Connect the socket to the specified endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.get_io_service [*get_io_service]]]
     [Get the io_service associated with the object. ]
   ]
   
   [
- [[link boost_asio.reference.basic_deadline_timer.io_service [*io_service]]]
+ [[link boost_asio.reference.basic_stream_socket.get_option [*get_option]]]
+ [Get an option from the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.io_control [*io_control]]]
+ [Perform an IO control command on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.io_service [*io_service]]]
     [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
   ]
   
   [
- [[link boost_asio.reference.basic_deadline_timer.wait [*wait]]]
- [Perform a blocking wait on the timer. ]
+ [[link boost_asio.reference.basic_stream_socket.is_open [*is_open]]]
+ [Determine whether the socket is open. ]
   ]
   
-]
-
-The basic_deadline_timer class template provides the ability to perform a blocking or asynchronous wait for a timer to expire.
-
-Most applications will use the boost::asio::deadline\_timer typedef.
-
-
-[heading Thread Safety]
+ [
+ [[link boost_asio.reference.basic_stream_socket.local_endpoint [*local_endpoint]]]
+ [Get the local endpoint of the socket. ]
+ ]
   
-[*Distinct] [*objects:] Safe.
-
-[*Shared] [*objects:] Unsafe.
-
-[heading Examples]
+ [
+ [[link boost_asio.reference.basic_stream_socket.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
+ ]
   
-Performing a blocking wait:
-
- // Construct a timer without setting an expiry time.
- boost::asio::deadline_timer timer(io_service);
-
- // Set an expiry time relative to now.
- timer.expires_from_now(boost::posix_time::seconds(5));
+ [
+ [[link boost_asio.reference.basic_stream_socket.native [*native]]]
+ [Get the native socket representation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.open [*open]]]
+ [Open the socket using the specified protocol. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.read_some [*read_some]]]
+ [Read some data from the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.receive [*receive]]]
+ [Receive some data on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.remote_endpoint [*remote_endpoint]]]
+ [Get the remote endpoint of the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.send [*send]]]
+ [Send some data on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.set_option [*set_option]]]
+ [Set an option on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.shutdown [*shutdown]]]
+ [Disable sends or receives on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_stream_socket.write_some [*write_some]]]
+ [Write some data to the socket. ]
+ ]
+
+]
 
- // Wait for the timer to expire.
- timer.wait();
+[heading Data Members]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.basic_stream_socket.max_connections [*max_connections]]]
+ [The maximum length of the queue of pending incoming connections. ]
+ ]
 
+ [
+ [[link boost_asio.reference.basic_stream_socket.message_do_not_route [*message_do_not_route]]]
+ [Specify that the data should not be subject to routing. ]
+ ]
 
+ [
+ [[link boost_asio.reference.basic_stream_socket.message_out_of_band [*message_out_of_band]]]
+ [Process out-of-band data. ]
+ ]
 
-Performing an asynchronous wait:
+ [
+ [[link boost_asio.reference.basic_stream_socket.message_peek [*message_peek]]]
+ [Peek at incoming data without removing it from the input queue. ]
+ ]
 
- void handler(const boost::system::error_code& error)
- {
- if (!error)
- {
- // Timer expired.
- }
- }
+]
 
- ...
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
 
- // Construct a timer with an absolute expiry time.
- boost::asio::deadline_timer timer(io_service,
- boost::posix_time::time_from_string("2005-12-07 23:59:59.000"));
+ [
+ [[link boost_asio.reference.basic_stream_socket.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
 
- // Start an asynchronous wait.
- timer.async_wait(handler);
+ [
+ [[link boost_asio.reference.basic_stream_socket.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
 
+]
 
+The basic_stream_socket class template provides asynchronous and blocking stream-oriented socket functionality.
 
 
-[heading Changing an active deadline_timer's expiry time]
+[heading Thread Safety]
   
+[*Distinct] [*objects:] Safe.
 
+[*Shared] [*objects:] Unsafe.
 
-Changing the expiry time of a timer while there are pending asynchronous waits causes those wait operations to be cancelled. To ensure that the action associated with the timer is performed only once, use something like this: used:
 
 
 
- void on_some_event()
- {
- if (my_timer.expires_from_now(seconds(5)) > 0)
- {
- // We managed to cancel the timer. Start new asynchronous wait.
- my_timer.async_wait(on_timeout);
- }
- else
- {
- // Too late, timer has already expired!
- }
- }
+[endsect]
 
- void on_timeout(const boost::system::error_code& e)
- {
- if (e != boost::asio::error::operation_aborted)
- {
- // Timer was not cancelled, take necessary action.
- }
- }
 
 
+[section:type local::stream_protocol::type]
 
+Obtain an identifier for the type of the protocol.
 
+ int type() const;
 
-* The boost::asio::basic_deadline_timer::expires_from_now() function cancels any pending asynchronous waits, and returns the number of asynchronous waits that were cancelled. If it returns 0 then you were too late and the wait handler has already been executed, or will soon be executed. If it returns 1 then the wait handler was successfully cancelled.
 
-* If a wait handler is cancelled, the boost::system::error_code passed to it contains the value boost::asio::error::operation_aborted.
 
+[endsect]
 
 
 
 [endsect]
 
+[section:mutable_buffer mutable_buffer]
 
-[section:deadline_timer_service deadline_timer_service]
-
-Default service implementation for a timer.
+Holds a buffer that can be modified.
 
- template<
- typename ``[link boost_asio.reference.TimeType TimeType]``,
- typename ``[link boost_asio.reference.TimeTraits TimeTraits]`` = boost::asio::time_traits<TimeType>>
- class deadline_timer_service :
- public io_service::service
+ class mutable_buffer
 
 
-[heading Types]
+[heading Member Functions]
 [table
   [[Name][Description]]
 
   [
-
- [[link boost_asio.reference.deadline_timer_service.duration_type [*duration_type]]]
- [The duration type. ]
-
- ]
-
- [
-
- [[link boost_asio.reference.deadline_timer_service.implementation_type [*implementation_type]]]
- [The implementation type of the deadline timer. ]
-
- ]
-
- [
-
- [[link boost_asio.reference.deadline_timer_service.time_type [*time_type]]]
- [The time type. ]
-
+ [[link boost_asio.reference.mutable_buffer.mutable_buffer [*mutable_buffer]]]
+ [Construct an empty buffer. ]
   ]
-
- [
-
- [[link boost_asio.reference.deadline_timer_service.traits_type [*traits_type]]]
- [The time traits type. ]
   
- ]
-
 ]
 
-[heading Member Functions]
+[heading Related Functions]
 [table
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.deadline_timer_service.async_wait [*async_wait]]]
- []
- ]
-
- [
- [[link boost_asio.reference.deadline_timer_service.cancel [*cancel]]]
- [Cancel any asynchronous wait operations associated with the timer. ]
- ]
-
- [
- [[link boost_asio.reference.deadline_timer_service.construct [*construct]]]
- [Construct a new timer implementation. ]
- ]
-
- [
- [[link boost_asio.reference.deadline_timer_service.deadline_timer_service [*deadline_timer_service]]]
- [Construct a new timer service for the specified io_service. ]
- ]
-
- [
- [[link boost_asio.reference.deadline_timer_service.destroy [*destroy]]]
- [Destroy a timer implementation. ]
- ]
-
- [
- [[link boost_asio.reference.deadline_timer_service.expires_at [*expires_at]]]
- [Get the expiry time for the timer as an absolute time. ]
- ]
-
- [
- [[link boost_asio.reference.deadline_timer_service.expires_from_now [*expires_from_now]]]
- [Get the expiry time for the timer relative to now. ]
- ]
-
- [
- [[link boost_asio.reference.deadline_timer_service.get_io_service [*get_io_service]]]
- [Get the io_service object that owns the service. ]
- ]
-
- [
- [[link boost_asio.reference.deadline_timer_service.io_service [*io_service]]]
- [(Deprecated: use get_io_service().) Get the io_service object that owns the service. ]
+ [[link boost_asio.reference.mutable_buffer.buffer_cast [*buffer_cast]]]
+ [Cast a non-modifiable buffer to a specified pointer to POD type. ]
   ]
   
   [
- [[link boost_asio.reference.deadline_timer_service.shutdown_service [*shutdown_service]]]
- [Destroy all user-defined handler objects owned by the service. ]
+ [[link boost_asio.reference.mutable_buffer.buffer_size [*buffer_size]]]
+ [Get the number of bytes in a non-modifiable buffer. ]
   ]
   
   [
- [[link boost_asio.reference.deadline_timer_service.wait [*wait]]]
- []
+ [[link boost_asio.reference.mutable_buffer.operator_plus_ [*operator+]]]
+ [Create a new modifiable buffer that is offset from the start of another. ]
   ]
   
 ]
 
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link boost_asio.reference.deadline_timer_service.id [*id]]]
- [The unique service identifier. ]
- ]
-
-]
-
+The mutable_buffer class provides a safe representation of a buffer that can be modified. It does not own the underlying data, and so is cheap to copy or assign.
 
-[section:async_wait deadline_timer_service::async_wait]
 
+[section:buffer_cast mutable_buffer::buffer_cast]
 
+Cast a non-modifiable buffer to a specified pointer to POD type.
 
   template<
- typename ``[link boost_asio.reference.WaitHandler WaitHandler]``>
- void async_wait(
- implementation_type & impl,
- WaitHandler handler);
+ typename ``[link boost_asio.reference.PointerToPodType PointerToPodType]``>
+ PointerToPodType buffer_cast(
+ const mutable_buffer & b);
 
 
 
@@ -22745,26 +42403,34 @@
 
 
 
-[section:cancel deadline_timer_service::cancel]
+[section:buffer_size mutable_buffer::buffer_size]
 
-Cancel any asynchronous wait operations associated with the timer.
+Get the number of bytes in a non-modifiable buffer.
 
- std::size_t cancel(
- implementation_type & impl,
- boost::system::error_code & ec);
+ std::size_t buffer_size(
+ const mutable_buffer & b);
 
 
 
 [endsect]
 
 
+[section:mutable_buffer mutable_buffer::mutable_buffer]
 
-[section:construct deadline_timer_service::construct]
+Construct an empty buffer.
 
-Construct a new timer implementation.
+ ``[link boost_asio.reference.mutable_buffer.mutable_buffer.overload1 mutable_buffer]``();
 
- void construct(
- implementation_type & impl);
+ ``[link boost_asio.reference.mutable_buffer.mutable_buffer.overload2 mutable_buffer]``(
+ void * data,
+ std::size_t size);
+
+
+[section:overload1 mutable_buffer::mutable_buffer (1 of 2 overloads)]
+
+Construct an empty buffer.
+
+ mutable_buffer();
 
 
 
@@ -22772,25 +42438,41 @@
 
 
 
-[section:deadline_timer_service deadline_timer_service::deadline_timer_service]
+[section:overload2 mutable_buffer::mutable_buffer (2 of 2 overloads)]
 
-Construct a new timer service for the specified io_service.
+Construct a buffer to represent a given memory range.
 
- deadline_timer_service(
- boost::asio::io_service & io_service);
+ mutable_buffer(
+ void * data,
+ std::size_t size);
 
 
 
 [endsect]
 
 
+[endsect]
 
-[section:destroy deadline_timer_service::destroy]
+[section:operator_plus_ mutable_buffer::operator+]
 
-Destroy a timer implementation.
+Create a new modifiable buffer that is offset from the start of another.
 
- void destroy(
- implementation_type & impl);
+ mutable_buffer ``[link boost_asio.reference.mutable_buffer.operator_plus_.overload1 operator+]``(
+ const mutable_buffer & b,
+ std::size_t start);
+
+ mutable_buffer ``[link boost_asio.reference.mutable_buffer.operator_plus_.overload2 operator+]``(
+ std::size_t start,
+ const mutable_buffer & b);
+
+
+[section:overload1 mutable_buffer::operator+ (1 of 2 overloads)]
+
+Create a new modifiable buffer that is offset from the start of another.
+
+ mutable_buffer operator+(
+ const mutable_buffer & b,
+ std::size_t start);
 
 
 
@@ -22798,79 +42480,118 @@
 
 
 
-[section:duration_type deadline_timer_service::duration_type]
+[section:overload2 mutable_buffer::operator+ (2 of 2 overloads)]
 
-The duration type.
+Create a new modifiable buffer that is offset from the start of another.
 
- typedef traits_type::duration_type duration_type;
+ mutable_buffer operator+(
+ std::size_t start,
+ const mutable_buffer & b);
 
 
 
+[endsect]
+
 
 [endsect]
 
 
-[section:expires_at deadline_timer_service::expires_at]
+[endsect]
 
-Get the expiry time for the timer as an absolute time.
+[section:mutable_buffers_1 mutable_buffers_1]
 
- time_type ``[link boost_asio.reference.deadline_timer_service.expires_at.overload1 expires_at]``(
- const implementation_type & impl) const;
+Adapts a single modifiable buffer so that it meets the requirements of the MutableBufferSequence concept.
 
- std::size_t ``[link boost_asio.reference.deadline_timer_service.expires_at.overload2 expires_at]``(
- implementation_type & impl,
- const time_type & expiry_time,
- boost::system::error_code & ec);
+ class mutable_buffers_1 :
+ public mutable_buffer
 
 
-[section:overload1 deadline_timer_service::expires_at (1 of 2 overloads)]
+[heading Types]
+[table
+ [[Name][Description]]
 
-Get the expiry time for the timer as an absolute time.
+ [
 
- time_type expires_at(
- const implementation_type & impl) const;
+ [[link boost_asio.reference.mutable_buffers_1.const_iterator [*const_iterator]]]
+ [A random-access iterator type that may be used to read elements. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.mutable_buffers_1.value_type [*value_type]]]
+ [The type for each element in the list of buffers. ]
+
+ ]
 
-[endsect]
+]
 
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.mutable_buffers_1.begin [*begin]]]
+ [Get a random-access iterator to the first element. ]
+ ]
+
+ [
+ [[link boost_asio.reference.mutable_buffers_1.end [*end]]]
+ [Get a random-access iterator for one past the last element. ]
+ ]
+
+ [
+ [[link boost_asio.reference.mutable_buffers_1.mutable_buffers_1 [*mutable_buffers_1]]]
+ [Construct to represent a single modifiable buffer. ]
+ ]
+
+]
 
+[heading Related Functions]
+[table
+ [[Name][Description]]
 
-[section:overload2 deadline_timer_service::expires_at (2 of 2 overloads)]
+ [
+ [[link boost_asio.reference.mutable_buffers_1.buffer_cast [*buffer_cast]]]
+ [Cast a non-modifiable buffer to a specified pointer to POD type. ]
+ ]
+
+ [
+ [[link boost_asio.reference.mutable_buffers_1.buffer_size [*buffer_size]]]
+ [Get the number of bytes in a non-modifiable buffer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.mutable_buffers_1.operator_plus_ [*operator+]]]
+ [Create a new modifiable buffer that is offset from the start of another. ]
+ ]
+
+]
 
-Set the expiry time for the timer as an absolute time.
 
- std::size_t expires_at(
- implementation_type & impl,
- const time_type & expiry_time,
- boost::system::error_code & ec);
+[section:begin mutable_buffers_1::begin]
 
+Get a random-access iterator to the first element.
 
+ const_iterator begin() const;
 
-[endsect]
 
 
 [endsect]
 
-[section:expires_from_now deadline_timer_service::expires_from_now]
-
-Get the expiry time for the timer relative to now.
 
- duration_type ``[link boost_asio.reference.deadline_timer_service.expires_from_now.overload1 expires_from_now]``(
- const implementation_type & impl) const;
 
- std::size_t ``[link boost_asio.reference.deadline_timer_service.expires_from_now.overload2 expires_from_now]``(
- implementation_type & impl,
- const duration_type & expiry_time,
- boost::system::error_code & ec);
+[section:buffer_cast mutable_buffers_1::buffer_cast]
 
 
-[section:overload1 deadline_timer_service::expires_from_now (1 of 2 overloads)]
+['Inherited from mutable_buffer.]
 
-Get the expiry time for the timer relative to now.
+Cast a non-modifiable buffer to a specified pointer to POD type.
 
- duration_type expires_from_now(
- const implementation_type & impl) const;
+ template<
+ typename ``[link boost_asio.reference.PointerToPodType PointerToPodType]``>
+ PointerToPodType buffer_cast(
+ const mutable_buffer & b);
 
 
 
@@ -22878,31 +42599,28 @@
 
 
 
-[section:overload2 deadline_timer_service::expires_from_now (2 of 2 overloads)]
+[section:buffer_size mutable_buffers_1::buffer_size]
 
-Set the expiry time for the timer relative to now.
 
- std::size_t expires_from_now(
- implementation_type & impl,
- const duration_type & expiry_time,
- boost::system::error_code & ec);
+['Inherited from mutable_buffer.]
 
+Get the number of bytes in a non-modifiable buffer.
 
+ std::size_t buffer_size(
+ const mutable_buffer & b);
 
-[endsect]
 
 
 [endsect]
 
 
-[section:get_io_service deadline_timer_service::get_io_service]
 
+[section:const_iterator mutable_buffers_1::const_iterator]
 
-['Inherited from io_service.]
+A random-access iterator type that may be used to read elements.
 
-Get the io_service object that owns the service.
+ typedef const mutable_buffer * const_iterator;
 
- boost::asio::io_service & get_io_service();
 
 
 
@@ -22910,11 +42628,11 @@
 
 
 
-[section:id deadline_timer_service::id]
+[section:end mutable_buffers_1::end]
 
-The unique service identifier.
+Get a random-access iterator for one past the last element.
 
- static boost::asio::io_service::id id;
+ const_iterator end() const;
 
 
 
@@ -22922,39 +42640,41 @@
 
 
 
-[section:implementation_type deadline_timer_service::implementation_type]
-
-The implementation type of the deadline timer.
+[section:mutable_buffers_1 mutable_buffers_1::mutable_buffers_1]
 
- typedef implementation_defined implementation_type;
+Construct to represent a single modifiable buffer.
 
+ mutable_buffers_1(
+ const mutable_buffer & b);
 
 
 
 [endsect]
 
 
+[section:operator_plus_ mutable_buffers_1::operator+]
 
-[section:io_service deadline_timer_service::io_service]
-
-
-['Inherited from io_service.]
-
-(Deprecated: use get_io_service().) Get the io_service object that owns the service.
-
- boost::asio::io_service & io_service();
+Create a new modifiable buffer that is offset from the start of another.
 
+ mutable_buffer ``[link boost_asio.reference.mutable_buffers_1.operator_plus_.overload1 operator+]``(
+ const mutable_buffer & b,
+ std::size_t start);
 
+ mutable_buffer ``[link boost_asio.reference.mutable_buffers_1.operator_plus_.overload2 operator+]``(
+ std::size_t start,
+ const mutable_buffer & b);
 
-[endsect]
 
+[section:overload1 mutable_buffers_1::operator+ (1 of 2 overloads)]
 
 
-[section:shutdown_service deadline_timer_service::shutdown_service]
+['Inherited from mutable_buffer.]
 
-Destroy all user-defined handler objects owned by the service.
+Create a new modifiable buffer that is offset from the start of another.
 
- void shutdown_service();
+ mutable_buffer operator+(
+ const mutable_buffer & b,
+ std::size_t start);
 
 
 
@@ -22962,39 +42682,65 @@
 
 
 
-[section:time_type deadline_timer_service::time_type]
-
-The time type.
-
- typedef traits_type::time_type time_type;
+[section:overload2 mutable_buffers_1::operator+ (2 of 2 overloads)]
 
 
+['Inherited from mutable_buffer.]
 
+Create a new modifiable buffer that is offset from the start of another.
 
-[endsect]
+ mutable_buffer operator+(
+ std::size_t start,
+ const mutable_buffer & b);
 
 
 
-[section:traits_type deadline_timer_service::traits_type]
+[endsect]
 
-The time traits type.
 
- typedef TimeTraits traits_type;
+[endsect]
 
 
+[section:value_type mutable_buffers_1::value_type]
 
+The type for each element in the list of buffers.
 
-[endsect]
+ typedef mutable_buffer value_type;
 
 
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
-[section:wait deadline_timer_service::wait]
+ [
+ [[link boost_asio.reference.mutable_buffer.mutable_buffer [*mutable_buffer]]]
+ [Construct an empty buffer. ]
+ ]
+
+]
 
+[heading Related Functions]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.mutable_buffer.buffer_cast [*buffer_cast]]]
+ [Cast a non-modifiable buffer to a specified pointer to POD type. ]
+ ]
+
+ [
+ [[link boost_asio.reference.mutable_buffer.buffer_size [*buffer_size]]]
+ [Get the number of bytes in a non-modifiable buffer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.mutable_buffer.operator_plus_ [*operator+]]]
+ [Create a new modifiable buffer that is offset from the start of another. ]
+ ]
+
+]
 
- void wait(
- implementation_type & impl,
- boost::system::error_code & ec);
+The mutable_buffer class provides a safe representation of a buffer that can be modified. It does not own the underlying data, and so is cheap to copy or assign.
 
 
 
@@ -23004,228 +42750,142 @@
 
 [endsect]
 
+[section:null_buffers null_buffers]
 
-[section:error__addrinfo_category error::addrinfo_category]
-
-
-
- static const boost::system::error_category & addrinfo_category = boost::asio::error::get_addrinfo_category();
-
+An implementation of both the ConstBufferSequence and MutableBufferSequence concepts to represent a null buffer sequence.
 
+ class null_buffers
 
-[endsect]
 
+[heading Types]
+[table
+ [[Name][Description]]
 
+ [
 
-[section:error__addrinfo_errors error::addrinfo_errors]
+ [[link boost_asio.reference.null_buffers.const_iterator [*const_iterator]]]
+ [A random-access iterator type that may be used to read elements. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.null_buffers.value_type [*value_type]]]
+ [The type for each element in the list of buffers. ]
+
+ ]
 
- enum addrinfo_errors
+]
 
-[heading Values]
-[variablelist
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
   [
- [service_not_found]
- [The service is not supported for the given socket type. ]
+ [[link boost_asio.reference.null_buffers.begin [*begin]]]
+ [Get a random-access iterator to the first element. ]
   ]
-
+
   [
- [socket_type_not_supported]
- [The socket type is not supported. ]
+ [[link boost_asio.reference.null_buffers.end [*end]]]
+ [Get a random-access iterator for one past the last element. ]
   ]
-
+
 ]
 
 
+[section:begin null_buffers::begin]
 
-[endsect]
-
-
-
-[section:error__basic_errors error::basic_errors]
+Get a random-access iterator to the first element.
 
+ const_iterator begin() const;
 
 
- enum basic_errors
 
-[heading Values]
-[variablelist
+[endsect]
 
- [
- [access_denied]
- [Permission denied. ]
- ]
 
- [
- [address_family_not_supported]
- [Address family not supported by protocol. ]
- ]
 
- [
- [address_in_use]
- [Address already in use. ]
- ]
+[section:const_iterator null_buffers::const_iterator]
 
- [
- [already_connected]
- [Transport endpoint is already connected. ]
- ]
+A random-access iterator type that may be used to read elements.
 
- [
- [already_started]
- [Operation already in progress. ]
- ]
+ typedef const mutable_buffer * const_iterator;
 
- [
- [broken_pipe]
- [Broken pipe. ]
- ]
 
- [
- [connection_aborted]
- [A connection has been aborted. ]
- ]
 
- [
- [connection_refused]
- [Connection refused. ]
- ]
 
- [
- [connection_reset]
- [Connection reset by peer. ]
- ]
+[endsect]
 
- [
- [bad_descriptor]
- [Bad file descriptor. ]
- ]
 
- [
- [fault]
- [Bad address. ]
- ]
 
- [
- [host_unreachable]
- [No route to host. ]
- ]
+[section:end null_buffers::end]
 
- [
- [in_progress]
- [Operation now in progress. ]
- ]
+Get a random-access iterator for one past the last element.
 
- [
- [interrupted]
- [Interrupted system call. ]
- ]
+ const_iterator end() const;
 
- [
- [invalid_argument]
- [Invalid argument. ]
- ]
 
- [
- [message_size]
- [Message too long. ]
- ]
 
- [
- [network_down]
- [Network is down. ]
- ]
+[endsect]
 
- [
- [network_reset]
- [Network dropped connection on reset. ]
- ]
 
- [
- [network_unreachable]
- [Network is unreachable. ]
- ]
 
- [
- [no_descriptors]
- [Too many open files. ]
- ]
+[section:value_type null_buffers::value_type]
 
- [
- [no_buffer_space]
- [No buffer space available. ]
- ]
+The type for each element in the list of buffers.
 
- [
- [no_memory]
- [Cannot allocate memory. ]
- ]
+ typedef mutable_buffer value_type;
 
- [
- [no_permission]
- [Operation not permitted. ]
- ]
 
- [
- [no_protocol_option]
- [Protocol not available. ]
- ]
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
   [
- [not_connected]
- [Transport endpoint is not connected. ]
+ [[link boost_asio.reference.mutable_buffer.mutable_buffer [*mutable_buffer]]]
+ [Construct an empty buffer. ]
   ]
+
+]
 
- [
- [not_socket]
- [Socket operation on non-socket. ]
- ]
+[heading Related Functions]
+[table
+ [[Name][Description]]
 
   [
- [operation_aborted]
- [Operation cancelled. ]
+ [[link boost_asio.reference.mutable_buffer.buffer_cast [*buffer_cast]]]
+ [Cast a non-modifiable buffer to a specified pointer to POD type. ]
   ]
-
+
   [
- [operation_not_supported]
- [Operation not supported. ]
+ [[link boost_asio.reference.mutable_buffer.buffer_size [*buffer_size]]]
+ [Get the number of bytes in a non-modifiable buffer. ]
   ]
-
+
   [
- [shut_down]
- [Cannot send after transport endpoint shutdown. ]
+ [[link boost_asio.reference.mutable_buffer.operator_plus_ [*operator+]]]
+ [Create a new modifiable buffer that is offset from the start of another. ]
   ]
+
+]
 
- [
- [timed_out]
- [Connection timed out. ]
- ]
+The mutable_buffer class provides a safe representation of a buffer that can be modified. It does not own the underlying data, and so is cheap to copy or assign.
 
- [
- [try_again]
- [Resource temporarily unavailable. ]
- ]
 
- [
- [would_block]
- [The socket is marked non-blocking and the requested operation would block. ]
- ]
 
-]
+[endsect]
 
 
 
 [endsect]
 
 
+[section:placeholders__bytes_transferred placeholders::bytes_transferred]
 
-[section:error__get_addrinfo_category error::get_addrinfo_category]
-
-
+An argument placeholder, for use with boost::bind(), that corresponds to the bytes_transferred argument of a handler for asynchronous functions such as boost::asio::basic_stream_socket::async_write_some or boost::asio::async_write.
 
- const boost::system::error_category & get_addrinfo_category();
+ unspecified bytes_transferred;
 
 
 
@@ -23233,11 +42893,11 @@
 
 
 
-[section:error__get_misc_category error::get_misc_category]
-
+[section:placeholders__error placeholders::error]
 
+An argument placeholder, for use with boost::bind(), that corresponds to the error argument of a handler for any of the asynchronous functions.
 
- const boost::system::error_category & get_misc_category();
+ unspecified error;
 
 
 
@@ -23245,80 +42905,187 @@
 
 
 
-[section:error__get_netdb_category error::get_netdb_category]
-
+[section:placeholders__iterator placeholders::iterator]
 
+An argument placeholder, for use with boost::bind(), that corresponds to the iterator argument of a handler for asynchronous functions such as boost::asio::basic_resolver::resolve.
 
- const boost::system::error_category & get_netdb_category();
+ unspecified iterator;
 
 
 
 [endsect]
 
 
+[section:posix__basic_descriptor posix::basic_descriptor]
 
-[section:error__get_ssl_category error::get_ssl_category]
-
+Provides POSIX descriptor functionality.
 
+ template<
+ typename ``[link boost_asio.reference.DescriptorService DescriptorService]``>
+ class basic_descriptor :
+ public basic_io_object< DescriptorService >,
+ public posix::descriptor_base
 
- const boost::system::error_category & get_ssl_category();
 
+[heading Types]
+[table
+ [[Name][Description]]
 
+ [
 
-[endsect]
+ [[link boost_asio.reference.posix__basic_descriptor.bytes_readable [*bytes_readable]]]
+ [IO control command to get the amount of data that can be read without blocking. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.posix__basic_descriptor.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
 
-[section:error__get_system_category error::get_system_category]
+ [
 
+ [[link boost_asio.reference.posix__basic_descriptor.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_descriptor is always the lowest layer. ]
+
+ ]
 
+ [
 
- const boost::system::error_category & get_system_category();
+ [[link boost_asio.reference.posix__basic_descriptor.native_type [*native_type]]]
+ [The native representation of a descriptor. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.posix__basic_descriptor.non_blocking_io [*non_blocking_io]]]
+ [IO control command to set the blocking mode of the descriptor. ]
+
+ ]
 
-[endsect]
+ [
 
+ [[link boost_asio.reference.posix__basic_descriptor.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
+
+ ]
 
-[section:error__make_error_code error::make_error_code]
+]
 
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.assign [*assign]]]
+ [Assign an existing native descriptor to the descriptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.basic_descriptor [*basic_descriptor]]]
+ [Construct a basic_descriptor without opening it. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the descriptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.close [*close]]]
+ [Close the descriptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.io_control [*io_control]]]
+ [Perform an IO control command on the descriptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.is_open [*is_open]]]
+ [Determine whether the descriptor is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.native [*native]]]
+ [Get the native descriptor representation. ]
+ ]
+
+]
 
- boost::system::error_code ``[link boost_asio.reference.error__make_error_code.overload1 make_error_code]``(
- basic_errors e);
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
 
- boost::system::error_code ``[link boost_asio.reference.error__make_error_code.overload2 make_error_code]``(
- netdb_errors e);
+ [
+ [[link boost_asio.reference.posix__basic_descriptor._basic_descriptor [*~basic_descriptor]]]
+ [Protected destructor to prevent deletion through this type. ]
+ ]
+
+]
 
- boost::system::error_code ``[link boost_asio.reference.error__make_error_code.overload3 make_error_code]``(
- addrinfo_errors e);
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
 
- boost::system::error_code ``[link boost_asio.reference.error__make_error_code.overload4 make_error_code]``(
- misc_errors e);
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
 
- boost::system::error_code ``[link boost_asio.reference.error__make_error_code.overload5 make_error_code]``(
- ssl_errors e);
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
 
+]
 
-[section:overload1 error::make_error_code (1 of 5 overloads)]
+The posix::basic_descriptor class template provides the ability to wrap a POSIX descriptor.
 
 
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
- boost::system::error_code make_error_code(
- basic_errors e);
+[*Shared] [*objects:] Unsafe.
 
 
+[section:assign posix::basic_descriptor::assign]
 
-[endsect]
+Assign an existing native descriptor to the descriptor.
 
+ void ``[link boost_asio.reference.posix__basic_descriptor.assign.overload1 assign]``(
+ const native_type & native_descriptor);
 
+ boost::system::error_code ``[link boost_asio.reference.posix__basic_descriptor.assign.overload2 assign]``(
+ const native_type & native_descriptor,
+ boost::system::error_code & ec);
 
-[section:overload2 error::make_error_code (2 of 5 overloads)]
 
+[section:overload1 posix::basic_descriptor::assign (1 of 2 overloads)]
 
+Assign an existing native descriptor to the descriptor.
 
- boost::system::error_code make_error_code(
- netdb_errors e);
+ void assign(
+ const native_type & native_descriptor);
 
 
 
@@ -23326,87 +43093,88 @@
 
 
 
-[section:overload3 error::make_error_code (3 of 5 overloads)]
-
+[section:overload2 posix::basic_descriptor::assign (2 of 2 overloads)]
 
+Assign an existing native descriptor to the descriptor.
 
- boost::system::error_code make_error_code(
- addrinfo_errors e);
+ boost::system::error_code assign(
+ const native_type & native_descriptor,
+ boost::system::error_code & ec);
 
 
 
 [endsect]
 
 
+[endsect]
 
-[section:overload4 error::make_error_code (4 of 5 overloads)]
-
+[section:basic_descriptor posix::basic_descriptor::basic_descriptor]
 
+Construct a basic_descriptor without opening it.
 
- boost::system::error_code make_error_code(
- misc_errors e);
+ ``[link boost_asio.reference.posix__basic_descriptor.basic_descriptor.overload1 basic_descriptor]``(
+ boost::asio::io_service & io_service);
 
+ ``[link boost_asio.reference.posix__basic_descriptor.basic_descriptor.overload2 basic_descriptor]``(
+ boost::asio::io_service & io_service,
+ const native_type & native_descriptor);
 
 
-[endsect]
+[section:overload1 posix::basic_descriptor::basic_descriptor (1 of 2 overloads)]
 
+Construct a basic_descriptor without opening it.
 
+ basic_descriptor(
+ boost::asio::io_service & io_service);
 
-[section:overload5 error::make_error_code (5 of 5 overloads)]
 
+This constructor creates a descriptor without opening it.
 
 
- boost::system::error_code make_error_code(
- ssl_errors e);
+[heading Parameters]
+
 
+[variablelist
+
+[[io_service][The io\_service object that the descriptor will use to dispatch handlers for any asynchronous operations performed on the descriptor. ]]
 
+]
 
-[endsect]
 
 
 [endsect]
 
 
-[section:error__misc_category error::misc_category]
-
-
-
- static const boost::system::error_category & misc_category = boost::asio::error::get_misc_category();
-
-
 
-[endsect]
+[section:overload2 posix::basic_descriptor::basic_descriptor (2 of 2 overloads)]
 
+Construct a basic_descriptor on an existing native descriptor.
 
+ basic_descriptor(
+ boost::asio::io_service & io_service,
+ const native_type & native_descriptor);
 
-[section:error__misc_errors error::misc_errors]
 
+This constructor creates a descriptor object to hold an existing native descriptor.
 
 
- enum misc_errors
+[heading Parameters]
+
 
-[heading Values]
 [variablelist
+
+[[io_service][The io\_service object that the descriptor will use to dispatch handlers for any asynchronous operations performed on the descriptor.]]
 
- [
- [already_open]
- [Already open. ]
- ]
+[[native_descriptor][A native descriptor.]]
 
- [
- [eof]
- [End of file or stream. ]
- ]
+]
 
- [
- [not_found]
- [Element not found. ]
- ]
+[heading Exceptions]
+
 
- [
- [fd_set_failure]
- [The descriptor cannot fit into the select system call's fd_set. ]
- ]
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
 
 ]
 
@@ -23415,76 +43183,67 @@
 [endsect]
 
 
-
-[section:error__netdb_category error::netdb_category]
-
-
-
- static const boost::system::error_category & netdb_category = boost::asio::error::get_netdb_category();
-
-
-
 [endsect]
 
 
+[section:bytes_readable posix::basic_descriptor::bytes_readable]
 
-[section:error__netdb_errors error::netdb_errors]
 
+['Inherited from posix::descriptor_base.]
 
+IO control command to get the amount of data that can be read without blocking.
 
- enum netdb_errors
+ typedef implementation_defined bytes_readable;
 
-[heading Values]
-[variablelist
 
- [
- [host_not_found]
- [Host not found (authoritative). ]
- ]
 
- [
- [host_not_found_try_again]
- [Host not found (non-authoritative). ]
- ]
+Implements the FIONREAD IO control command.
+
 
- [
- [no_data]
- [The query is valid but does not have associated address data. ]
- ]
+[heading Example]
+
 
- [
- [no_recovery]
- [A non-recoverable error occurred. ]
- ]
 
-]
+ boost::asio::posix::stream_descriptor descriptor(io_service);
+ ...
+ boost::asio::descriptor_base::bytes_readable command(true);
+ descriptor.io_control(command);
+ std::size_t bytes_readable = command.get();
 
 
 
-[endsect]
 
 
 
-[section:error__ssl_category error::ssl_category]
+[endsect]
 
 
+[section:cancel posix::basic_descriptor::cancel]
 
- static const boost::system::error_category & ssl_category = boost::asio::error::get_ssl_category();
+Cancel all asynchronous operations associated with the descriptor.
 
+ void ``[link boost_asio.reference.posix__basic_descriptor.cancel.overload1 cancel]``();
 
+ boost::system::error_code ``[link boost_asio.reference.posix__basic_descriptor.cancel.overload2 cancel]``(
+ boost::system::error_code & ec);
 
-[endsect]
 
+[section:overload1 posix::basic_descriptor::cancel (1 of 2 overloads)]
 
+Cancel all asynchronous operations associated with the descriptor.
 
-[section:error__ssl_errors error::ssl_errors]
+ void cancel();
 
 
+This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the boost::asio::error::operation\_aborted error.
 
- enum ssl_errors
 
-[heading Values]
+[heading Exceptions]
+
+
 [variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
 
 ]
 
@@ -23494,269 +43253,176 @@
 
 
 
-[section:error__system_category error::system_category]
+[section:overload2 posix::basic_descriptor::cancel (2 of 2 overloads)]
 
+Cancel all asynchronous operations associated with the descriptor.
 
+ boost::system::error_code cancel(
+ boost::system::error_code & ec);
+
+
+This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the boost::asio::error::operation\_aborted error.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[ec][Set to indicate what error occurred, if any. ]]
+
+]
 
- static const boost::system::error_category & system_category = boost::asio::error::get_system_category();
 
 
+[endsect]
+
 
 [endsect]
 
+[section:close posix::basic_descriptor::close]
 
+Close the descriptor.
 
-[section:has_service has_service]
+ void ``[link boost_asio.reference.posix__basic_descriptor.close.overload1 close]``();
 
+ boost::system::error_code ``[link boost_asio.reference.posix__basic_descriptor.close.overload2 close]``(
+ boost::system::error_code & ec);
 
 
- template<
- typename ``[link boost_asio.reference.Service Service]``>
- bool has_service(
- io_service & ios);
+[section:overload1 posix::basic_descriptor::close (1 of 2 overloads)]
 
+Close the descriptor.
 
-This function is used to determine whether the io_service contains a service object corresponding to the given service type.
+ void close();
 
 
-[heading Parameters]
+This function is used to close the descriptor. Any asynchronous read or write operations will be cancelled immediately, and will complete with the boost::asio::error::operation\_aborted error.
+
+
+[heading Exceptions]
     
 
 [variablelist
   
-[[ios][The io\_service object that owns the service.]]
+[[boost::system::system_error][Thrown on failure. ]]
 
 ]
 
-[heading Return Value]
-
-A boolean indicating whether the io_service contains the service.
-
 
 
 [endsect]
 
 
-[section:invalid_service_owner invalid_service_owner]
-
-Exception thrown when trying to add a service object to an io_service where the service has a different owner.
 
- class invalid_service_owner
+[section:overload2 posix::basic_descriptor::close (2 of 2 overloads)]
 
+Close the descriptor.
 
-[heading Member Functions]
-[table
- [[Name][Description]]
+ boost::system::error_code close(
+ boost::system::error_code & ec);
 
- [
- [[link boost_asio.reference.invalid_service_owner.invalid_service_owner [*invalid_service_owner]]]
- []
- ]
-
-]
 
+This function is used to close the descriptor. Any asynchronous read or write operations will be cancelled immediately, and will complete with the boost::asio::error::operation\_aborted error.
 
-[section:invalid_service_owner invalid_service_owner::invalid_service_owner]
 
+[heading Parameters]
+
 
+[variablelist
+
+[[ec][Set to indicate what error occurred, if any. ]]
 
- invalid_service_owner();
+]
 
 
 
 [endsect]
 
 
-
 [endsect]
 
-[section:io_service io_service]
 
-Provides core I/O functionality.
+[section:get_io_service posix::basic_descriptor::get_io_service]
 
- class io_service :
- noncopyable
 
+['Inherited from basic_io_object.]
 
-[heading Types]
-[table
- [[Name][Description]]
+Get the io_service associated with the object.
 
- [
+ boost::asio::io_service & get_io_service();
 
- [[link boost_asio.reference.io_service__id [*id]]]
- [Class used to uniquely identify a service. ]
-
- ]
 
- [
+This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
 
- [[link boost_asio.reference.io_service__service [*service]]]
- [Base class for all io_service services. ]
-
- ]
 
- [
+[heading Return Value]
+
+A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
 
- [[link boost_asio.reference.io_service__strand [*strand]]]
- [Provides serialised handler execution. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.io_service__work [*work]]]
- [Class to inform the io_service when it has work to do. ]
-
- ]
+[endsect]
 
-]
 
-[heading Member Functions]
-[table
- [[Name][Description]]
 
- [
- [[link boost_asio.reference.io_service.dispatch [*dispatch]]]
- [Request the io_service to invoke the given handler. ]
- ]
-
- [
- [[link boost_asio.reference.io_service.io_service [*io_service]]]
- [Constructor. ]
- ]
-
- [
- [[link boost_asio.reference.io_service.poll [*poll]]]
- [Run the io_service's event processing loop to execute ready handlers. ]
- ]
-
- [
- [[link boost_asio.reference.io_service.poll_one [*poll_one]]]
- [Run the io_service's event processing loop to execute one ready handler. ]
- ]
-
- [
- [[link boost_asio.reference.io_service.post [*post]]]
- [Request the io_service to invoke the given handler and return immediately. ]
- ]
-
- [
- [[link boost_asio.reference.io_service.reset [*reset]]]
- [Reset the io_service in preparation for a subsequent run() invocation. ]
- ]
-
- [
- [[link boost_asio.reference.io_service.run [*run]]]
- [Run the io_service's event processing loop. ]
- ]
-
- [
- [[link boost_asio.reference.io_service.run_one [*run_one]]]
- [Run the io_service's event processing loop to execute at most one handler. ]
- ]
-
- [
- [[link boost_asio.reference.io_service.stop [*stop]]]
- [Stop the io_service's event processing loop. ]
- ]
-
- [
- [[link boost_asio.reference.io_service.wrap [*wrap]]]
- [Create a new handler that automatically dispatches the wrapped handler on the io_service. ]
- ]
-
- [
- [[link boost_asio.reference.io_service._io_service [*~io_service]]]
- [Destructor. ]
- ]
-
-]
+[section:implementation posix::basic_descriptor::implementation]
 
-[heading Friends]
-[table
- [[Name][Description]]
 
- [
- [[link boost_asio.reference.io_service.add_service [*add_service]]]
- [Add a service object to the io_service. ]
- ]
-
- [
- [[link boost_asio.reference.io_service.has_service [*has_service]]]
- [Determine if an io_service contains a specified service type. ]
- ]
-
- [
- [[link boost_asio.reference.io_service.use_service [*use_service]]]
- [Obtain the service object corresponding to the given type. ]
- ]
-
-]
+['Inherited from basic_io_object.]
 
-The io_service class provides the core I/O functionality for users of the asynchronous I/O objects, including:
+The underlying implementation of the I/O object.
 
+ implementation_type implementation;
 
-* boost::asio::ip::tcp::socket
 
-* boost::asio::ip::tcp::acceptor
 
-* boost::asio::ip::udp::socket
+[endsect]
 
-* boost::asio::deadline_timer.
 
-The io_service class also includes facilities intended for developers of custom asynchronous services.
 
+[section:implementation_type posix::basic_descriptor::implementation_type]
 
-[heading Thread Safety]
-
-[*Distinct] [*objects:] Safe.
 
-[*Shared] [*objects:] Safe, with the exception that calling reset() while there are unfinished run() calls results in undefined behaviour.
+['Inherited from basic_io_object.]
 
-[heading Effect of exceptions thrown from handlers]
-
+The underlying implementation type of I/O object.
 
+ typedef service_type::implementation_type implementation_type;
 
-If an exception is thrown from a handler, the exception is allowed to propagate through the throwing thread's invocation of boost::asio::io\_service::run(), boost::asio::io\_service::run\_one(), boost::asio::io\_service::poll() or boost::asio::io\_service::poll\_one(). No other threads that are calling any of these functions are affected. It is then the responsibility of the application to catch the exception.
 
-After the exception has been caught, the boost::asio::io\_service::run(), boost::asio::io\_service::run\_one(), boost::asio::io\_service::poll() or boost::asio::io\_service::poll\_one() call may be restarted [*without] the need for an intervening call to boost::asio::io\_service::reset(). This allows the thread to rejoin the io\_service's thread pool without impacting any other threads in the pool.
 
-For example:
 
+[endsect]
 
 
- boost::asio::io_service io_service;
- ...
- for (;;)
- {
- try
- {
- io_service.run();
- break; // run() exited normally
- }
- catch (my_exception& e)
- {
- // Deal with exception as appropriate.
- }
- }
+[section:io_control posix::basic_descriptor::io_control]
 
+Perform an IO control command on the descriptor.
 
+ template<
+ typename ``[link boost_asio.reference.IoControlCommand IoControlCommand]``>
+ void ``[link boost_asio.reference.posix__basic_descriptor.io_control.overload1 io_control]``(
+ IoControlCommand & command);
 
+ template<
+ typename ``[link boost_asio.reference.IoControlCommand IoControlCommand]``>
+ boost::system::error_code ``[link boost_asio.reference.posix__basic_descriptor.io_control.overload2 io_control]``(
+ IoControlCommand & command,
+ boost::system::error_code & ec);
 
 
-[section:add_service io_service::add_service]
+[section:overload1 posix::basic_descriptor::io_control (1 of 2 overloads)]
 
-Add a service object to the io_service.
+Perform an IO control command on the descriptor.
 
   template<
- typename ``[link boost_asio.reference.Service Service]``>
- friend void add_service(
- io_service & ios,
- Service * svc);
+ typename ``[link boost_asio.reference.IoControlCommand IoControlCommand]``>
+ void io_control(
+ IoControlCommand & command);
 
 
-This function is used to add a service to the io_service.
+This function is used to execute an IO control command on the descriptor.
 
 
 [heading Parameters]
@@ -23764,14 +43430,7 @@
 
 [variablelist
   
-[[ios][The io\_service object that owns the service.]]
-
-[[svc][The service object. On success, ownership of the service object is transferred to the io\_service. When the io\_service object is destroyed, it will destroy the service object by performing:
-``
- delete static_cast<io_service::service*>(svc)
-
-``
-]]
+[[command][The IO control command to be performed on the descriptor.]]
 
 ]
 
@@ -23780,31 +43439,41 @@
 
 [variablelist
   
-[[boost::asio::service_already_exists][Thrown if a service of the given type is already present in the io\_service.]]
-
-[[boost::asio::invalid_service_owner][Thrown if the service's owning io\_service is not the io\_service object specified by the ios parameter. ]]
+[[boost::system::system_error][Thrown on failure.]]
 
 ]
 
+[heading Example]
+
+Getting the number of bytes ready to read:
+
+ boost::asio::posix::stream_descriptor descriptor(io_service);
+ ...
+ boost::asio::posix::stream_descriptor::bytes_readable command;
+ descriptor.io_control(command);
+ std::size_t bytes_readable = command.get();
+
+
+
+
 
 
 [endsect]
 
 
 
-[section:dispatch io_service::dispatch]
+[section:overload2 posix::basic_descriptor::io_control (2 of 2 overloads)]
 
-Request the io_service to invoke the given handler.
+Perform an IO control command on the descriptor.
 
   template<
- typename ``[link boost_asio.reference.CompletionHandler CompletionHandler]``>
- void dispatch(
- CompletionHandler handler);
-
+ typename ``[link boost_asio.reference.IoControlCommand IoControlCommand]``>
+ boost::system::error_code io_control(
+ IoControlCommand & command,
+ boost::system::error_code & ec);
 
-This function is used to ask the io_service to execute the given handler.
 
-The io_service guarantees that the handler will only be called in a thread in which the run(), run\_one(), poll() or poll\_one() member functions is currently being invoked. The handler may be executed inside this function if the guarantee can be met.
+This function is used to execute an IO control command on the descriptor.
 
 
 [heading Parameters]
@@ -23812,270 +43481,330 @@
 
 [variablelist
   
-[[handler][The handler to be called. The io\_service will make a copy of the handler object as required. The function signature of the handler must be:
-``
- void handler();
+[[command][The IO control command to be performed on the descriptor.]]
 
-``
-]]
+[[ec][Set to indicate what error occurred, if any.]]
 
 ]
 
+[heading Example]
+
+Getting the number of bytes ready to read:
 
-
-[endsect]
+ boost::asio::posix::stream_descriptor descriptor(io_service);
+ ...
+ boost::asio::posix::stream_descriptor::bytes_readable command;
+ boost::system::error_code ec;
+ descriptor.io_control(command, ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
+ std::size_t bytes_readable = command.get();
 
 
 
-[section:has_service io_service::has_service]
 
-Determine if an io_service contains a specified service type.
 
- template<
- typename ``[link boost_asio.reference.Service Service]``>
- friend bool has_service(
- io_service & ios);
 
+[endsect]
 
-This function is used to determine whether the io_service contains a service object corresponding to the given service type.
 
+[endsect]
 
-[heading Parameters]
-
 
-[variablelist
-
-[[ios][The io\_service object that owns the service.]]
+[section:io_service posix::basic_descriptor::io_service]
 
-]
 
-[heading Return Value]
-
-A boolean indicating whether the io_service contains the service.
+['Inherited from basic_io_object.]
 
+(Deprecated: use get_io_service().) Get the io_service associated with the object.
 
+ boost::asio::io_service & io_service();
 
-[endsect]
 
+This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
 
-[section:io_service io_service::io_service]
 
-Constructor.
+[heading Return Value]
+
+A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
 
- ``[link boost_asio.reference.io_service.io_service.overload1 io_service]``();
 
- ``[link boost_asio.reference.io_service.io_service.overload2 io_service]``(
- std::size_t concurrency_hint);
 
+[endsect]
 
-[section:overload1 io_service::io_service (1 of 2 overloads)]
 
-Constructor.
 
- io_service();
+[section:is_open posix::basic_descriptor::is_open]
 
+Determine whether the descriptor is open.
 
+ bool is_open() const;
 
-[endsect]
 
 
+[endsect]
 
-[section:overload2 io_service::io_service (2 of 2 overloads)]
 
-Constructor.
 
- io_service(
- std::size_t concurrency_hint);
+[section:lowest_layer posix::basic_descriptor::lowest_layer]
 
+Get a reference to the lowest layer.
 
-Construct with a hint about the required level of concurrency.
+ lowest_layer_type & lowest_layer();
 
 
-[heading Parameters]
-
+This function returns a reference to the lowest layer in a stack of layers. Since a basic_descriptor cannot contain any further layers, it simply returns a reference to itself.
 
-[variablelist
-
-[[concurrency_hint][A suggestion to the implementation on how many threads it should allow to run simultaneously. ]]
 
-]
+[heading Return Value]
+
+A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
 
 
 
 [endsect]
 
 
-[endsect]
 
-[section:poll io_service::poll]
+[section:lowest_layer_type posix::basic_descriptor::lowest_layer_type]
 
-Run the io_service's event processing loop to execute ready handlers.
+A basic_descriptor is always the lowest layer.
 
- std::size_t ``[link boost_asio.reference.io_service.poll.overload1 poll]``();
+ typedef basic_descriptor< DescriptorService > lowest_layer_type;
 
- std::size_t ``[link boost_asio.reference.io_service.poll.overload2 poll]``(
- boost::system::error_code & ec);
 
+[heading Types]
+[table
+ [[Name][Description]]
 
-[section:overload1 io_service::poll (1 of 2 overloads)]
+ [
 
-Run the io_service's event processing loop to execute ready handlers.
+ [[link boost_asio.reference.posix__basic_descriptor.bytes_readable [*bytes_readable]]]
+ [IO control command to get the amount of data that can be read without blocking. ]
+
+ ]
 
- std::size_t poll();
+ [
+
+ [[link boost_asio.reference.posix__basic_descriptor.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
 
+ [
 
-The poll() function runs handlers that are ready to run, without blocking, until the io_service has been stopped or there are no more ready handlers.
+ [[link boost_asio.reference.posix__basic_descriptor.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_descriptor is always the lowest layer. ]
+
+ ]
 
+ [
 
-[heading Return Value]
-
-The number of handlers that were executed.
+ [[link boost_asio.reference.posix__basic_descriptor.native_type [*native_type]]]
+ [The native representation of a descriptor. ]
+
+ ]
 
-[heading Exceptions]
-
+ [
 
-[variablelist
+ [[link boost_asio.reference.posix__basic_descriptor.non_blocking_io [*non_blocking_io]]]
+ [IO control command to set the blocking mode of the descriptor. ]
   
-[[boost::system::system_error][Thrown on failure. ]]
+ ]
 
-]
+ [
 
+ [[link boost_asio.reference.posix__basic_descriptor.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
+
+ ]
 
+]
 
-[endsect]
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.assign [*assign]]]
+ [Assign an existing native descriptor to the descriptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.basic_descriptor [*basic_descriptor]]]
+ [Construct a basic_descriptor without opening it. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the descriptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.close [*close]]]
+ [Close the descriptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.io_control [*io_control]]]
+ [Perform an IO control command on the descriptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.is_open [*is_open]]]
+ [Determine whether the descriptor is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.native [*native]]]
+ [Get the native descriptor representation. ]
+ ]
+
+]
 
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
 
-[section:overload2 io_service::poll (2 of 2 overloads)]
+ [
+ [[link boost_asio.reference.posix__basic_descriptor._basic_descriptor [*~basic_descriptor]]]
+ [Protected destructor to prevent deletion through this type. ]
+ ]
+
+]
 
-Run the io_service's event processing loop to execute ready handlers.
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
 
- std::size_t poll(
- boost::system::error_code & ec);
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
 
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
 
-The poll() function runs handlers that are ready to run, without blocking, until the io_service has been stopped or there are no more ready handlers.
+]
 
+The posix::basic_descriptor class template provides the ability to wrap a POSIX descriptor.
 
-[heading Parameters]
-
 
-[variablelist
+[heading Thread Safety]
   
-[[ec][Set to indicate what error occurred, if any.]]
+[*Distinct] [*objects:] Safe.
 
-]
+[*Shared] [*objects:] Unsafe.
 
-[heading Return Value]
-
-The number of handlers that were executed.
 
 
 
 [endsect]
 
 
-[endsect]
 
-[section:poll_one io_service::poll_one]
+[section:native posix::basic_descriptor::native]
 
-Run the io_service's event processing loop to execute one ready handler.
+Get the native descriptor representation.
 
- std::size_t ``[link boost_asio.reference.io_service.poll_one.overload1 poll_one]``();
+ native_type native();
 
- std::size_t ``[link boost_asio.reference.io_service.poll_one.overload2 poll_one]``(
- boost::system::error_code & ec);
 
+This function may be used to obtain the underlying representation of the descriptor. This is intended to allow access to native descriptor functionality that is not otherwise provided.
 
-[section:overload1 io_service::poll_one (1 of 2 overloads)]
 
-Run the io_service's event processing loop to execute one ready handler.
+[endsect]
 
- std::size_t poll_one();
 
 
-The poll\_one() function runs at most one handler that is ready to run, without blocking.
+[section:native_type posix::basic_descriptor::native_type]
 
+The native representation of a descriptor.
 
-[heading Return Value]
-
-The number of handlers that were executed.
+ typedef DescriptorService::native_type native_type;
 
-[heading Exceptions]
-
 
-[variablelist
-
-[[boost::system::system_error][Thrown on failure. ]]
 
-]
 
+[endsect]
 
 
-[endsect]
 
+[section:non_blocking_io posix::basic_descriptor::non_blocking_io]
 
 
-[section:overload2 io_service::poll_one (2 of 2 overloads)]
+['Inherited from posix::descriptor_base.]
 
-Run the io_service's event processing loop to execute one ready handler.
+IO control command to set the blocking mode of the descriptor.
 
- std::size_t poll_one(
- boost::system::error_code & ec);
+ typedef implementation_defined non_blocking_io;
 
 
-The poll\_one() function runs at most one handler that is ready to run, without blocking.
 
+Implements the FIONBIO IO control command.
 
-[heading Parameters]
-
 
-[variablelist
+[heading Example]
   
-[[ec][Set to indicate what error occurred, if any.]]
 
-]
 
-[heading Return Value]
-
-The number of handlers that were executed.
+ boost::asio::posix::stream_descriptor descriptor(io_service);
+ ...
+ boost::asio::descriptor_base::non_blocking_io command(true);
+ descriptor.io_control(command);
+
+
+
 
 
 
 [endsect]
 
 
-[endsect]
 
+[section:service posix::basic_descriptor::service]
 
-[section:post io_service::post]
 
-Request the io_service to invoke the given handler and return immediately.
+['Inherited from basic_io_object.]
 
- template<
- typename ``[link boost_asio.reference.CompletionHandler CompletionHandler]``>
- void post(
- CompletionHandler handler);
+The service associated with the I/O object.
 
+ service_type & service;
 
-This function is used to ask the io_service to execute the given handler, but without allowing the io_service to call the handler from inside this function.
 
-The io_service guarantees that the handler will only be called in a thread in which the run(), run\_one(), poll() or poll\_one() member functions is currently being invoked.
+
+[endsect]
 
 
-[heading Parameters]
-
 
-[variablelist
-
-[[handler][The handler to be called. The io\_service will make a copy of the handler object as required. The function signature of the handler must be:
-``
- void handler();
+[section:service_type posix::basic_descriptor::service_type]
 
-``
-]]
 
-]
+['Inherited from basic_io_object.]
+
+The type of the service that will be used to provide I/O operations.
+
+ typedef DescriptorService service_type;
+
 
 
 
@@ -24083,147 +43812,296 @@
 
 
 
-[section:reset io_service::reset]
+[section:_basic_descriptor posix::basic_descriptor::~basic_descriptor]
 
-Reset the io_service in preparation for a subsequent run() invocation.
+Protected destructor to prevent deletion through this type.
 
- void reset();
+ ~basic_descriptor();
 
 
-This function must be called prior to any second or later set of invocations of the run(), run\_one(), poll() or poll\_one() functions when a previous invocation of these functions returned due to the io_service being stopped or running out of work. This function allows the io_service to reset any internal state, such as a "stopped" flag.
 
-This function must not be called while there are any unfinished calls to the run(), run\_one(), poll() or poll\_one() functions.
+[endsect]
+
 
 
 [endsect]
 
+[section:posix__basic_stream_descriptor posix::basic_stream_descriptor]
 
-[section:run io_service::run]
+Provides stream-oriented descriptor functionality.
 
-Run the io_service's event processing loop.
+ template<
+ typename ``[link boost_asio.reference.StreamDescriptorService StreamDescriptorService]`` = stream_descriptor_service>
+ class basic_stream_descriptor :
+ public posix::basic_descriptor< StreamDescriptorService >
 
- std::size_t ``[link boost_asio.reference.io_service.run.overload1 run]``();
 
- std::size_t ``[link boost_asio.reference.io_service.run.overload2 run]``(
- boost::system::error_code & ec);
+[heading Types]
+[table
+ [[Name][Description]]
 
+ [
 
-[section:overload1 io_service::run (1 of 2 overloads)]
+ [[link boost_asio.reference.posix__basic_stream_descriptor.bytes_readable [*bytes_readable]]]
+ [IO control command to get the amount of data that can be read without blocking. ]
+
+ ]
 
-Run the io_service's event processing loop.
+ [
 
- std::size_t run();
+ [[link boost_asio.reference.posix__basic_stream_descriptor.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
 
+ [
 
-The run() function blocks until all work has finished and there are no more handlers to be dispatched, or until the io_service has been stopped.
+ [[link boost_asio.reference.posix__basic_stream_descriptor.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_descriptor is always the lowest layer. ]
+
+ ]
 
-Multiple threads may call the run() function to set up a pool of threads from which the io_service may execute handlers. All threads that are waiting in the pool are equivalent and the io_service may choose any one of them to invoke a handler.
+ [
 
-The run() function may be safely called again once it has completed only after a call to reset().
+ [[link boost_asio.reference.posix__basic_stream_descriptor.native_type [*native_type]]]
+ [The native representation of a descriptor. ]
+
+ ]
 
+ [
 
-[heading Return Value]
-
-The number of handlers that were executed.
+ [[link boost_asio.reference.posix__basic_stream_descriptor.non_blocking_io [*non_blocking_io]]]
+ [IO control command to set the blocking mode of the descriptor. ]
+
+ ]
 
-[heading Exceptions]
-
+ [
 
-[variablelist
+ [[link boost_asio.reference.posix__basic_stream_descriptor.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
   
-[[boost::system::system_error][Thrown on failure. ]]
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.posix__basic_stream_descriptor.assign [*assign]]]
+ [Assign an existing native descriptor to the descriptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_stream_descriptor.async_read_some [*async_read_some]]]
+ [Start an asynchronous read. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_stream_descriptor.async_write_some [*async_write_some]]]
+ [Start an asynchronous write. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_stream_descriptor.basic_stream_descriptor [*basic_stream_descriptor]]]
+ [Construct a basic_stream_descriptor without opening it. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_stream_descriptor.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the descriptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_stream_descriptor.close [*close]]]
+ [Close the descriptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_stream_descriptor.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_stream_descriptor.io_control [*io_control]]]
+ [Perform an IO control command on the descriptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_stream_descriptor.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_stream_descriptor.is_open [*is_open]]]
+ [Determine whether the descriptor is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_stream_descriptor.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_stream_descriptor.native [*native]]]
+ [Get the native descriptor representation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_stream_descriptor.read_some [*read_some]]]
+ [Read some data from the descriptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_stream_descriptor.write_some [*write_some]]]
+ [Write some data to the descriptor. ]
+ ]
+
 ]
 
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.posix__basic_stream_descriptor.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
 
-[endsect]
+ [
+ [[link boost_asio.reference.posix__basic_stream_descriptor.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
 
+]
 
+The posix::basic_stream_descriptor class template provides asynchronous and blocking stream-oriented descriptor functionality.
 
-[section:overload2 io_service::run (2 of 2 overloads)]
 
-Run the io_service's event processing loop.
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
- std::size_t run(
- boost::system::error_code & ec);
+[*Shared] [*objects:] Unsafe.
 
 
-The run() function blocks until all work has finished and there are no more handlers to be dispatched, or until the io_service has been stopped.
+[section:assign posix::basic_stream_descriptor::assign]
 
-Multiple threads may call the run() function to set up a pool of threads from which the io_service may execute handlers. All threads that are waiting in the pool are equivalent and the io_service may choose any one of them to invoke a handler.
+Assign an existing native descriptor to the descriptor.
 
-The run() function may be safely called again once it has completed only after a call to reset().
+ void ``[link boost_asio.reference.posix__basic_stream_descriptor.assign.overload1 assign]``(
+ const native_type & native_descriptor);
 
+ boost::system::error_code ``[link boost_asio.reference.posix__basic_stream_descriptor.assign.overload2 assign]``(
+ const native_type & native_descriptor,
+ boost::system::error_code & ec);
 
-[heading Parameters]
-
 
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
+[section:overload1 posix::basic_stream_descriptor::assign (1 of 2 overloads)]
 
-]
 
-[heading Return Value]
-
-The number of handlers that were executed.
+['Inherited from posix::basic_descriptor.]
 
+Assign an existing native descriptor to the descriptor.
 
+ void assign(
+ const native_type & native_descriptor);
 
-[endsect]
 
 
 [endsect]
 
-[section:run_one io_service::run_one]
 
-Run the io_service's event processing loop to execute at most one handler.
 
- std::size_t ``[link boost_asio.reference.io_service.run_one.overload1 run_one]``();
+[section:overload2 posix::basic_stream_descriptor::assign (2 of 2 overloads)]
 
- std::size_t ``[link boost_asio.reference.io_service.run_one.overload2 run_one]``(
+
+['Inherited from posix::basic_descriptor.]
+
+Assign an existing native descriptor to the descriptor.
+
+ boost::system::error_code assign(
+ const native_type & native_descriptor,
       boost::system::error_code & ec);
 
 
-[section:overload1 io_service::run_one (1 of 2 overloads)]
 
-Run the io_service's event processing loop to execute at most one handler.
+[endsect]
 
- std::size_t run_one();
 
+[endsect]
 
-The run\_one() function blocks until one handler has been dispatched, or until the io_service has been stopped.
 
+[section:async_read_some posix::basic_stream_descriptor::async_read_some]
 
-[heading Return Value]
-
-The number of handlers that were executed.
+Start an asynchronous read.
 
-[heading Exceptions]
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_read_some(
+ const MutableBufferSequence & buffers,
+ ReadHandler handler);
+
+
+This function is used to asynchronously read data from the stream descriptor. The function call always returns immediately.
+
+
+[heading Parameters]
     
 
 [variablelist
   
-[[boost::system::system_error][Thrown on failure. ]]
+[[buffers][One or more buffers into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+
+[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ std::size_t bytes_transferred // Number of bytes read.
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
 
 ]
 
+[heading Remarks]
+
+The read operation may not read all of the requested number of bytes. Consider using the
+[link boost_asio.reference.async_read async_read] function if you need to ensure that the requested amount of data is read before the asynchronous operation completes.
+
+[heading Example]
+
+To read into a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ descriptor.async_read_some(boost::asio::buffer(data, size), handler);
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+
 
 
 [endsect]
 
 
 
-[section:overload2 io_service::run_one (2 of 2 overloads)]
+[section:async_write_some posix::basic_stream_descriptor::async_write_some]
 
-Run the io_service's event processing loop to execute at most one handler.
+Start an asynchronous write.
 
- std::size_t run_one(
- boost::system::error_code & ec);
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_write_some(
+ const ConstBufferSequence & buffers,
+ WriteHandler handler);
 
 
-The run\_one() function blocks until one handler has been dispatched, or until the io_service has been stopped.
+This function is used to asynchronously write data to the stream descriptor. The function call always returns immediately.
 
 
 [heading Parameters]
@@ -24231,47 +44109,62 @@
 
 [variablelist
   
-[[ec][Set to indicate what error occurred, if any.]]
+[[buffers][One or more data buffers to be written to the descriptor. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
 
-]
+[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ std::size_t bytes_transferred // Number of bytes written.
+ );
 
-[heading Return Value]
-
-The number of handlers that were executed.
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
 
+]
 
+[heading Remarks]
+
+The write operation may not transmit all of the data to the peer. Consider using the
+[link boost_asio.reference.async_write async_write] function if you need to ensure that all data is written before the asynchronous operation completes.
 
-[endsect]
+[heading Example]
+
+To write a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
 
+ descriptor.async_write_some(boost::asio::buffer(data, size), handler);
 
-[endsect]
 
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
-[section:stop io_service::stop]
 
-Stop the io_service's event processing loop.
 
- void stop();
+[endsect]
 
 
-This function does not block, but instead simply signals the io_service to stop. All invocations of its run() or run\_one() member functions should return as soon as possible. Subsequent calls to run(), run\_one(), poll() or poll\_one() will return immediately until reset() is called.
+[section:basic_stream_descriptor posix::basic_stream_descriptor::basic_stream_descriptor]
 
+Construct a basic_stream_descriptor without opening it.
 
-[endsect]
+ ``[link boost_asio.reference.posix__basic_stream_descriptor.basic_stream_descriptor.overload1 basic_stream_descriptor]``(
+ boost::asio::io_service & io_service);
 
+ ``[link boost_asio.reference.posix__basic_stream_descriptor.basic_stream_descriptor.overload2 basic_stream_descriptor]``(
+ boost::asio::io_service & io_service,
+ const native_type & native_descriptor);
 
 
-[section:use_service io_service::use_service]
+[section:overload1 posix::basic_stream_descriptor::basic_stream_descriptor (1 of 2 overloads)]
 
-Obtain the service object corresponding to the given type.
+Construct a basic_stream_descriptor without opening it.
 
- template<
- typename ``[link boost_asio.reference.Service Service]``>
- friend Service & use_service(
- io_service & ios);
+ basic_stream_descriptor(
+ boost::asio::io_service & io_service);
 
 
-This function is used to locate a service object that corresponds to the given service type. If there is no existing implementation of the service, then the io_service will create a new instance of the service.
+This constructor creates a stream descriptor without opening it. The descriptor needs to be opened and then connected or accepted before data can be sent or received on it.
 
 
 [heading Parameters]
@@ -24279,31 +44172,26 @@
 
 [variablelist
   
-[[ios][The io\_service object that owns the service.]]
+[[io_service][The io\_service object that the stream descriptor will use to dispatch handlers for any asynchronous operations performed on the descriptor. ]]
 
 ]
 
-[heading Return Value]
-
-The service interface implementing the specified service type. Ownership of the service interface is not transferred to the caller.
-
 
 
 [endsect]
 
 
 
-[section:wrap io_service::wrap]
+[section:overload2 posix::basic_stream_descriptor::basic_stream_descriptor (2 of 2 overloads)]
 
-Create a new handler that automatically dispatches the wrapped handler on the io_service.
+Construct a basic_stream_descriptor on an existing native descriptor.
 
- template<
- typename ``[link boost_asio.reference.Handler Handler]``>
- unspecified wrap(
- Handler handler);
+ basic_stream_descriptor(
+ boost::asio::io_service & io_service,
+ const native_type & native_descriptor);
 
 
-This function is used to create a new handler function object that, when invoked, will automatically pass the wrapped handler to the io\_service's dispatch function.
+This constructor creates a stream descriptor object to hold an existing native descriptor.
 
 
 [heading Parameters]
@@ -24311,218 +44199,179 @@
 
 [variablelist
   
-[[handler][The handler to be wrapped. The io\_service will make a copy of the handler object as required. The function signature of the handler must be:
-``
- void handler(A1 a1, ... An an);
+[[io_service][The io\_service object that the stream descriptor will use to dispatch handlers for any asynchronous operations performed on the descriptor.]]
 
-``
-]]
+[[native_descriptor][The new underlying descriptor implementation.]]
 
 ]
 
-[heading Return Value]
-
-A function object that, when invoked, passes the wrapped handler to the io\_service's dispatch function. Given a function object with the signature:
+[heading Exceptions]
+
 
- R f(A1 a1, ... An an);
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
 
+]
 
-If this function object is passed to the wrap function like so:
 
- io_service.wrap(f);
 
+[endsect]
 
-then the return value is a function object with the signature
 
- void g(A1 a1, ... An an);
+[endsect]
 
 
-that, when invoked, executes code equivalent to:
+[section:bytes_readable posix::basic_stream_descriptor::bytes_readable]
 
- io_service.dispatch(boost::bind(f, a1, ... an));
 
+['Inherited from posix::descriptor_base.]
 
+IO control command to get the amount of data that can be read without blocking.
 
+ typedef implementation_defined bytes_readable;
 
 
 
-[endsect]
+Implements the FIONREAD IO control command.
 
 
+[heading Example]
+
+
+
+ boost::asio::posix::stream_descriptor descriptor(io_service);
+ ...
+ boost::asio::descriptor_base::bytes_readable command(true);
+ descriptor.io_control(command);
+ std::size_t bytes_readable = command.get();
 
-[section:_io_service io_service::~io_service]
 
-Destructor.
 
- ~io_service();
 
 
 
 [endsect]
 
 
+[section:cancel posix::basic_stream_descriptor::cancel]
 
-[endsect]
+Cancel all asynchronous operations associated with the descriptor.
 
-[section:io_service__id io_service::id]
+ void ``[link boost_asio.reference.posix__basic_stream_descriptor.cancel.overload1 cancel]``();
 
-Class used to uniquely identify a service.
+ boost::system::error_code ``[link boost_asio.reference.posix__basic_stream_descriptor.cancel.overload2 cancel]``(
+ boost::system::error_code & ec);
 
- class id :
- noncopyable
 
+[section:overload1 posix::basic_stream_descriptor::cancel (1 of 2 overloads)]
 
-[heading Member Functions]
-[table
- [[Name][Description]]
 
- [
- [[link boost_asio.reference.io_service__id.id [*id]]]
- [Constructor. ]
- ]
-
-]
+['Inherited from posix::basic_descriptor.]
 
+Cancel all asynchronous operations associated with the descriptor.
 
-[section:id io_service::id::id]
+ void cancel();
 
-Constructor.
 
- id();
+This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the boost::asio::error::operation\_aborted error.
 
 
+[heading Exceptions]
+
 
-[endsect]
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
+
+]
 
 
 
 [endsect]
 
-[section:io_service__service io_service::service]
 
-Base class for all io_service services.
 
- class service :
- noncopyable
+[section:overload2 posix::basic_stream_descriptor::cancel (2 of 2 overloads)]
 
 
-[heading Member Functions]
-[table
- [[Name][Description]]
+['Inherited from posix::basic_descriptor.]
 
- [
- [[link boost_asio.reference.io_service__service.get_io_service [*get_io_service]]]
- [Get the io_service object that owns the service. ]
- ]
-
- [
- [[link boost_asio.reference.io_service__service.io_service [*io_service]]]
- [(Deprecated: use get_io_service().) Get the io_service object that owns the service. ]
- ]
-
-]
+Cancel all asynchronous operations associated with the descriptor.
+
+ boost::system::error_code cancel(
+ boost::system::error_code & ec);
 
 
-[section:get_io_service io_service::service::get_io_service]
+This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the boost::asio::error::operation\_aborted error.
 
-Get the io_service object that owns the service.
 
- boost::asio::io_service & get_io_service();
+[heading Parameters]
+
+
+[variablelist
+
+[[ec][Set to indicate what error occurred, if any. ]]
+
+]
 
 
 
 [endsect]
 
 
+[endsect]
 
-[section:io_service io_service::service::io_service]
+[section:close posix::basic_stream_descriptor::close]
 
-(Deprecated: use get_io_service().) Get the io_service object that owns the service.
+Close the descriptor.
 
- boost::asio::io_service & io_service();
+ void ``[link boost_asio.reference.posix__basic_stream_descriptor.close.overload1 close]``();
 
+ boost::system::error_code ``[link boost_asio.reference.posix__basic_stream_descriptor.close.overload2 close]``(
+ boost::system::error_code & ec);
 
 
-[endsect]
+[section:overload1 posix::basic_stream_descriptor::close (1 of 2 overloads)]
 
 
+['Inherited from posix::basic_descriptor.]
 
-[endsect]
+Close the descriptor.
 
-[section:io_service__strand io_service::strand]
+ void close();
 
-Provides serialised handler execution.
 
- class strand
+This function is used to close the descriptor. Any asynchronous read or write operations will be cancelled immediately, and will complete with the boost::asio::error::operation\_aborted error.
 
 
-[heading Member Functions]
-[table
- [[Name][Description]]
+[heading Exceptions]
+
 
- [
- [[link boost_asio.reference.io_service__strand.dispatch [*dispatch]]]
- [Request the strand to invoke the given handler. ]
- ]
-
- [
- [[link boost_asio.reference.io_service__strand.get_io_service [*get_io_service]]]
- [Get the io_service associated with the strand. ]
- ]
-
- [
- [[link boost_asio.reference.io_service__strand.io_service [*io_service]]]
- [(Deprecated: use get_io_service().) Get the io_service associated with the strand. ]
- ]
-
- [
- [[link boost_asio.reference.io_service__strand.post [*post]]]
- [Request the strand to invoke the given handler and return immediately. ]
- ]
-
- [
- [[link boost_asio.reference.io_service__strand.strand [*strand]]]
- [Constructor. ]
- ]
-
- [
- [[link boost_asio.reference.io_service__strand.wrap [*wrap]]]
- [Create a new handler that automatically dispatches the wrapped handler on the strand. ]
- ]
-
- [
- [[link boost_asio.reference.io_service__strand._strand [*~strand]]]
- [Destructor. ]
- ]
+[variablelist
   
-]
+[[boost::system::system_error][Thrown on failure. ]]
 
-The io_service::strand class provides the ability to post and dispatch handlers with the guarantee that none of those handlers will execute concurrently.
+]
 
 
-[heading Thread Safety]
-
-[*Distinct] [*objects:] Safe.
 
-[*Shared] [*objects:] Safe.
+[endsect]
 
 
 
-[section:dispatch io_service::strand::dispatch]
+[section:overload2 posix::basic_stream_descriptor::close (2 of 2 overloads)]
 
-Request the strand to invoke the given handler.
 
- template<
- typename ``[link boost_asio.reference.Handler Handler]``>
- void dispatch(
- Handler handler);
+['Inherited from posix::basic_descriptor.]
 
+Close the descriptor.
 
-This function is used to ask the strand to execute the given handler.
+ boost::system::error_code close(
+ boost::system::error_code & ec);
 
-The strand object guarantees that handlers posted or dispatched through the strand will not be executed concurrently. The handler may be executed inside this function if the guarantee can be met. If this function is called from within a handler that was posted or dispatched through the same strand, then the new handler will be executed immediately.
 
-The strand's guarantee is in addition to the guarantee provided by the underlying io_service. The io_service guarantees that the handler will only be called in a thread in which the io\_service's run member function is currently being invoked.
+This function is used to close the descriptor. Any asynchronous read or write operations will be cancelled immediately, and will complete with the boost::asio::error::operation\_aborted error.
 
 
 [heading Parameters]
@@ -24530,12 +44379,7 @@
 
 [variablelist
   
-[[handler][The handler to be called. The strand will make a copy of the handler object as required. The function signature of the handler must be:
-``
- void handler();
-
-``
-]]
+[[ec][Set to indicate what error occurred, if any. ]]
 
 ]
 
@@ -24544,40 +44388,25 @@
 [endsect]
 
 
-
-[section:get_io_service io_service::strand::get_io_service]
-
-Get the io_service associated with the strand.
-
- boost::asio::io_service & get_io_service();
-
-
-This function may be used to obtain the io_service object that the strand uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the io_service object that the strand will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
 [endsect]
 
 
+[section:get_io_service posix::basic_stream_descriptor::get_io_service]
 
-[section:io_service io_service::strand::io_service]
 
-(Deprecated: use get_io_service().) Get the io_service associated with the strand.
+['Inherited from basic_io_object.]
 
- boost::asio::io_service & io_service();
+Get the io_service associated with the object.
 
+ boost::asio::io_service & get_io_service();
 
-This function may be used to obtain the io_service object that the strand uses to dispatch handlers for asynchronous operations.
+
+This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
 
 
 [heading Return Value]
       
-A reference to the io_service object that the strand will use to dispatch handlers. Ownership is not transferred to the caller.
+A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
 
 
 
@@ -24585,78 +44414,60 @@
 
 
 
-[section:post io_service::strand::post]
-
-Request the strand to invoke the given handler and return immediately.
-
- template<
- typename ``[link boost_asio.reference.Handler Handler]``>
- void post(
- Handler handler);
-
+[section:implementation posix::basic_stream_descriptor::implementation]
 
-This function is used to ask the strand to execute the given handler, but without allowing the strand to call the handler from inside this function.
 
-The strand object guarantees that handlers posted or dispatched through the strand will not be executed concurrently. The strand's guarantee is in addition to the guarantee provided by the underlying io_service. The io_service guarantees that the handler will only be called in a thread in which the io\_service's run member function is currently being invoked.
+['Inherited from basic_io_object.]
 
+The underlying implementation of the I/O object.
 
-[heading Parameters]
-
+ implementation_type implementation;
 
-[variablelist
-
-[[handler][The handler to be called. The strand will make a copy of the handler object as required. The function signature of the handler must be:
-``
- void handler();
 
-``
-]]
 
-]
+[endsect]
 
 
 
-[endsect]
+[section:implementation_type posix::basic_stream_descriptor::implementation_type]
 
 
+['Inherited from basic_io_object.]
 
-[section:strand io_service::strand::strand]
+The underlying implementation type of I/O object.
 
-Constructor.
+ typedef service_type::implementation_type implementation_type;
 
- strand(
- boost::asio::io_service & io_service);
 
 
-Constructs the strand.
 
+[endsect]
 
-[heading Parameters]
-
 
-[variablelist
-
-[[io_service][The io\_service object that the strand will use to dispatch handlers that are ready to be run. ]]
+[section:io_control posix::basic_stream_descriptor::io_control]
 
-]
+Perform an IO control command on the descriptor.
 
+ void ``[link boost_asio.reference.posix__basic_stream_descriptor.io_control.overload1 io_control]``(
+ IoControlCommand & command);
 
+ boost::system::error_code ``[link boost_asio.reference.posix__basic_stream_descriptor.io_control.overload2 io_control]``(
+ IoControlCommand & command,
+ boost::system::error_code & ec);
 
-[endsect]
 
+[section:overload1 posix::basic_stream_descriptor::io_control (1 of 2 overloads)]
 
 
-[section:wrap io_service::strand::wrap]
+['Inherited from posix::basic_descriptor.]
 
-Create a new handler that automatically dispatches the wrapped handler on the strand.
+Perform an IO control command on the descriptor.
 
- template<
- typename ``[link boost_asio.reference.Handler Handler]``>
- unspecified wrap(
- Handler handler);
+ void io_control(
+ IoControlCommand & command);
 
 
-This function is used to create a new handler function object that, when invoked, will automatically pass the wrapped handler to the strand's dispatch function.
+This function is used to execute an IO control command on the descriptor.
 
 
 [heading Parameters]
@@ -24664,106 +44475,106 @@
 
 [variablelist
   
-[[handler][The handler to be wrapped. The strand will make a copy of the handler object as required. The function signature of the handler must be:
-``
- void handler(A1 a1, ... An an);
+[[command][The IO control command to be performed on the descriptor.]]
 
-``
-]]
+]
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
 
 ]
 
-[heading Return Value]
-
-A function object that, when invoked, passes the wrapped handler to the strand's dispatch function. Given a function object with the signature:
+[heading Example]
+
+Getting the number of bytes ready to read:
 
- R f(A1 a1, ... An an);
+ boost::asio::posix::stream_descriptor descriptor(io_service);
+ ...
+ boost::asio::posix::stream_descriptor::bytes_readable command;
+ descriptor.io_control(command);
+ std::size_t bytes_readable = command.get();
 
 
-If this function object is passed to the wrap function like so:
 
- strand.wrap(f);
 
 
-then the return value is a function object with the signature
 
- void g(A1 a1, ... An an);
+[endsect]
 
 
-that, when invoked, executes code equivalent to:
 
- strand.dispatch(boost::bind(f, a1, ... an));
+[section:overload2 posix::basic_stream_descriptor::io_control (2 of 2 overloads)]
 
 
+['Inherited from posix::basic_descriptor.]
 
+Perform an IO control command on the descriptor.
 
+ boost::system::error_code io_control(
+ IoControlCommand & command,
+ boost::system::error_code & ec);
 
 
-[endsect]
+This function is used to execute an IO control command on the descriptor.
 
 
+[heading Parameters]
+
 
-[section:_strand io_service::strand::~strand]
+[variablelist
+
+[[command][The IO control command to be performed on the descriptor.]]
 
-Destructor.
+[[ec][Set to indicate what error occurred, if any.]]
 
- ~strand();
+]
 
+[heading Example]
+
+Getting the number of bytes ready to read:
 
-Destroys a strand.
+ boost::asio::posix::stream_descriptor descriptor(io_service);
+ ...
+ boost::asio::posix::stream_descriptor::bytes_readable command;
+ boost::system::error_code ec;
+ descriptor.io_control(command, ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
+ std::size_t bytes_readable = command.get();
 
-Handlers posted through the strand that have not yet been invoked will still be dispatched in a way that meets the guarantee of non-concurrency.
 
 
-[endsect]
 
 
 
 [endsect]
 
-[section:io_service__work io_service::work]
 
-Class to inform the io_service when it has work to do.
+[endsect]
 
- class work
 
+[section:io_service posix::basic_stream_descriptor::io_service]
 
-[heading Member Functions]
-[table
- [[Name][Description]]
 
- [
- [[link boost_asio.reference.io_service__work.get_io_service [*get_io_service]]]
- [Get the io_service associated with the work. ]
- ]
-
- [
- [[link boost_asio.reference.io_service__work.io_service [*io_service]]]
- [(Deprecated: use get_io_service().) Get the io_service associated with the work. ]
- ]
-
- [
- [[link boost_asio.reference.io_service__work.work [*work]]]
- [Constructor notifies the io_service that work is starting. ]
- ]
-
- [
- [[link boost_asio.reference.io_service__work._work [*~work]]]
- [Destructor notifies the io_service that the work is complete. ]
- ]
-
-]
+['Inherited from basic_io_object.]
 
-The work class is used to inform the io_service when work starts and finishes. This ensures that the io\_service's run() function will not exit while work is underway, and that it does exit when there is no unfinished work remaining.
+(Deprecated: use get_io_service().) Get the io_service associated with the object.
 
-The work class is copy-constructible so that it may be used as a data member in a handler class. It is not assignable.
+ boost::asio::io_service & io_service();
 
 
-[section:get_io_service io_service::work::get_io_service]
+This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
 
-Get the io_service associated with the work.
 
- boost::asio::io_service & get_io_service();
+[heading Return Value]
+
+A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
 
 
 
@@ -24771,152 +44582,186 @@
 
 
 
-[section:io_service io_service::work::io_service]
-
-(Deprecated: use get_io_service().) Get the io_service associated with the work.
+[section:is_open posix::basic_stream_descriptor::is_open]
 
- boost::asio::io_service & io_service();
 
+['Inherited from posix::basic_descriptor.]
 
+Determine whether the descriptor is open.
 
-[endsect]
+ bool is_open() const;
 
 
-[section:work io_service::work::work]
 
-Constructor notifies the io_service that work is starting.
+[endsect]
 
- ``[link boost_asio.reference.io_service__work.work.overload1 work]``(
- boost::asio::io_service & io_service);
 
- ``[link boost_asio.reference.io_service__work.work.overload2 work]``(
- const work & other);
 
+[section:lowest_layer posix::basic_stream_descriptor::lowest_layer]
 
-[section:overload1 io_service::work::work (1 of 2 overloads)]
 
-Constructor notifies the io_service that work is starting.
+['Inherited from posix::basic_descriptor.]
 
- work(
- boost::asio::io_service & io_service);
+Get a reference to the lowest layer.
 
+ lowest_layer_type & lowest_layer();
 
-The constructor is used to inform the io_service that some work has begun. This ensures that the io\_service's run() function will not exit while the work is underway.
 
+This function returns a reference to the lowest layer in a stack of layers. Since a basic_descriptor cannot contain any further layers, it simply returns a reference to itself.
 
-[endsect]
 
+[heading Return Value]
+
+A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
 
 
-[section:overload2 io_service::work::work (2 of 2 overloads)]
 
-Copy constructor notifies the io_service that work is starting.
+[endsect]
 
- work(
- const work & other);
 
 
-The constructor is used to inform the io_service that some work has begun. This ensures that the io\_service's run() function will not exit while the work is underway.
+[section:lowest_layer_type posix::basic_stream_descriptor::lowest_layer_type]
 
 
-[endsect]
+['Inherited from posix::basic_descriptor.]
 
+A basic_descriptor is always the lowest layer.
 
-[endsect]
+ typedef basic_descriptor< StreamDescriptorService > lowest_layer_type;
 
 
-[section:_work io_service::work::~work]
+[heading Types]
+[table
+ [[Name][Description]]
 
-Destructor notifies the io_service that the work is complete.
+ [
 
- ~work();
+ [[link boost_asio.reference.posix__basic_descriptor.bytes_readable [*bytes_readable]]]
+ [IO control command to get the amount of data that can be read without blocking. ]
+
+ ]
 
+ [
 
-The destructor is used to inform the io_service that some work has finished. Once the count of unfinished work reaches zero, the io\_service's run() function is permitted to exit.
+ [[link boost_asio.reference.posix__basic_descriptor.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
 
+ [
 
-[endsect]
+ [[link boost_asio.reference.posix__basic_descriptor.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_descriptor is always the lowest layer. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.posix__basic_descriptor.native_type [*native_type]]]
+ [The native representation of a descriptor. ]
+
+ ]
 
-[endsect]
+ [
 
-[section:ip__address ip::address]
+ [[link boost_asio.reference.posix__basic_descriptor.non_blocking_io [*non_blocking_io]]]
+ [IO control command to set the blocking mode of the descriptor. ]
+
+ ]
 
-Implements version-independent IP addresses.
+ [
 
- class address
+ [[link boost_asio.reference.posix__basic_descriptor.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
+
+ ]
 
+]
 
 [heading Member Functions]
 [table
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.ip__address.address [*address]]]
- [Default constructor. ]
+ [[link boost_asio.reference.posix__basic_descriptor.assign [*assign]]]
+ [Assign an existing native descriptor to the descriptor. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address.from_string [*from_string]]]
- [Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation. ]
+ [[link boost_asio.reference.posix__basic_descriptor.basic_descriptor [*basic_descriptor]]]
+ [Construct a basic_descriptor without opening it. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address.is_v4 [*is_v4]]]
- [Get whether the address is an IP version 4 address. ]
+ [[link boost_asio.reference.posix__basic_descriptor.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the descriptor. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address.is_v6 [*is_v6]]]
- [Get whether the address is an IP version 6 address. ]
+ [[link boost_asio.reference.posix__basic_descriptor.close [*close]]]
+ [Close the descriptor. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address.operator_eq_ [*operator=]]]
- [Assign from another address. ]
+ [[link boost_asio.reference.posix__basic_descriptor.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address.to_string [*to_string]]]
- [Get the address as a string in dotted decimal format. ]
+ [[link boost_asio.reference.posix__basic_descriptor.io_control [*io_control]]]
+ [Perform an IO control command on the descriptor. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address.to_v4 [*to_v4]]]
- [Get the address as an IP version 4 address. ]
+ [[link boost_asio.reference.posix__basic_descriptor.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address.to_v6 [*to_v6]]]
- [Get the address as an IP version 6 address. ]
+ [[link boost_asio.reference.posix__basic_descriptor.is_open [*is_open]]]
+ [Determine whether the descriptor is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__basic_descriptor.native [*native]]]
+ [Get the native descriptor representation. ]
   ]
   
 ]
 
-[heading Friends]
+[heading Protected Member Functions]
 [table
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.ip__address.operator_not__eq_ [*operator!=]]]
- [Compare two addresses for inequality. ]
+ [[link boost_asio.reference.posix__basic_descriptor._basic_descriptor [*~basic_descriptor]]]
+ [Protected destructor to prevent deletion through this type. ]
   ]
   
+]
+
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
   [
- [[link boost_asio.reference.ip__address.operator_lt_ [*operator<]]]
- [Compare addresses for ordering. ]
+ [[link boost_asio.reference.posix__basic_descriptor.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
   ]
-
+
   [
- [[link boost_asio.reference.ip__address.operator_eq__eq_ [*operator==]]]
- [Compare two addresses for equality. ]
+ [[link boost_asio.reference.posix__basic_descriptor.service [*service]]]
+ [The service associated with the I/O object. ]
   ]
-
+
 ]
 
-The
-[link boost_asio.reference.ip__address ip::address] class provides the ability to use either IP version 4 or version 6 addresses.
+The posix::basic_descriptor class template provides the ability to wrap a POSIX descriptor.
 
 
 [heading Thread Safety]
@@ -24926,40 +44771,35 @@
 [*Shared] [*objects:] Unsafe.
 
 
-[section:address ip::address::address]
 
-Default constructor.
 
- ``[link boost_asio.reference.ip__address.address.overload1 address]``();
+[endsect]
 
- ``[link boost_asio.reference.ip__address.address.overload2 address]``(
- const boost::asio::ip::address_v4 & ipv4_address);
 
- ``[link boost_asio.reference.ip__address.address.overload3 address]``(
- const boost::asio::ip::address_v6 & ipv6_address);
 
- ``[link boost_asio.reference.ip__address.address.overload4 address]``(
- const address & other);
+[section:native posix::basic_stream_descriptor::native]
 
 
-[section:overload1 ip::address::address (1 of 4 overloads)]
+['Inherited from posix::basic_descriptor.]
 
-Default constructor.
+Get the native descriptor representation.
 
- address();
+ native_type native();
 
 
+This function may be used to obtain the underlying representation of the descriptor. This is intended to allow access to native descriptor functionality that is not otherwise provided.
+
 
 [endsect]
 
 
 
-[section:overload2 ip::address::address (2 of 4 overloads)]
+[section:native_type posix::basic_stream_descriptor::native_type]
 
-Construct an address from an IPv4 address.
+The native representation of a descriptor.
+
+ typedef StreamDescriptorService::native_type native_type;
 
- address(
- const boost::asio::ip::address_v4 & ipv4_address);
 
 
 
@@ -24967,72 +44807,103 @@
 
 
 
-[section:overload3 ip::address::address (3 of 4 overloads)]
+[section:non_blocking_io posix::basic_stream_descriptor::non_blocking_io]
 
-Construct an address from an IPv6 address.
 
- address(
- const boost::asio::ip::address_v6 & ipv6_address);
+['Inherited from posix::descriptor_base.]
 
+IO control command to set the blocking mode of the descriptor.
 
+ typedef implementation_defined non_blocking_io;
 
-[endsect]
 
 
+Implements the FIONBIO IO control command.
 
-[section:overload4 ip::address::address (4 of 4 overloads)]
 
-Copy constructor.
+[heading Example]
+
+
+
+ boost::asio::posix::stream_descriptor descriptor(io_service);
+ ...
+ boost::asio::descriptor_base::non_blocking_io command(true);
+ descriptor.io_control(command);
 
- address(
- const address & other);
 
 
 
-[endsect]
 
 
 [endsect]
 
-[section:from_string ip::address::from_string]
 
-Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
+[section:read_some posix::basic_stream_descriptor::read_some]
 
- static address ``[link boost_asio.reference.ip__address.from_string.overload1 from_string]``(
- const char * str);
+Read some data from the descriptor.
 
- static address ``[link boost_asio.reference.ip__address.from_string.overload2 from_string]``(
- const char * str,
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.posix__basic_stream_descriptor.read_some.overload1 read_some]``(
+ const MutableBufferSequence & buffers);
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.posix__basic_stream_descriptor.read_some.overload2 read_some]``(
+ const MutableBufferSequence & buffers,
       boost::system::error_code & ec);
 
- static address ``[link boost_asio.reference.ip__address.from_string.overload3 from_string]``(
- const std::string & str);
 
- static address ``[link boost_asio.reference.ip__address.from_string.overload4 from_string]``(
- const std::string & str,
- boost::system::error_code & ec);
+[section:overload1 posix::basic_stream_descriptor::read_some (1 of 2 overloads)]
 
+Read some data from the descriptor.
 
-[section:overload1 ip::address::from_string (1 of 4 overloads)]
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t read_some(
+ const MutableBufferSequence & buffers);
 
-Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
 
- static address from_string(
- const char * str);
+This function is used to read data from the stream descriptor. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
 
 
+[heading Parameters]
+
 
-[endsect]
+[variablelist
+
+[[buffers][One or more buffers into which the data will be read.]]
+
+]
 
+[heading Return Value]
+
+The number of bytes read.
 
+[heading Exceptions]
+
 
-[section:overload2 ip::address::from_string (2 of 4 overloads)]
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. An error code of boost::asio::error::eof indicates that the connection was closed by the peer.]]
 
-Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
+]
 
- static address from_string(
- const char * str,
- boost::system::error_code & ec);
+[heading Remarks]
+
+The read\_some operation may not read all of the requested number of bytes. Consider using the
+[link boost_asio.reference.read read] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
+
+[heading Example]
+
+To read into a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ descriptor.read_some(boost::asio::buffer(data, size));
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
 
 
@@ -25040,26 +44911,39 @@
 
 
 
-[section:overload3 ip::address::from_string (3 of 4 overloads)]
+[section:overload2 posix::basic_stream_descriptor::read_some (2 of 2 overloads)]
 
-Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
+Read some data from the descriptor.
 
- static address from_string(
- const std::string & str);
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t read_some(
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
 
 
+This function is used to read data from the stream descriptor. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
 
-[endsect]
 
+[heading Parameters]
+
 
+[variablelist
+
+[[buffers][One or more buffers into which the data will be read.]]
 
-[section:overload4 ip::address::from_string (4 of 4 overloads)]
+[[ec][Set to indicate what error occurred, if any.]]
 
-Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
+]
 
- static address from_string(
- const std::string & str,
- boost::system::error_code & ec);
+[heading Return Value]
+
+The number of bytes read. Returns 0 if an error occurred.
+
+[heading Remarks]
+
+The read\_some operation may not read all of the requested number of bytes. Consider using the
+[link boost_asio.reference.read read] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
 
 
 
@@ -25069,11 +44953,14 @@
 [endsect]
 
 
-[section:is_v4 ip::address::is_v4]
+[section:service posix::basic_stream_descriptor::service]
 
-Get whether the address is an IP version 4 address.
 
- bool is_v4() const;
+['Inherited from basic_io_object.]
+
+The service associated with the I/O object.
+
+ service_type & service;
 
 
 
@@ -25081,65 +44968,87 @@
 
 
 
-[section:is_v6 ip::address::is_v6]
+[section:service_type posix::basic_stream_descriptor::service_type]
 
-Get whether the address is an IP version 6 address.
 
- bool is_v6() const;
+['Inherited from basic_io_object.]
 
+The type of the service that will be used to provide I/O operations.
 
+ typedef StreamDescriptorService service_type;
 
-[endsect]
 
 
 
-[section:operator_not__eq_ ip::address::operator!=]
+[endsect]
 
-Compare two addresses for inequality.
 
- friend bool operator!=(
- const address & a1,
- const address & a2);
+[section:write_some posix::basic_stream_descriptor::write_some]
+
+Write some data to the descriptor.
 
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.posix__basic_stream_descriptor.write_some.overload1 write_some]``(
+ const ConstBufferSequence & buffers);
 
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.posix__basic_stream_descriptor.write_some.overload2 write_some]``(
+ const ConstBufferSequence & buffers,
+ boost::system::error_code & ec);
 
-[endsect]
 
+[section:overload1 posix::basic_stream_descriptor::write_some (1 of 2 overloads)]
 
+Write some data to the descriptor.
 
-[section:operator_lt_ ip::address::operator<]
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t write_some(
+ const ConstBufferSequence & buffers);
 
-Compare addresses for ordering.
 
- friend bool operator<(
- const address & a1,
- const address & a2);
+This function is used to write data to the stream descriptor. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
 
 
+[heading Parameters]
+
 
-[endsect]
+[variablelist
+
+[[buffers][One or more data buffers to be written to the descriptor.]]
 
+]
 
-[section:operator_eq_ ip::address::operator=]
+[heading Return Value]
+
+The number of bytes written.
 
-Assign from another address.
+[heading Exceptions]
+
 
- address & ``[link boost_asio.reference.ip__address.operator_eq_.overload1 operator=]``(
- const address & other);
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. An error code of boost::asio::error::eof indicates that the connection was closed by the peer.]]
 
- address & ``[link boost_asio.reference.ip__address.operator_eq_.overload2 operator=]``(
- const boost::asio::ip::address_v4 & ipv4_address);
+]
 
- address & ``[link boost_asio.reference.ip__address.operator_eq_.overload3 operator=]``(
- const boost::asio::ip::address_v6 & ipv6_address);
+[heading Remarks]
+
+The write\_some operation may not transmit all of the data to the peer. Consider using the
+[link boost_asio.reference.write write] function if you need to ensure that all data is written before the blocking operation completes.
 
+[heading Example]
+
+To write a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
 
-[section:overload1 ip::address::operator= (1 of 3 overloads)]
+ descriptor.write_some(boost::asio::buffer(data, size));
 
-Assign from another address.
 
- address & operator=(
- const address & other);
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
 
 
@@ -25147,25 +45056,39 @@
 
 
 
-[section:overload2 ip::address::operator= (2 of 3 overloads)]
+[section:overload2 posix::basic_stream_descriptor::write_some (2 of 2 overloads)]
 
-Assign from an IPv4 address.
+Write some data to the descriptor.
 
- address & operator=(
- const boost::asio::ip::address_v4 & ipv4_address);
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t write_some(
+ const ConstBufferSequence & buffers,
+ boost::system::error_code & ec);
 
 
+This function is used to write data to the stream descriptor. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
 
-[endsect]
 
+[heading Parameters]
+
+
+[variablelist
+
+[[buffers][One or more data buffers to be written to the descriptor.]]
 
+[[ec][Set to indicate what error occurred, if any.]]
 
-[section:overload3 ip::address::operator= (3 of 3 overloads)]
+]
 
-Assign from an IPv6 address.
+[heading Return Value]
+
+The number of bytes written. Returns 0 if an error occurred.
 
- address & operator=(
- const boost::asio::ip::address_v6 & ipv6_address);
+[heading Remarks]
+
+The write\_some operation may not transmit all of the data to the peer. Consider using the
+[link boost_asio.reference.write write] function if you need to ensure that all data is written before the blocking operation completes.
 
 
 
@@ -25175,97 +45098,171 @@
 [endsect]
 
 
-[section:operator_eq__eq_ ip::address::operator==]
+[endsect]
+
+[section:posix__descriptor_base posix::descriptor_base]
+
+The descriptor_base class is used as a base for the basic_stream_descriptor class template so that we have a common place to define the associated IO control commands.
+
+ class descriptor_base
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link boost_asio.reference.posix__descriptor_base.bytes_readable [*bytes_readable]]]
+ [IO control command to get the amount of data that can be read without blocking. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.posix__descriptor_base.non_blocking_io [*non_blocking_io]]]
+ [IO control command to set the blocking mode of the descriptor. ]
+
+ ]
+
+]
+
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.posix__descriptor_base._descriptor_base [*~descriptor_base]]]
+ [Protected destructor to prevent deletion through this type. ]
+ ]
+
+]
+
+
+[section:bytes_readable posix::descriptor_base::bytes_readable]
+
+IO control command to get the amount of data that can be read without blocking.
+
+ typedef implementation_defined bytes_readable;
+
+
+
+Implements the FIONREAD IO control command.
+
+
+[heading Example]
+
+
+
+ boost::asio::posix::stream_descriptor descriptor(io_service);
+ ...
+ boost::asio::descriptor_base::bytes_readable command(true);
+ descriptor.io_control(command);
+ std::size_t bytes_readable = command.get();
+
 
-Compare two addresses for equality.
 
- friend bool operator==(
- const address & a1,
- const address & a2);
 
 
 
 [endsect]
 
 
-[section:to_string ip::address::to_string]
 
-Get the address as a string in dotted decimal format.
+[section:non_blocking_io posix::descriptor_base::non_blocking_io]
 
- std::string ``[link boost_asio.reference.ip__address.to_string.overload1 to_string]``() const;
+IO control command to set the blocking mode of the descriptor.
 
- std::string ``[link boost_asio.reference.ip__address.to_string.overload2 to_string]``(
- boost::system::error_code & ec) const;
+ typedef implementation_defined non_blocking_io;
 
 
-[section:overload1 ip::address::to_string (1 of 2 overloads)]
 
-Get the address as a string in dotted decimal format.
+Implements the FIONBIO IO control command.
 
- std::string to_string() const;
 
+[heading Example]
+
 
 
-[endsect]
+ boost::asio::posix::stream_descriptor descriptor(io_service);
+ ...
+ boost::asio::descriptor_base::non_blocking_io command(true);
+ descriptor.io_control(command);
 
 
 
-[section:overload2 ip::address::to_string (2 of 2 overloads)]
 
-Get the address as a string in dotted decimal format.
 
- std::string to_string(
- boost::system::error_code & ec) const;
 
+[endsect]
 
 
-[endsect]
 
+[section:_descriptor_base posix::descriptor_base::~descriptor_base]
 
-[endsect]
+Protected destructor to prevent deletion through this type.
 
+ ~descriptor_base();
 
-[section:to_v4 ip::address::to_v4]
 
-Get the address as an IP version 4 address.
 
- boost::asio::ip::address_v4 to_v4() const;
+[endsect]
 
 
 
 [endsect]
 
 
+[section:posix__stream_descriptor posix::stream_descriptor]
 
-[section:to_v6 ip::address::to_v6]
+Typedef for the typical usage of a stream-oriented descriptor.
 
-Get the address as an IP version 6 address.
+ typedef basic_stream_descriptor stream_descriptor;
 
- boost::asio::ip::address_v6 to_v6() const;
 
+[heading Types]
+[table
+ [[Name][Description]]
 
+ [
 
-[endsect]
+ [[link boost_asio.reference.posix__basic_stream_descriptor.bytes_readable [*bytes_readable]]]
+ [IO control command to get the amount of data that can be read without blocking. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.posix__basic_stream_descriptor.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
 
-[endsect]
+ [
 
-[section:ip__address_v4 ip::address_v4]
+ [[link boost_asio.reference.posix__basic_stream_descriptor.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_descriptor is always the lowest layer. ]
+
+ ]
 
-Implements IP version 4 style addresses.
+ [
 
- class address_v4
+ [[link boost_asio.reference.posix__basic_stream_descriptor.native_type [*native_type]]]
+ [The native representation of a descriptor. ]
+
+ ]
 
+ [
 
-[heading Types]
-[table
- [[Name][Description]]
+ [[link boost_asio.reference.posix__basic_stream_descriptor.non_blocking_io [*non_blocking_io]]]
+ [IO control command to set the blocking mode of the descriptor. ]
+
+ ]
 
   [
 
- [[link boost_asio.reference.ip__address_v4.bytes_type [*bytes_type]]]
- [The type used to represent an address as an array of bytes. ]
+ [[link boost_asio.reference.posix__basic_stream_descriptor.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
   
   ]
 
@@ -25276,220 +45273,242 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.ip__address_v4.address_v4 [*address_v4]]]
- [Default constructor. ]
+ [[link boost_asio.reference.posix__basic_stream_descriptor.assign [*assign]]]
+ [Assign an existing native descriptor to the descriptor. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v4.any [*any]]]
- [Obtain an address object that represents any address. ]
+ [[link boost_asio.reference.posix__basic_stream_descriptor.async_read_some [*async_read_some]]]
+ [Start an asynchronous read. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v4.broadcast [*broadcast]]]
- [Obtain an address object that represents the broadcast address. ]
+ [[link boost_asio.reference.posix__basic_stream_descriptor.async_write_some [*async_write_some]]]
+ [Start an asynchronous write. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v4.from_string [*from_string]]]
- [Create an address from an IP address string in dotted decimal form. ]
+ [[link boost_asio.reference.posix__basic_stream_descriptor.basic_stream_descriptor [*basic_stream_descriptor]]]
+ [Construct a basic_stream_descriptor without opening it. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v4.is_class_a [*is_class_a]]]
- [Determine whether the address is a class A address. ]
+ [[link boost_asio.reference.posix__basic_stream_descriptor.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the descriptor. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v4.is_class_b [*is_class_b]]]
- [Determine whether the address is a class B address. ]
+ [[link boost_asio.reference.posix__basic_stream_descriptor.close [*close]]]
+ [Close the descriptor. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v4.is_class_c [*is_class_c]]]
- [Determine whether the address is a class C address. ]
+ [[link boost_asio.reference.posix__basic_stream_descriptor.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v4.is_multicast [*is_multicast]]]
- [Determine whether the address is a multicast address. ]
+ [[link boost_asio.reference.posix__basic_stream_descriptor.io_control [*io_control]]]
+ [Perform an IO control command on the descriptor. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v4.loopback [*loopback]]]
- [Obtain an address object that represents the loopback address. ]
+ [[link boost_asio.reference.posix__basic_stream_descriptor.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v4.netmask [*netmask]]]
- [Obtain the netmask that corresponds to the address, based on its address class. ]
+ [[link boost_asio.reference.posix__basic_stream_descriptor.is_open [*is_open]]]
+ [Determine whether the descriptor is open. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v4.operator_eq_ [*operator=]]]
- [Assign from another address. ]
+ [[link boost_asio.reference.posix__basic_stream_descriptor.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v4.to_bytes [*to_bytes]]]
- [Get the address in bytes. ]
+ [[link boost_asio.reference.posix__basic_stream_descriptor.native [*native]]]
+ [Get the native descriptor representation. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v4.to_string [*to_string]]]
- [Get the address as a string in dotted decimal format. ]
+ [[link boost_asio.reference.posix__basic_stream_descriptor.read_some [*read_some]]]
+ [Read some data from the descriptor. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v4.to_ulong [*to_ulong]]]
- [Get the address as an unsigned long in host byte order. ]
+ [[link boost_asio.reference.posix__basic_stream_descriptor.write_some [*write_some]]]
+ [Write some data to the descriptor. ]
   ]
   
 ]
 
-[heading Friends]
+[heading Protected Data Members]
 [table
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.ip__address_v4.operator_not__eq_ [*operator!=]]]
- [Compare two addresses for inequality. ]
- ]
-
- [
- [[link boost_asio.reference.ip__address_v4.operator_lt_ [*operator<]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link boost_asio.reference.ip__address_v4.operator_lt__eq_ [*operator<=]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link boost_asio.reference.ip__address_v4.operator_eq__eq_ [*operator==]]]
- [Compare two addresses for equality. ]
- ]
-
- [
- [[link boost_asio.reference.ip__address_v4.operator_gt_ [*operator>]]]
- [Compare addresses for ordering. ]
+ [[link boost_asio.reference.posix__basic_stream_descriptor.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
   ]
-
+
   [
- [[link boost_asio.reference.ip__address_v4.operator_gt__eq_ [*operator>=]]]
- [Compare addresses for ordering. ]
+ [[link boost_asio.reference.posix__basic_stream_descriptor.service [*service]]]
+ [The service associated with the I/O object. ]
   ]
-
+
 ]
 
-The
-[link boost_asio.reference.ip__address_v4 ip::address_v4] class provides the ability to use and manipulate IP version 4 addresses.
+The posix::basic_stream_descriptor class template provides asynchronous and blocking stream-oriented descriptor functionality.
 
 
 [heading Thread Safety]
   
 [*Distinct] [*objects:] Safe.
 
-[*Shared] [*objects:] Unsafe.
-
-
-[section:address_v4 ip::address_v4::address_v4]
-
-Default constructor.
-
- ``[link boost_asio.reference.ip__address_v4.address_v4.overload1 address_v4]``();
-
- ``[link boost_asio.reference.ip__address_v4.address_v4.overload2 address_v4]``(
- const bytes_type & bytes);
-
- ``[link boost_asio.reference.ip__address_v4.address_v4.overload3 address_v4]``(
- unsigned long addr);
-
- ``[link boost_asio.reference.ip__address_v4.address_v4.overload4 address_v4]``(
- const address_v4 & other);
-
-
-[section:overload1 ip::address_v4::address_v4 (1 of 4 overloads)]
-
-Default constructor.
-
- address_v4();
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::address_v4::address_v4 (2 of 4 overloads)]
-
-Construct an address from raw bytes.
-
- address_v4(
- const bytes_type & bytes);
-
-
-
-[endsect]
-
-
-
-[section:overload3 ip::address_v4::address_v4 (3 of 4 overloads)]
-
-Construct an address from a unsigned long in host byte order.
+[*Shared] [*objects:] Unsafe.
 
- address_v4(
- unsigned long addr);
 
 
 
 [endsect]
 
 
+[section:posix__stream_descriptor_service posix::stream_descriptor_service]
 
-[section:overload4 ip::address_v4::address_v4 (4 of 4 overloads)]
-
-Copy constructor.
-
- address_v4(
- const address_v4 & other);
-
-
-
-[endsect]
-
+Default service implementation for a stream descriptor.
 
-[endsect]
+ class stream_descriptor_service :
+ public io_service::service
 
 
-[section:any ip::address_v4::any]
+[heading Types]
+[table
+ [[Name][Description]]
 
-Obtain an address object that represents any address.
+ [
 
- static address_v4 any();
+ [[link boost_asio.reference.posix__stream_descriptor_service.implementation_type [*implementation_type]]]
+ [The type of a stream descriptor implementation. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.posix__stream_descriptor_service.native_type [*native_type]]]
+ [The native descriptor type. ]
+
+ ]
 
-[endsect]
+]
 
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
-[section:broadcast ip::address_v4::broadcast]
+ [
+ [[link boost_asio.reference.posix__stream_descriptor_service.assign [*assign]]]
+ [Assign an existing native descriptor to a stream descriptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__stream_descriptor_service.async_read_some [*async_read_some]]]
+ [Start an asynchronous read. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__stream_descriptor_service.async_write_some [*async_write_some]]]
+ [Start an asynchronous write. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__stream_descriptor_service.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the descriptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__stream_descriptor_service.close [*close]]]
+ [Close a stream descriptor implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__stream_descriptor_service.construct [*construct]]]
+ [Construct a new stream descriptor implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__stream_descriptor_service.destroy [*destroy]]]
+ [Destroy a stream descriptor implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__stream_descriptor_service.get_io_service [*get_io_service]]]
+ [Get the io_service object that owns the service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__stream_descriptor_service.io_control [*io_control]]]
+ [Perform an IO control command on the descriptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__stream_descriptor_service.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service object that owns the service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__stream_descriptor_service.is_open [*is_open]]]
+ [Determine whether the descriptor is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__stream_descriptor_service.native [*native]]]
+ [Get the native descriptor implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__stream_descriptor_service.read_some [*read_some]]]
+ [Read some data from the stream. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__stream_descriptor_service.shutdown_service [*shutdown_service]]]
+ [Destroy all user-defined descriptorr objects owned by the service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__stream_descriptor_service.stream_descriptor_service [*stream_descriptor_service]]]
+ [Construct a new stream descriptor service for the specified io_service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.posix__stream_descriptor_service.write_some [*write_some]]]
+ [Write the given data to the stream. ]
+ ]
+
+]
 
-Obtain an address object that represents the broadcast address.
+[heading Data Members]
+[table
+ [[Name][Description]]
 
- static address_v4 ``[link boost_asio.reference.ip__address_v4.broadcast.overload1 broadcast]``();
+ [
+ [[link boost_asio.reference.posix__stream_descriptor_service.id [*id]]]
+ [The unique service identifier. ]
+ ]
 
- static address_v4 ``[link boost_asio.reference.ip__address_v4.broadcast.overload2 broadcast]``(
- const address_v4 & addr,
- const address_v4 & mask);
+]
 
 
-[section:overload1 ip::address_v4::broadcast (1 of 2 overloads)]
+[section:assign posix::stream_descriptor_service::assign]
 
-Obtain an address object that represents the broadcast address.
+Assign an existing native descriptor to a stream descriptor.
 
- static address_v4 broadcast();
+ boost::system::error_code assign(
+ implementation_type & impl,
+ const native_type & native_descriptor,
+ boost::system::error_code & ec);
 
 
 
@@ -25497,72 +45516,62 @@
 
 
 
-[section:overload2 ip::address_v4::broadcast (2 of 2 overloads)]
-
-Obtain an address object that represents the broadcast address that corresponds to the specified address and netmask.
-
- static address_v4 broadcast(
- const address_v4 & addr,
- const address_v4 & mask);
+[section:async_read_some posix::stream_descriptor_service::async_read_some]
 
+Start an asynchronous read.
 
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_read_some(
+ implementation_type & impl,
+ const MutableBufferSequence & buffers,
+ ReadHandler descriptorr);
 
-[endsect]
 
 
 [endsect]
 
 
-[section:bytes_type ip::address_v4::bytes_type]
 
-The type used to represent an address as an array of bytes.
+[section:async_write_some posix::stream_descriptor_service::async_write_some]
 
- typedef boost::array< unsigned char, 4 > bytes_type;
+Start an asynchronous write.
 
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_write_some(
+ implementation_type & impl,
+ const ConstBufferSequence & buffers,
+ WriteHandler descriptorr);
 
 
 
 [endsect]
 
 
-[section:from_string ip::address_v4::from_string]
-
-Create an address from an IP address string in dotted decimal form.
-
- static address_v4 ``[link boost_asio.reference.ip__address_v4.from_string.overload1 from_string]``(
- const char * str);
 
- static address_v4 ``[link boost_asio.reference.ip__address_v4.from_string.overload2 from_string]``(
- const char * str,
- boost::system::error_code & ec);
+[section:cancel posix::stream_descriptor_service::cancel]
 
- static address_v4 ``[link boost_asio.reference.ip__address_v4.from_string.overload3 from_string]``(
- const std::string & str);
+Cancel all asynchronous operations associated with the descriptor.
 
- static address_v4 ``[link boost_asio.reference.ip__address_v4.from_string.overload4 from_string]``(
- const std::string & str,
+ boost::system::error_code cancel(
+ implementation_type & impl,
       boost::system::error_code & ec);
 
 
-[section:overload1 ip::address_v4::from_string (1 of 4 overloads)]
-
-Create an address from an IP address string in dotted decimal form.
-
- static address_v4 from_string(
- const char * str);
-
-
 
 [endsect]
 
 
 
-[section:overload2 ip::address_v4::from_string (2 of 4 overloads)]
+[section:close posix::stream_descriptor_service::close]
 
-Create an address from an IP address string in dotted decimal form.
+Close a stream descriptor implementation.
 
- static address_v4 from_string(
- const char * str,
+ boost::system::error_code close(
+ implementation_type & impl,
       boost::system::error_code & ec);
 
 
@@ -25571,12 +45580,12 @@
 
 
 
-[section:overload3 ip::address_v4::from_string (3 of 4 overloads)]
+[section:construct posix::stream_descriptor_service::construct]
 
-Create an address from an IP address string in dotted decimal form.
+Construct a new stream descriptor implementation.
 
- static address_v4 from_string(
- const std::string & str);
+ void construct(
+ implementation_type & impl);
 
 
 
@@ -25584,39 +45593,27 @@
 
 
 
-[section:overload4 ip::address_v4::from_string (4 of 4 overloads)]
-
-Create an address from an IP address string in dotted decimal form.
-
- static address_v4 from_string(
- const std::string & str,
- boost::system::error_code & ec);
+[section:destroy posix::stream_descriptor_service::destroy]
 
+Destroy a stream descriptor implementation.
 
+ void destroy(
+ implementation_type & impl);
 
-[endsect]
 
 
 [endsect]
 
 
-[section:is_class_a ip::address_v4::is_class_a]
-
-Determine whether the address is a class A address.
-
- bool is_class_a() const;
-
-
-
-[endsect]
 
+[section:get_io_service posix::stream_descriptor_service::get_io_service]
 
 
-[section:is_class_b ip::address_v4::is_class_b]
+['Inherited from io_service.]
 
-Determine whether the address is a class B address.
+Get the io_service object that owns the service.
 
- bool is_class_b() const;
+ boost::asio::io_service & get_io_service();
 
 
 
@@ -25624,11 +45621,11 @@
 
 
 
-[section:is_class_c ip::address_v4::is_class_c]
+[section:id posix::stream_descriptor_service::id]
 
-Determine whether the address is a class C address.
+The unique service identifier.
 
- bool is_class_c() const;
+ static boost::asio::io_service::id id;
 
 
 
@@ -25636,23 +45633,12 @@
 
 
 
-[section:is_multicast ip::address_v4::is_multicast]
-
-Determine whether the address is a multicast address.
-
- bool is_multicast() const;
-
-
-
-[endsect]
-
+[section:implementation_type posix::stream_descriptor_service::implementation_type]
 
+The type of a stream descriptor implementation.
 
-[section:loopback ip::address_v4::loopback]
-
-Obtain an address object that represents the loopback address.
+ typedef implementation_defined implementation_type;
 
- static address_v4 loopback();
 
 
 
@@ -25660,12 +45646,16 @@
 
 
 
-[section:netmask ip::address_v4::netmask]
+[section:io_control posix::stream_descriptor_service::io_control]
 
-Obtain the netmask that corresponds to the address, based on its address class.
+Perform an IO control command on the descriptor.
 
- static address_v4 netmask(
- const address_v4 & addr);
+ template<
+ typename ``[link boost_asio.reference.IoControlCommand IoControlCommand]``>
+ boost::system::error_code io_control(
+ implementation_type & impl,
+ IoControlCommand & command,
+ boost::system::error_code & ec);
 
 
 
@@ -25673,27 +45663,14 @@
 
 
 
-[section:operator_not__eq_ ip::address_v4::operator!=]
-
-Compare two addresses for inequality.
-
- friend bool operator!=(
- const address_v4 & a1,
- const address_v4 & a2);
-
-
-
-[endsect]
-
+[section:io_service posix::stream_descriptor_service::io_service]
 
 
-[section:operator_lt_ ip::address_v4::operator<]
+['Inherited from io_service.]
 
-Compare addresses for ordering.
+(Deprecated: use get_io_service().) Get the io_service object that owns the service.
 
- friend bool operator<(
- const address_v4 & a1,
- const address_v4 & a2);
+ boost::asio::io_service & io_service();
 
 
 
@@ -25701,13 +45678,12 @@
 
 
 
-[section:operator_lt__eq_ ip::address_v4::operator<=]
+[section:is_open posix::stream_descriptor_service::is_open]
 
-Compare addresses for ordering.
+Determine whether the descriptor is open.
 
- friend bool operator<=(
- const address_v4 & a1,
- const address_v4 & a2);
+ bool is_open(
+ const implementation_type & impl) const;
 
 
 
@@ -25715,12 +45691,12 @@
 
 
 
-[section:operator_eq_ ip::address_v4::operator=]
+[section:native posix::stream_descriptor_service::native]
 
-Assign from another address.
+Get the native descriptor implementation.
 
- address_v4 & operator=(
- const address_v4 & other);
+ native_type native(
+ implementation_type & impl);
 
 
 
@@ -25728,27 +45704,12 @@
 
 
 
-[section:operator_eq__eq_ ip::address_v4::operator==]
-
-Compare two addresses for equality.
-
- friend bool operator==(
- const address_v4 & a1,
- const address_v4 & a2);
-
-
-
-[endsect]
-
+[section:native_type posix::stream_descriptor_service::native_type]
 
+The native descriptor type.
 
-[section:operator_gt_ ip::address_v4::operator>]
-
-Compare addresses for ordering.
+ typedef implementation_defined native_type;
 
- friend bool operator>(
- const address_v4 & a1,
- const address_v4 & a2);
 
 
 
@@ -25756,13 +45717,16 @@
 
 
 
-[section:operator_gt__eq_ ip::address_v4::operator>=]
+[section:read_some posix::stream_descriptor_service::read_some]
 
-Compare addresses for ordering.
+Read some data from the stream.
 
- friend bool operator>=(
- const address_v4 & a1,
- const address_v4 & a2);
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t read_some(
+ implementation_type & impl,
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
 
 
 
@@ -25770,32 +45734,24 @@
 
 
 
-[section:to_bytes ip::address_v4::to_bytes]
+[section:shutdown_service posix::stream_descriptor_service::shutdown_service]
 
-Get the address in bytes.
+Destroy all user-defined descriptorr objects owned by the service.
 
- bytes_type to_bytes() const;
+ void shutdown_service();
 
 
 
 [endsect]
 
 
-[section:to_string ip::address_v4::to_string]
-
-Get the address as a string in dotted decimal format.
-
- std::string ``[link boost_asio.reference.ip__address_v4.to_string.overload1 to_string]``() const;
-
- std::string ``[link boost_asio.reference.ip__address_v4.to_string.overload2 to_string]``(
- boost::system::error_code & ec) const;
-
 
-[section:overload1 ip::address_v4::to_string (1 of 2 overloads)]
+[section:stream_descriptor_service posix::stream_descriptor_service::stream_descriptor_service]
 
-Get the address as a string in dotted decimal format.
+Construct a new stream descriptor service for the specified io_service.
 
- std::string to_string() const;
+ stream_descriptor_service(
+ boost::asio::io_service & io_service);
 
 
 
@@ -25803,50 +45759,64 @@
 
 
 
-[section:overload2 ip::address_v4::to_string (2 of 2 overloads)]
-
-Get the address as a string in dotted decimal format.
-
- std::string to_string(
- boost::system::error_code & ec) const;
+[section:write_some posix::stream_descriptor_service::write_some]
 
+Write the given data to the stream.
 
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t write_some(
+ implementation_type & impl,
+ const ConstBufferSequence & buffers,
+ boost::system::error_code & ec);
 
-[endsect]
 
 
 [endsect]
 
 
-[section:to_ulong ip::address_v4::to_ulong]
-
-Get the address as an unsigned long in host byte order.
 
- unsigned long to_ulong() const;
+[endsect]
 
+[section:raw_socket_service raw_socket_service]
 
+Default service implementation for a raw socket.
 
-[endsect]
+ template<
+ typename ``[link boost_asio.reference.Protocol Protocol]``>
+ class raw_socket_service :
+ public io_service::service
 
 
+[heading Types]
+[table
+ [[Name][Description]]
 
-[endsect]
+ [
 
-[section:ip__address_v6 ip::address_v6]
+ [[link boost_asio.reference.raw_socket_service.endpoint_type [*endpoint_type]]]
+ [The endpoint type. ]
+
+ ]
 
-Implements IP version 6 style addresses.
+ [
 
- class address_v6
+ [[link boost_asio.reference.raw_socket_service.implementation_type [*implementation_type]]]
+ [The type of a raw socket. ]
+
+ ]
 
+ [
 
-[heading Types]
-[table
- [[Name][Description]]
+ [[link boost_asio.reference.raw_socket_service.native_type [*native_type]]]
+ [The native socket type. ]
+
+ ]
 
   [
 
- [[link boost_asio.reference.ip__address_v6.bytes_type [*bytes_type]]]
- [The type used to represent an address as an array of bytes. ]
+ [[link boost_asio.reference.raw_socket_service.protocol_type [*protocol_type]]]
+ [The protocol type. ]
   
   ]
 
@@ -25857,188 +45827,200 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.ip__address_v6.address_v6 [*address_v6]]]
- [Default constructor. ]
+ [[link boost_asio.reference.raw_socket_service.assign [*assign]]]
+ [Assign an existing native socket to a raw socket. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.any [*any]]]
- [Obtain an address object that represents any address. ]
+ [[link boost_asio.reference.raw_socket_service.async_connect [*async_connect]]]
+ [Start an asynchronous connect. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.from_string [*from_string]]]
- [Create an address from an IP address string. ]
+ [[link boost_asio.reference.raw_socket_service.async_receive [*async_receive]]]
+ [Start an asynchronous receive. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.is_link_local [*is_link_local]]]
- [Determine whether the address is link local. ]
+ [[link boost_asio.reference.raw_socket_service.async_receive_from [*async_receive_from]]]
+ [Start an asynchronous receive that will get the endpoint of the sender. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.is_loopback [*is_loopback]]]
- [Determine whether the address is a loopback address. ]
+ [[link boost_asio.reference.raw_socket_service.async_send [*async_send]]]
+ [Start an asynchronous send. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.is_multicast [*is_multicast]]]
- [Determine whether the address is a multicast address. ]
+ [[link boost_asio.reference.raw_socket_service.async_send_to [*async_send_to]]]
+ [Start an asynchronous send. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.is_multicast_global [*is_multicast_global]]]
- [Determine whether the address is a global multicast address. ]
+ [[link boost_asio.reference.raw_socket_service.at_mark [*at_mark]]]
+ [Determine whether the socket is at the out-of-band data mark. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.is_multicast_link_local [*is_multicast_link_local]]]
- [Determine whether the address is a link-local multicast address. ]
+ [[link boost_asio.reference.raw_socket_service.available [*available]]]
+ [Determine the number of bytes available for reading. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.is_multicast_node_local [*is_multicast_node_local]]]
- [Determine whether the address is a node-local multicast address. ]
+ [[link boost_asio.reference.raw_socket_service.bind [*bind]]]
+ []
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.is_multicast_org_local [*is_multicast_org_local]]]
- [Determine whether the address is a org-local multicast address. ]
+ [[link boost_asio.reference.raw_socket_service.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the socket. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.is_multicast_site_local [*is_multicast_site_local]]]
- [Determine whether the address is a site-local multicast address. ]
+ [[link boost_asio.reference.raw_socket_service.close [*close]]]
+ [Close a raw socket implementation. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.is_site_local [*is_site_local]]]
- [Determine whether the address is site local. ]
+ [[link boost_asio.reference.raw_socket_service.connect [*connect]]]
+ [Connect the raw socket to the specified endpoint. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.is_unspecified [*is_unspecified]]]
- [Determine whether the address is unspecified. ]
+ [[link boost_asio.reference.raw_socket_service.construct [*construct]]]
+ [Construct a new raw socket implementation. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.is_v4_compatible [*is_v4_compatible]]]
- [Determine whether the address is an IPv4-compatible address. ]
+ [[link boost_asio.reference.raw_socket_service.destroy [*destroy]]]
+ [Destroy a raw socket implementation. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.is_v4_mapped [*is_v4_mapped]]]
- [Determine whether the address is a mapped IPv4 address. ]
+ [[link boost_asio.reference.raw_socket_service.get_io_service [*get_io_service]]]
+ [Get the io_service object that owns the service. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.loopback [*loopback]]]
- [Obtain an address object that represents the loopback address. ]
+ [[link boost_asio.reference.raw_socket_service.get_option [*get_option]]]
+ [Get a socket option. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.operator_eq_ [*operator=]]]
- [Assign from another address. ]
+ [[link boost_asio.reference.raw_socket_service.io_control [*io_control]]]
+ [Perform an IO control command on the socket. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.scope_id [*scope_id]]]
- [The scope ID of the address. ]
+ [[link boost_asio.reference.raw_socket_service.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service object that owns the service. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.to_bytes [*to_bytes]]]
- [Get the address in bytes. ]
+ [[link boost_asio.reference.raw_socket_service.is_open [*is_open]]]
+ [Determine whether the socket is open. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.to_string [*to_string]]]
- [Get the address as a string. ]
+ [[link boost_asio.reference.raw_socket_service.local_endpoint [*local_endpoint]]]
+ [Get the local endpoint. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.to_v4 [*to_v4]]]
- [Converts an IPv4-mapped or IPv4-compatible address to an IPv4 address. ]
+ [[link boost_asio.reference.raw_socket_service.native [*native]]]
+ [Get the native socket implementation. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.v4_compatible [*v4_compatible]]]
- [Create an IPv4-compatible IPv6 address. ]
+ [[link boost_asio.reference.raw_socket_service.open [*open]]]
+ []
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.v4_mapped [*v4_mapped]]]
- [Create an IPv4-mapped IPv6 address. ]
+ [[link boost_asio.reference.raw_socket_service.raw_socket_service [*raw_socket_service]]]
+ [Construct a new raw socket service for the specified io_service. ]
   ]
   
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
   [
- [[link boost_asio.reference.ip__address_v6.operator_not__eq_ [*operator!=]]]
- [Compare two addresses for inequality. ]
+ [[link boost_asio.reference.raw_socket_service.receive [*receive]]]
+ [Receive some data from the peer. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.operator_lt_ [*operator<]]]
- [Compare addresses for ordering. ]
+ [[link boost_asio.reference.raw_socket_service.receive_from [*receive_from]]]
+ [Receive raw data with the endpoint of the sender. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.operator_lt__eq_ [*operator<=]]]
- [Compare addresses for ordering. ]
+ [[link boost_asio.reference.raw_socket_service.remote_endpoint [*remote_endpoint]]]
+ [Get the remote endpoint. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.operator_eq__eq_ [*operator==]]]
- [Compare two addresses for equality. ]
+ [[link boost_asio.reference.raw_socket_service.send [*send]]]
+ [Send the given data to the peer. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.operator_gt_ [*operator>]]]
- [Compare addresses for ordering. ]
+ [[link boost_asio.reference.raw_socket_service.send_to [*send_to]]]
+ [Send raw data to the specified endpoint. ]
   ]
   
   [
- [[link boost_asio.reference.ip__address_v6.operator_gt__eq_ [*operator>=]]]
- [Compare addresses for ordering. ]
+ [[link boost_asio.reference.raw_socket_service.set_option [*set_option]]]
+ [Set a socket option. ]
+ ]
+
+ [
+ [[link boost_asio.reference.raw_socket_service.shutdown [*shutdown]]]
+ [Disable sends or receives on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.raw_socket_service.shutdown_service [*shutdown_service]]]
+ [Destroy all user-defined handler objects owned by the service. ]
   ]
   
 ]
 
-The
-[link boost_asio.reference.ip__address_v6 ip::address_v6] class provides the ability to use and manipulate IP version 6 addresses.
+[heading Data Members]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.raw_socket_service.id [*id]]]
+ [The unique service identifier. ]
+ ]
 
-[heading Thread Safety]
-
-[*Distinct] [*objects:] Safe.
+]
 
-[*Shared] [*objects:] Unsafe.
 
+[section:assign raw_socket_service::assign]
 
-[section:address_v6 ip::address_v6::address_v6]
+Assign an existing native socket to a raw socket.
 
-Default constructor.
+ boost::system::error_code assign(
+ implementation_type & impl,
+ const protocol_type & protocol,
+ const native_type & native_socket,
+ boost::system::error_code & ec);
 
- ``[link boost_asio.reference.ip__address_v6.address_v6.overload1 address_v6]``();
 
- ``[link boost_asio.reference.ip__address_v6.address_v6.overload2 address_v6]``(
- const bytes_type & bytes,
- unsigned long scope_id = 0);
 
- ``[link boost_asio.reference.ip__address_v6.address_v6.overload3 address_v6]``(
- const address_v6 & other);
+[endsect]
 
 
-[section:overload1 ip::address_v6::address_v6 (1 of 3 overloads)]
 
-Default constructor.
+[section:async_connect raw_socket_service::async_connect]
 
- address_v6();
+Start an asynchronous connect.
+
+ template<
+ typename ``[link boost_asio.reference.ConnectHandler ConnectHandler]``>
+ void async_connect(
+ implementation_type & impl,
+ const endpoint_type & peer_endpoint,
+ ConnectHandler handler);
 
 
 
@@ -26046,13 +46028,18 @@
 
 
 
-[section:overload2 ip::address_v6::address_v6 (2 of 3 overloads)]
+[section:async_receive raw_socket_service::async_receive]
 
-Construct an address from raw bytes and scope ID.
+Start an asynchronous receive.
 
- address_v6(
- const bytes_type & bytes,
- unsigned long scope_id = 0);
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_receive(
+ implementation_type & impl,
+ const MutableBufferSequence & buffers,
+ socket_base::message_flags flags,
+ ReadHandler handler);
 
 
 
@@ -26060,26 +46047,58 @@
 
 
 
-[section:overload3 ip::address_v6::address_v6 (3 of 3 overloads)]
+[section:async_receive_from raw_socket_service::async_receive_from]
 
-Copy constructor.
+Start an asynchronous receive that will get the endpoint of the sender.
 
- address_v6(
- const address_v6 & other);
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_receive_from(
+ implementation_type & impl,
+ const MutableBufferSequence & buffers,
+ endpoint_type & sender_endpoint,
+ socket_base::message_flags flags,
+ ReadHandler handler);
 
 
 
 [endsect]
 
 
+
+[section:async_send raw_socket_service::async_send]
+
+Start an asynchronous send.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_send(
+ implementation_type & impl,
+ const ConstBufferSequence & buffers,
+ socket_base::message_flags flags,
+ WriteHandler handler);
+
+
+
 [endsect]
 
 
-[section:any ip::address_v6::any]
 
-Obtain an address object that represents any address.
+[section:async_send_to raw_socket_service::async_send_to]
 
- static address_v6 any();
+Start an asynchronous send.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_send_to(
+ implementation_type & impl,
+ const ConstBufferSequence & buffers,
+ const endpoint_type & destination,
+ socket_base::message_flags flags,
+ WriteHandler handler);
 
 
 
@@ -26087,43 +46106,70 @@
 
 
 
-[section:bytes_type ip::address_v6::bytes_type]
+[section:at_mark raw_socket_service::at_mark]
 
-The type used to represent an address as an array of bytes.
+Determine whether the socket is at the out-of-band data mark.
+
+ bool at_mark(
+ const implementation_type & impl,
+ boost::system::error_code & ec) const;
 
- typedef boost::array< unsigned char, 16 > bytes_type;
 
 
+[endsect]
+
+
+
+[section:available raw_socket_service::available]
+
+Determine the number of bytes available for reading.
+
+ std::size_t available(
+ const implementation_type & impl,
+ boost::system::error_code & ec) const;
+
 
 
 [endsect]
 
 
-[section:from_string ip::address_v6::from_string]
 
-Create an address from an IP address string.
+[section:bind raw_socket_service::bind]
 
- static address_v6 ``[link boost_asio.reference.ip__address_v6.from_string.overload1 from_string]``(
- const char * str);
 
- static address_v6 ``[link boost_asio.reference.ip__address_v6.from_string.overload2 from_string]``(
- const char * str,
+
+ boost::system::error_code bind(
+ implementation_type & impl,
+ const endpoint_type & endpoint,
       boost::system::error_code & ec);
 
- static address_v6 ``[link boost_asio.reference.ip__address_v6.from_string.overload3 from_string]``(
- const std::string & str);
 
- static address_v6 ``[link boost_asio.reference.ip__address_v6.from_string.overload4 from_string]``(
- const std::string & str,
+
+[endsect]
+
+
+
+[section:cancel raw_socket_service::cancel]
+
+Cancel all asynchronous operations associated with the socket.
+
+ boost::system::error_code cancel(
+ implementation_type & impl,
       boost::system::error_code & ec);
 
 
-[section:overload1 ip::address_v6::from_string (1 of 4 overloads)]
 
-Create an address from an IP address string.
+[endsect]
 
- static address_v6 from_string(
- const char * str);
+
+
+[section:close raw_socket_service::close]
+
+Close a raw socket implementation.
+
+ boost::system::error_code close(
+ implementation_type & impl,
+ boost::system::error_code & ec);
 
 
 
@@ -26131,12 +46177,13 @@
 
 
 
-[section:overload2 ip::address_v6::from_string (2 of 4 overloads)]
+[section:connect raw_socket_service::connect]
 
-Create an address from an IP address string.
+Connect the raw socket to the specified endpoint.
 
- static address_v6 from_string(
- const char * str,
+ boost::system::error_code connect(
+ implementation_type & impl,
+ const endpoint_type & peer_endpoint,
       boost::system::error_code & ec);
 
 
@@ -26145,12 +46192,12 @@
 
 
 
-[section:overload3 ip::address_v6::from_string (3 of 4 overloads)]
+[section:construct raw_socket_service::construct]
 
-Create an address from an IP address string.
+Construct a new raw socket implementation.
 
- static address_v6 from_string(
- const std::string & str);
+ void construct(
+ implementation_type & impl);
 
 
 
@@ -26158,12 +46205,98 @@
 
 
 
-[section:overload4 ip::address_v6::from_string (4 of 4 overloads)]
+[section:destroy raw_socket_service::destroy]
 
-Create an address from an IP address string.
+Destroy a raw socket implementation.
 
- static address_v6 from_string(
- const std::string & str,
+ void destroy(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:endpoint_type raw_socket_service::endpoint_type]
+
+The endpoint type.
+
+ typedef Protocol::endpoint endpoint_type;
+
+
+
+
+[endsect]
+
+
+
+[section:get_io_service raw_socket_service::get_io_service]
+
+
+['Inherited from io_service.]
+
+Get the io_service object that owns the service.
+
+ boost::asio::io_service & get_io_service();
+
+
+
+[endsect]
+
+
+
+[section:get_option raw_socket_service::get_option]
+
+Get a socket option.
+
+ template<
+ typename ``[link boost_asio.reference.GettableSocketOption GettableSocketOption]``>
+ boost::system::error_code get_option(
+ const implementation_type & impl,
+ GettableSocketOption & option,
+ boost::system::error_code & ec) const;
+
+
+
+[endsect]
+
+
+
+[section:id raw_socket_service::id]
+
+The unique service identifier.
+
+ static boost::asio::io_service::id id;
+
+
+
+[endsect]
+
+
+
+[section:implementation_type raw_socket_service::implementation_type]
+
+The type of a raw socket.
+
+ typedef implementation_defined implementation_type;
+
+
+
+
+[endsect]
+
+
+
+[section:io_control raw_socket_service::io_control]
+
+Perform an IO control command on the socket.
+
+ template<
+ typename ``[link boost_asio.reference.IoControlCommand IoControlCommand]``>
+ boost::system::error_code io_control(
+ implementation_type & impl,
+ IoControlCommand & command,
       boost::system::error_code & ec);
 
 
@@ -26171,14 +46304,28 @@
 [endsect]
 
 
+
+[section:io_service raw_socket_service::io_service]
+
+
+['Inherited from io_service.]
+
+(Deprecated: use get_io_service().) Get the io_service object that owns the service.
+
+ boost::asio::io_service & io_service();
+
+
+
 [endsect]
 
 
-[section:is_link_local ip::address_v6::is_link_local]
 
-Determine whether the address is link local.
+[section:is_open raw_socket_service::is_open]
 
- bool is_link_local() const;
+Determine whether the socket is open.
+
+ bool is_open(
+ const implementation_type & impl) const;
 
 
 
@@ -26186,11 +46333,13 @@
 
 
 
-[section:is_loopback ip::address_v6::is_loopback]
+[section:local_endpoint raw_socket_service::local_endpoint]
 
-Determine whether the address is a loopback address.
+Get the local endpoint.
 
- bool is_loopback() const;
+ endpoint_type local_endpoint(
+ const implementation_type & impl,
+ boost::system::error_code & ec) const;
 
 
 
@@ -26198,11 +46347,12 @@
 
 
 
-[section:is_multicast ip::address_v6::is_multicast]
+[section:native raw_socket_service::native]
 
-Determine whether the address is a multicast address.
+Get the native socket implementation.
 
- bool is_multicast() const;
+ native_type native(
+ implementation_type & impl);
 
 
 
@@ -26210,11 +46360,12 @@
 
 
 
-[section:is_multicast_global ip::address_v6::is_multicast_global]
+[section:native_type raw_socket_service::native_type]
 
-Determine whether the address is a global multicast address.
+The native socket type.
+
+ typedef implementation_defined native_type;
 
- bool is_multicast_global() const;
 
 
 
@@ -26222,11 +46373,14 @@
 
 
 
-[section:is_multicast_link_local ip::address_v6::is_multicast_link_local]
+[section:open raw_socket_service::open]
 
-Determine whether the address is a link-local multicast address.
 
- bool is_multicast_link_local() const;
+
+ boost::system::error_code open(
+ implementation_type & impl,
+ const protocol_type & protocol,
+ boost::system::error_code & ec);
 
 
 
@@ -26234,11 +46388,12 @@
 
 
 
-[section:is_multicast_node_local ip::address_v6::is_multicast_node_local]
+[section:protocol_type raw_socket_service::protocol_type]
 
-Determine whether the address is a node-local multicast address.
+The protocol type.
+
+ typedef Protocol protocol_type;
 
- bool is_multicast_node_local() const;
 
 
 
@@ -26246,11 +46401,12 @@
 
 
 
-[section:is_multicast_org_local ip::address_v6::is_multicast_org_local]
+[section:raw_socket_service raw_socket_service::raw_socket_service]
 
-Determine whether the address is a org-local multicast address.
+Construct a new raw socket service for the specified io_service.
 
- bool is_multicast_org_local() const;
+ raw_socket_service(
+ boost::asio::io_service & io_service);
 
 
 
@@ -26258,11 +46414,17 @@
 
 
 
-[section:is_multicast_site_local ip::address_v6::is_multicast_site_local]
+[section:receive raw_socket_service::receive]
 
-Determine whether the address is a site-local multicast address.
+Receive some data from the peer.
 
- bool is_multicast_site_local() const;
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t receive(
+ implementation_type & impl,
+ const MutableBufferSequence & buffers,
+ socket_base::message_flags flags,
+ boost::system::error_code & ec);
 
 
 
@@ -26270,11 +46432,18 @@
 
 
 
-[section:is_site_local ip::address_v6::is_site_local]
+[section:receive_from raw_socket_service::receive_from]
 
-Determine whether the address is site local.
+Receive raw data with the endpoint of the sender.
 
- bool is_site_local() const;
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t receive_from(
+ implementation_type & impl,
+ const MutableBufferSequence & buffers,
+ endpoint_type & sender_endpoint,
+ socket_base::message_flags flags,
+ boost::system::error_code & ec);
 
 
 
@@ -26282,11 +46451,13 @@
 
 
 
-[section:is_unspecified ip::address_v6::is_unspecified]
+[section:remote_endpoint raw_socket_service::remote_endpoint]
 
-Determine whether the address is unspecified.
+Get the remote endpoint.
 
- bool is_unspecified() const;
+ endpoint_type remote_endpoint(
+ const implementation_type & impl,
+ boost::system::error_code & ec) const;
 
 
 
@@ -26294,11 +46465,17 @@
 
 
 
-[section:is_v4_compatible ip::address_v6::is_v4_compatible]
+[section:send raw_socket_service::send]
 
-Determine whether the address is an IPv4-compatible address.
+Send the given data to the peer.
 
- bool is_v4_compatible() const;
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t send(
+ implementation_type & impl,
+ const ConstBufferSequence & buffers,
+ socket_base::message_flags flags,
+ boost::system::error_code & ec);
 
 
 
@@ -26306,11 +46483,18 @@
 
 
 
-[section:is_v4_mapped ip::address_v6::is_v4_mapped]
+[section:send_to raw_socket_service::send_to]
 
-Determine whether the address is a mapped IPv4 address.
+Send raw data to the specified endpoint.
 
- bool is_v4_mapped() const;
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t send_to(
+ implementation_type & impl,
+ const ConstBufferSequence & buffers,
+ const endpoint_type & destination,
+ socket_base::message_flags flags,
+ boost::system::error_code & ec);
 
 
 
@@ -26318,11 +46502,16 @@
 
 
 
-[section:loopback ip::address_v6::loopback]
+[section:set_option raw_socket_service::set_option]
 
-Obtain an address object that represents the loopback address.
+Set a socket option.
 
- static address_v6 loopback();
+ template<
+ typename ``[link boost_asio.reference.SettableSocketOption SettableSocketOption]``>
+ boost::system::error_code set_option(
+ implementation_type & impl,
+ const SettableSocketOption & option,
+ boost::system::error_code & ec);
 
 
 
@@ -26330,13 +46519,14 @@
 
 
 
-[section:operator_not__eq_ ip::address_v6::operator!=]
+[section:shutdown raw_socket_service::shutdown]
 
-Compare two addresses for inequality.
+Disable sends or receives on the socket.
 
- friend bool operator!=(
- const address_v6 & a1,
- const address_v6 & a2);
+ boost::system::error_code shutdown(
+ implementation_type & impl,
+ socket_base::shutdown_type what,
+ boost::system::error_code & ec);
 
 
 
@@ -26344,68 +46534,144 @@
 
 
 
-[section:operator_lt_ ip::address_v6::operator<]
+[section:shutdown_service raw_socket_service::shutdown_service]
 
-Compare addresses for ordering.
+Destroy all user-defined handler objects owned by the service.
 
- friend bool operator<(
- const address_v6 & a1,
- const address_v6 & a2);
+ void shutdown_service();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:read read]
+
+Attempt to read a certain amount of data from a stream before returning.
+
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.read.overload1 read]``(
+ SyncReadStream & s,
+ const MutableBufferSequence & buffers);
+
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename CompletionCondition>
+ std::size_t ``[link boost_asio.reference.read.overload2 read]``(
+ SyncReadStream & s,
+ const MutableBufferSequence & buffers,
+ CompletionCondition completion_condition);
 
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename CompletionCondition>
+ std::size_t ``[link boost_asio.reference.read.overload3 read]``(
+ SyncReadStream & s,
+ const MutableBufferSequence & buffers,
+ CompletionCondition completion_condition,
+ boost::system::error_code & ec);
 
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename Allocator>
+ std::size_t ``[link boost_asio.reference.read.overload4 read]``(
+ SyncReadStream & s,
+ basic_streambuf< Allocator > & b);
 
-[endsect]
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename Allocator,
+ typename CompletionCondition>
+ std::size_t ``[link boost_asio.reference.read.overload5 read]``(
+ SyncReadStream & s,
+ basic_streambuf< Allocator > & b,
+ CompletionCondition completion_condition);
 
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename Allocator,
+ typename CompletionCondition>
+ std::size_t ``[link boost_asio.reference.read.overload6 read]``(
+ SyncReadStream & s,
+ basic_streambuf< Allocator > & b,
+ CompletionCondition completion_condition,
+ boost::system::error_code & ec);
 
 
-[section:operator_lt__eq_ ip::address_v6::operator<=]
+[section:overload1 read (1 of 6 overloads)]
 
-Compare addresses for ordering.
+Attempt to read a certain amount of data from a stream before returning.
 
- friend bool operator<=(
- const address_v6 & a1,
- const address_v6 & a2);
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t read(
+ SyncReadStream & s,
+ const MutableBufferSequence & buffers);
 
 
+This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
 
-[endsect]
 
+* The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
 
+* An error occurred.
 
-[section:operator_eq_ ip::address_v6::operator=]
+This operation is implemented in terms of one or more calls to the stream's read\_some function.
 
-Assign from another address.
 
- address_v6 & operator=(
- const address_v6 & other);
+[heading Parameters]
+
 
+[variablelist
+
+[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
 
+[[buffers][One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the stream.]]
 
-[endsect]
+]
 
+[heading Return Value]
+
+The number of bytes transferred.
 
+[heading Exceptions]
+
 
-[section:operator_eq__eq_ ip::address_v6::operator==]
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
 
-Compare two addresses for equality.
+]
 
- friend bool operator==(
- const address_v6 & a1,
- const address_v6 & a2);
+[heading Example]
+
+To read into a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
 
+ boost::asio::read(s, boost::asio::buffer(data, size));
 
 
-[endsect]
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
+[heading Remarks]
+
+This overload is equivalent to calling:
 
+ boost::asio::read(
+ s, buffers,
+ boost::asio::transfer_all());
 
-[section:operator_gt_ ip::address_v6::operator>]
 
-Compare addresses for ordering.
 
- friend bool operator>(
- const address_v6 & a1,
- const address_v6 & a2);
 
 
 
@@ -26413,275 +46679,265 @@
 
 
 
-[section:operator_gt__eq_ ip::address_v6::operator>=]
-
-Compare addresses for ordering.
-
- friend bool operator>=(
- const address_v6 & a1,
- const address_v6 & a2);
+[section:overload2 read (2 of 6 overloads)]
 
+Attempt to read a certain amount of data from a stream before returning.
 
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename CompletionCondition>
+ std::size_t read(
+ SyncReadStream & s,
+ const MutableBufferSequence & buffers,
+ CompletionCondition completion_condition);
 
-[endsect]
 
+This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
 
-[section:scope_id ip::address_v6::scope_id]
 
-The scope ID of the address.
+* The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
 
- unsigned long ``[link boost_asio.reference.ip__address_v6.scope_id.overload1 scope_id]``() const;
+* The completion_condition function object returns true.
 
- void ``[link boost_asio.reference.ip__address_v6.scope_id.overload2 scope_id]``(
- unsigned long id);
+This operation is implemented in terms of one or more calls to the stream's read\_some function.
 
 
-[section:overload1 ip::address_v6::scope_id (1 of 2 overloads)]
+[heading Parameters]
+
 
-The scope ID of the address.
+[variablelist
+
+[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
 
- unsigned long scope_id() const;
+[[buffers][One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the stream.]]
 
+[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
+``
+ bool completion_condition(
+ const boost::system::error_code& error, // Result of latest read_some
+ // operation.
 
-Returns the scope ID associated with the IPv6 address.
+ std::size_t bytes_transferred // Number of bytes transferred
+ // so far.
+ );
 
+``
+A return value of true indicates that the read operation is complete. False indicates that further calls to the stream's read\_some function are required.]]
 
-[endsect]
+]
 
+[heading Return Value]
+
+The number of bytes transferred.
 
+[heading Exceptions]
+
 
-[section:overload2 ip::address_v6::scope_id (2 of 2 overloads)]
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
 
-The scope ID of the address.
+]
 
- void scope_id(
- unsigned long id);
+[heading Example]
+
+To read into a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
 
+ boost::asio::read(s, boost::asio::buffer(data, size),
+ boost::asio::transfer_at_least(32));
 
-Modifies the scope ID associated with the IPv6 address.
 
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
-[endsect]
 
 
 [endsect]
 
 
-[section:to_bytes ip::address_v6::to_bytes]
-
-Get the address in bytes.
-
- bytes_type to_bytes() const;
-
 
+[section:overload3 read (3 of 6 overloads)]
 
-[endsect]
+Attempt to read a certain amount of data from a stream before returning.
 
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename CompletionCondition>
+ std::size_t read(
+ SyncReadStream & s,
+ const MutableBufferSequence & buffers,
+ CompletionCondition completion_condition,
+ boost::system::error_code & ec);
 
-[section:to_string ip::address_v6::to_string]
 
-Get the address as a string.
+This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
 
- std::string ``[link boost_asio.reference.ip__address_v6.to_string.overload1 to_string]``() const;
 
- std::string ``[link boost_asio.reference.ip__address_v6.to_string.overload2 to_string]``(
- boost::system::error_code & ec) const;
+* The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
 
+* The completion_condition function object returns true.
 
-[section:overload1 ip::address_v6::to_string (1 of 2 overloads)]
+This operation is implemented in terms of one or more calls to the stream's read\_some function.
 
-Get the address as a string.
 
- std::string to_string() const;
+[heading Parameters]
+
 
+[variablelist
+
+[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
 
+[[buffers][One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the stream.]]
 
-[endsect]
+[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
+``
+ bool completion_condition(
+ const boost::system::error_code& error, // Result of latest read_some
+ // operation.
 
+ std::size_t bytes_transferred // Number of bytes transferred
+ // so far.
+ );
 
+``
+A return value of true indicates that the read operation is complete. False indicates that further calls to the stream's read\_some function are required.]]
 
-[section:overload2 ip::address_v6::to_string (2 of 2 overloads)]
+[[ec][Set to indicate what error occurred, if any.]]
 
-Get the address as a string.
+]
 
- std::string to_string(
- boost::system::error_code & ec) const;
+[heading Return Value]
+
+The number of bytes read. If an error occurs, returns the total number of bytes successfully transferred prior to the error.
 
 
 
 [endsect]
 
 
-[endsect]
-
 
-[section:to_v4 ip::address_v6::to_v4]
+[section:overload4 read (4 of 6 overloads)]
 
-Converts an IPv4-mapped or IPv4-compatible address to an IPv4 address.
+Attempt to read a certain amount of data from a stream before returning.
 
- address_v4 to_v4() const;
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename Allocator>
+ std::size_t read(
+ SyncReadStream & s,
+ basic_streambuf< Allocator > & b);
 
 
+This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
 
-[endsect]
 
+* An error occurred.
 
+This operation is implemented in terms of one or more calls to the stream's read\_some function.
 
-[section:v4_compatible ip::address_v6::v4_compatible]
 
-Create an IPv4-compatible IPv6 address.
+[heading Parameters]
+
 
- static address_v6 v4_compatible(
- const address_v4 & addr);
+[variablelist
+
+[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
 
+[[b][The basic\_streambuf object into which the data will be read.]]
 
+]
 
-[endsect]
+[heading Return Value]
+
+The number of bytes transferred.
 
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
 
-[section:v4_mapped ip::address_v6::v4_mapped]
+]
 
-Create an IPv4-mapped IPv6 address.
+[heading Remarks]
+
+This overload is equivalent to calling:
 
- static address_v6 v4_mapped(
- const address_v4 & addr);
+ boost::asio::read(
+ s, b,
+ boost::asio::transfer_all());
 
 
 
-[endsect]
 
 
 
 [endsect]
 
-[section:ip__basic_endpoint ip::basic_endpoint]
-
-Describes an endpoint for a version-independent IP socket.
-
- template<
- typename ``[link boost_asio.reference.InternetProtocol InternetProtocol]``>
- class basic_endpoint
-
-
-[heading Types]
-[table
- [[Name][Description]]
 
- [
 
- [[link boost_asio.reference.ip__basic_endpoint.data_type [*data_type]]]
- [The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. ]
-
- ]
+[section:overload5 read (5 of 6 overloads)]
 
- [
+Attempt to read a certain amount of data from a stream before returning.
 
- [[link boost_asio.reference.ip__basic_endpoint.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint. ]
-
- ]
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename Allocator,
+ typename CompletionCondition>
+ std::size_t read(
+ SyncReadStream & s,
+ basic_streambuf< Allocator > & b,
+ CompletionCondition completion_condition);
 
-]
 
-[heading Member Functions]
-[table
- [[Name][Description]]
+This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
 
- [
- [[link boost_asio.reference.ip__basic_endpoint.address [*address]]]
- [Get the IP address associated with the endpoint. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_endpoint.basic_endpoint [*basic_endpoint]]]
- [Default constructor. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_endpoint.capacity [*capacity]]]
- [Get the capacity of the endpoint in the native type. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_endpoint.data [*data]]]
- [Get the underlying endpoint in the native type. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_endpoint.operator_eq_ [*operator=]]]
- [Assign from another endpoint. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_endpoint.port [*port]]]
- [Get the port associated with the endpoint. The port number is always in the host's byte order. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_endpoint.protocol [*protocol]]]
- [The protocol associated with the endpoint. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_endpoint.resize [*resize]]]
- [Set the underlying size of the endpoint in the native type. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_endpoint.size [*size]]]
- [Get the underlying size of the endpoint in the native type. ]
- ]
-
-]
 
-[heading Friends]
-[table
- [[Name][Description]]
+* The completion_condition function object returns true.
 
- [
- [[link boost_asio.reference.ip__basic_endpoint.operator_not__eq_ [*operator!=]]]
- [Compare two endpoints for inequality. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_endpoint.operator_lt_ [*operator<]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_endpoint.operator_eq__eq_ [*operator==]]]
- [Compare two endpoints for equality. ]
- ]
-
-]
+This operation is implemented in terms of one or more calls to the stream's read\_some function.
 
-The
-[link boost_asio.reference.ip__basic_endpoint ip::basic_endpoint] class template describes an endpoint that may be associated with a particular socket.
 
+[heading Parameters]
+
 
-[heading Thread Safety]
+[variablelist
   
-[*Distinct] [*objects:] Safe.
-
-[*Shared] [*objects:] Unsafe.
+[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
 
+[[b][The basic\_streambuf object into which the data will be read.]]
 
-[section:address ip::basic_endpoint::address]
+[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
+``
+ bool completion_condition(
+ const boost::system::error_code& error, // Result of latest read_some
+ // operation.
 
-Get the IP address associated with the endpoint.
+ std::size_t bytes_transferred // Number of bytes transferred
+ // so far.
+ );
 
- boost::asio::ip::address ``[link boost_asio.reference.ip__basic_endpoint.address.overload1 address]``() const;
+``
+A return value of true indicates that the read operation is complete. False indicates that further calls to the stream's read\_some function are required.]]
 
- void ``[link boost_asio.reference.ip__basic_endpoint.address.overload2 address]``(
- const boost::asio::ip::address & addr);
+]
 
+[heading Return Value]
+
+The number of bytes transferred.
 
-[section:overload1 ip::basic_endpoint::address (1 of 2 overloads)]
+[heading Exceptions]
+
 
-Get the IP address associated with the endpoint.
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
 
- boost::asio::ip::address address() const;
+]
 
 
 
@@ -26689,162 +46945,281 @@
 
 
 
-[section:overload2 ip::basic_endpoint::address (2 of 2 overloads)]
+[section:overload6 read (6 of 6 overloads)]
 
-Set the IP address associated with the endpoint.
+Attempt to read a certain amount of data from a stream before returning.
 
- void address(
- const boost::asio::ip::address & addr);
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename Allocator,
+ typename CompletionCondition>
+ std::size_t read(
+ SyncReadStream & s,
+ basic_streambuf< Allocator > & b,
+ CompletionCondition completion_condition,
+ boost::system::error_code & ec);
 
 
+This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
 
-[endsect]
 
+* The completion_condition function object returns true.
 
-[endsect]
+This operation is implemented in terms of one or more calls to the stream's read\_some function.
 
-[section:basic_endpoint ip::basic_endpoint::basic_endpoint]
 
-Default constructor.
+[heading Parameters]
+
 
- ``[link boost_asio.reference.ip__basic_endpoint.basic_endpoint.overload1 basic_endpoint]``();
+[variablelist
+
+[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
 
- ``[link boost_asio.reference.ip__basic_endpoint.basic_endpoint.overload2 basic_endpoint]``(
- const InternetProtocol & protocol,
- unsigned short port_num);
+[[b][The basic\_streambuf object into which the data will be read.]]
 
- ``[link boost_asio.reference.ip__basic_endpoint.basic_endpoint.overload3 basic_endpoint]``(
- const boost::asio::ip::address & addr,
- unsigned short port_num);
+[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
+``
+ bool completion_condition(
+ const boost::system::error_code& error, // Result of latest read_some
+ // operation.
 
- ``[link boost_asio.reference.ip__basic_endpoint.basic_endpoint.overload4 basic_endpoint]``(
- const basic_endpoint & other);
+ std::size_t bytes_transferred // Number of bytes transferred
+ // so far.
+ );
 
+``
+A return value of true indicates that the read operation is complete. False indicates that further calls to the stream's read\_some function are required.]]
 
-[section:overload1 ip::basic_endpoint::basic_endpoint (1 of 4 overloads)]
+[[ec][Set to indicate what error occurred, if any.]]
 
-Default constructor.
+]
 
- basic_endpoint();
+[heading Return Value]
+
+The number of bytes read. If an error occurs, returns the total number of bytes successfully transferred prior to the error.
 
 
 
 [endsect]
 
 
+[endsect]
 
-[section:overload2 ip::basic_endpoint::basic_endpoint (2 of 4 overloads)]
-
-Construct an endpoint using a port number, specified in the host's byte order. The IP address will be the any address (i.e. INADDR_ANY or in6addr_any). This constructor would typically be used for accepting new connections.
-
- basic_endpoint(
- const InternetProtocol & protocol,
- unsigned short port_num);
+[section:read_at read_at]
 
+Attempt to read a certain amount of data at the specified offset before returning.
 
+ template<
+ typename ``[link boost_asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.read_at.overload1 read_at]``(
+ SyncRandomAccessReadDevice & d,
+ boost::uint64_t offset,
+ const MutableBufferSequence & buffers);
 
-[heading Examples]
-
-To initialise an IPv4 TCP endpoint for port 1234, use:
+ template<
+ typename ``[link boost_asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename CompletionCondition>
+ std::size_t ``[link boost_asio.reference.read_at.overload2 read_at]``(
+ SyncRandomAccessReadDevice & d,
+ boost::uint64_t offset,
+ const MutableBufferSequence & buffers,
+ CompletionCondition completion_condition);
 
- boost::asio::ip::tcp::endpoint ep(boost::asio::ip::tcp::v4(), 1234);
+ template<
+ typename ``[link boost_asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename CompletionCondition>
+ std::size_t ``[link boost_asio.reference.read_at.overload3 read_at]``(
+ SyncRandomAccessReadDevice & d,
+ boost::uint64_t offset,
+ const MutableBufferSequence & buffers,
+ CompletionCondition completion_condition,
+ boost::system::error_code & ec);
 
+ template<
+ typename ``[link boost_asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
+ typename Allocator>
+ std::size_t ``[link boost_asio.reference.read_at.overload4 read_at]``(
+ SyncRandomAccessReadDevice & d,
+ boost::uint64_t offset,
+ basic_streambuf< Allocator > & b);
 
+ template<
+ typename ``[link boost_asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
+ typename Allocator,
+ typename CompletionCondition>
+ std::size_t ``[link boost_asio.reference.read_at.overload5 read_at]``(
+ SyncRandomAccessReadDevice & d,
+ boost::uint64_t offset,
+ basic_streambuf< Allocator > & b,
+ CompletionCondition completion_condition);
 
+ template<
+ typename ``[link boost_asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
+ typename Allocator,
+ typename CompletionCondition>
+ std::size_t ``[link boost_asio.reference.read_at.overload6 read_at]``(
+ SyncRandomAccessReadDevice & d,
+ boost::uint64_t offset,
+ basic_streambuf< Allocator > & b,
+ CompletionCondition completion_condition,
+ boost::system::error_code & ec);
 
-To specify an IPv6 UDP endpoint for port 9876, use:
 
- boost::asio::ip::udp::endpoint ep(boost::asio::ip::udp::v6(), 9876);
+[section:overload1 read_at (1 of 6 overloads)]
 
+Attempt to read a certain amount of data at the specified offset before returning.
 
+ template<
+ typename ``[link boost_asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t read_at(
+ SyncRandomAccessReadDevice & d,
+ boost::uint64_t offset,
+ const MutableBufferSequence & buffers);
 
 
+This function is used to read a certain number of bytes of data from a random access device at the specified offset. The call will block until one of the following conditions is true:
 
-[endsect]
 
+* The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
 
+* An error occurred.
 
-[section:overload3 ip::basic_endpoint::basic_endpoint (3 of 4 overloads)]
+This operation is implemented in terms of one or more calls to the device's read\_some\_at function.
 
-Construct an endpoint using a port number and an IP address. This constructor may be used for accepting connections on a specific interface or for making a connection to a remote endpoint.
 
- basic_endpoint(
- const boost::asio::ip::address & addr,
- unsigned short port_num);
+[heading Parameters]
+
 
+[variablelist
+
+[[d][The device from which the data is to be read. The type must support the SyncRandomAccessReadDevice concept.]]
 
+[[offset][The offset at which the data will be read.]]
 
-[endsect]
+[[buffers][One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the device.]]
 
+]
 
+[heading Return Value]
+
+The number of bytes transferred.
 
-[section:overload4 ip::basic_endpoint::basic_endpoint (4 of 4 overloads)]
+[heading Exceptions]
+
 
-Copy constructor.
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
 
- basic_endpoint(
- const basic_endpoint & other);
+]
 
+[heading Example]
+
+To read into a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
 
+ boost::asio::read_at(d, 42, boost::asio::buffer(data, size));
 
-[endsect]
 
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
-[endsect]
+[heading Remarks]
+
+This overload is equivalent to calling:
 
+ boost::asio::read_at(
+ d, 42, buffers,
+ boost::asio::transfer_all());
 
-[section:capacity ip::basic_endpoint::capacity]
 
-Get the capacity of the endpoint in the native type.
 
- std::size_t capacity() const;
 
 
 
 [endsect]
 
 
-[section:data ip::basic_endpoint::data]
 
-Get the underlying endpoint in the native type.
+[section:overload2 read_at (2 of 6 overloads)]
 
- data_type * ``[link boost_asio.reference.ip__basic_endpoint.data.overload1 data]``();
+Attempt to read a certain amount of data at the specified offset before returning.
 
- const data_type * ``[link boost_asio.reference.ip__basic_endpoint.data.overload2 data]``() const;
+ template<
+ typename ``[link boost_asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename CompletionCondition>
+ std::size_t read_at(
+ SyncRandomAccessReadDevice & d,
+ boost::uint64_t offset,
+ const MutableBufferSequence & buffers,
+ CompletionCondition completion_condition);
 
 
-[section:overload1 ip::basic_endpoint::data (1 of 2 overloads)]
+This function is used to read a certain number of bytes of data from a random access device at the specified offset. The call will block until one of the following conditions is true:
 
-Get the underlying endpoint in the native type.
 
- data_type * data();
+* The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
+
+* The completion_condition function object returns true.
 
+This operation is implemented in terms of one or more calls to the device's read\_some\_at function.
 
 
-[endsect]
+[heading Parameters]
+
 
+[variablelist
+
+[[d][The device from which the data is to be read. The type must support the SyncRandomAccessReadDevice concept.]]
 
+[[offset][The offset at which the data will be read.]]
 
-[section:overload2 ip::basic_endpoint::data (2 of 2 overloads)]
+[[buffers][One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the device.]]
 
-Get the underlying endpoint in the native type.
+[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
+``
+ bool completion_condition(
+ // Result of latest read_some_at operation.
+ const boost::system::error_code& error,
 
- const data_type * data() const;
+ // Number of bytes transferred so far.
+ std::size_t bytes_transferred
+ );
 
+``
+A return value of true indicates that the read operation is complete. False indicates that further calls to the device's read\_some\_at function are required.]]
 
+]
 
-[endsect]
+[heading Return Value]
+
+The number of bytes transferred.
 
+[heading Exceptions]
+
 
-[endsect]
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
 
+]
 
-[section:data_type ip::basic_endpoint::data_type]
+[heading Example]
+
+To read into a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
 
-The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer.
+ boost::asio::read_at(d, 42, boost::asio::buffer(data, size),
+ boost::asio::transfer_at_least(32));
 
- typedef implementation_defined data_type;
 
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
 
 
@@ -26852,40 +47227,63 @@
 
 
 
-[section:operator_not__eq_ ip::basic_endpoint::operator!=]
+[section:overload3 read_at (3 of 6 overloads)]
 
-Compare two endpoints for inequality.
+Attempt to read a certain amount of data at the specified offset before returning.
 
- friend bool operator!=(
- const basic_endpoint< InternetProtocol > & e1,
- const basic_endpoint< InternetProtocol > & e2);
+ template<
+ typename ``[link boost_asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename CompletionCondition>
+ std::size_t read_at(
+ SyncRandomAccessReadDevice & d,
+ boost::uint64_t offset,
+ const MutableBufferSequence & buffers,
+ CompletionCondition completion_condition,
+ boost::system::error_code & ec);
 
 
+This function is used to read a certain number of bytes of data from a random access device at the specified offset. The call will block until one of the following conditions is true:
 
-[endsect]
 
+* The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
+
+* The completion_condition function object returns true.
 
+This operation is implemented in terms of one or more calls to the device's read\_some\_at function.
 
-[section:operator_lt_ ip::basic_endpoint::operator<]
 
-Compare endpoints for ordering.
+[heading Parameters]
+
 
- friend bool operator<(
- const basic_endpoint< InternetProtocol > & e1,
- const basic_endpoint< InternetProtocol > & e2);
+[variablelist
+
+[[d][The device from which the data is to be read. The type must support the SyncRandomAccessReadDevice concept.]]
 
+[[offset][The offset at which the data will be read.]]
 
+[[buffers][One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the device.]]
 
-[endsect]
+[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
+``
+ bool completion_condition(
+ const boost::system::error_code& error, // Result of latest read_some_at
+ // operation.
 
+ std::size_t bytes_transferred // Number of bytes transferred
+ // so far.
+ );
 
+``
+A return value of true indicates that the read operation is complete. False indicates that further calls to the device's read\_some\_at function are required.]]
 
-[section:operator_eq_ ip::basic_endpoint::operator=]
+[[ec][Set to indicate what error occurred, if any.]]
 
-Assign from another endpoint.
+]
 
- basic_endpoint & operator=(
- const basic_endpoint & other);
+[heading Return Value]
+
+The number of bytes read. If an error occurs, returns the total number of bytes successfully transferred prior to the error.
 
 
 
@@ -26893,87 +47291,131 @@
 
 
 
-[section:operator_eq__eq_ ip::basic_endpoint::operator==]
+[section:overload4 read_at (4 of 6 overloads)]
 
-Compare two endpoints for equality.
+Attempt to read a certain amount of data at the specified offset before returning.
 
- friend bool operator==(
- const basic_endpoint< InternetProtocol > & e1,
- const basic_endpoint< InternetProtocol > & e2);
+ template<
+ typename ``[link boost_asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
+ typename Allocator>
+ std::size_t read_at(
+ SyncRandomAccessReadDevice & d,
+ boost::uint64_t offset,
+ basic_streambuf< Allocator > & b);
 
 
+This function is used to read a certain number of bytes of data from a random access device at the specified offset. The call will block until one of the following conditions is true:
 
-[endsect]
 
+* An error occurred.
 
-[section:port ip::basic_endpoint::port]
+This operation is implemented in terms of one or more calls to the device's read\_some\_at function.
 
-Get the port associated with the endpoint. The port number is always in the host's byte order.
 
- unsigned short ``[link boost_asio.reference.ip__basic_endpoint.port.overload1 port]``() const;
+[heading Parameters]
+
 
- void ``[link boost_asio.reference.ip__basic_endpoint.port.overload2 port]``(
- unsigned short port_num);
+[variablelist
+
+[[d][The device from which the data is to be read. The type must support the SyncRandomAccessReadDevice concept.]]
 
+[[offset][The offset at which the data will be read.]]
 
-[section:overload1 ip::basic_endpoint::port (1 of 2 overloads)]
+[[b][The basic\_streambuf object into which the data will be read.]]
 
-Get the port associated with the endpoint. The port number is always in the host's byte order.
+]
 
- unsigned short port() const;
+[heading Return Value]
+
+The number of bytes transferred.
 
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
 
-[endsect]
+]
 
+[heading Remarks]
+
+This overload is equivalent to calling:
 
+ boost::asio::read_at(
+ d, 42, b,
+ boost::asio::transfer_all());
 
-[section:overload2 ip::basic_endpoint::port (2 of 2 overloads)]
 
-Set the port associated with the endpoint. The port number is always in the host's byte order.
 
- void port(
- unsigned short port_num);
 
 
 
 [endsect]
 
 
-[endsect]
 
+[section:overload5 read_at (5 of 6 overloads)]
 
-[section:protocol ip::basic_endpoint::protocol]
+Attempt to read a certain amount of data at the specified offset before returning.
 
-The protocol associated with the endpoint.
+ template<
+ typename ``[link boost_asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
+ typename Allocator,
+ typename CompletionCondition>
+ std::size_t read_at(
+ SyncRandomAccessReadDevice & d,
+ boost::uint64_t offset,
+ basic_streambuf< Allocator > & b,
+ CompletionCondition completion_condition);
 
- protocol_type protocol() const;
 
+This function is used to read a certain number of bytes of data from a random access device at the specified offset. The call will block until one of the following conditions is true:
 
 
-[endsect]
+* The completion_condition function object returns true.
 
+This operation is implemented in terms of one or more calls to the device's read\_some\_at function.
 
 
-[section:protocol_type ip::basic_endpoint::protocol_type]
+[heading Parameters]
+
 
-The protocol type associated with the endpoint.
+[variablelist
+
+[[d][The device from which the data is to be read. The type must support the SyncRandomAccessReadDevice concept.]]
 
- typedef InternetProtocol protocol_type;
+[[offset][The offset at which the data will be read.]]
 
+[[b][The basic\_streambuf object into which the data will be read.]]
 
+[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
+``
+ bool completion_condition(
+ // Result of latest read_some_at operation.
+ const boost::system::error_code& error,
 
+ // Number of bytes transferred so far.
+ std::size_t bytes_transferred
+ );
 
-[endsect]
+``
+A return value of true indicates that the read operation is complete. False indicates that further calls to the device's read\_some\_at function are required.]]
 
+]
 
+[heading Return Value]
+
+The number of bytes transferred.
 
-[section:resize ip::basic_endpoint::resize]
+[heading Exceptions]
+
 
-Set the underlying size of the endpoint in the native type.
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
 
- void resize(
- std::size_t size);
+]
 
 
 
@@ -26981,154 +47423,167 @@
 
 
 
-[section:size ip::basic_endpoint::size]
+[section:overload6 read_at (6 of 6 overloads)]
 
-Get the underlying size of the endpoint in the native type.
+Attempt to read a certain amount of data at the specified offset before returning.
 
- std::size_t size() const;
+ template<
+ typename ``[link boost_asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
+ typename Allocator,
+ typename CompletionCondition>
+ std::size_t read_at(
+ SyncRandomAccessReadDevice & d,
+ boost::uint64_t offset,
+ basic_streambuf< Allocator > & b,
+ CompletionCondition completion_condition,
+ boost::system::error_code & ec);
 
 
+This function is used to read a certain number of bytes of data from a random access device at the specified offset. The call will block until one of the following conditions is true:
 
-[endsect]
 
+* The completion_condition function object returns true.
 
+This operation is implemented in terms of one or more calls to the device's read\_some\_at function.
 
-[endsect]
 
-[section:ip__basic_resolver ip::basic_resolver]
+[heading Parameters]
+
 
-Provides endpoint resolution functionality.
+[variablelist
+
+[[d][The device from which the data is to be read. The type must support the SyncRandomAccessReadDevice concept.]]
 
- template<
- typename ``[link boost_asio.reference.InternetProtocol InternetProtocol]``,
- typename ``[link boost_asio.reference.ResolverService ResolverService]`` = resolver_service<InternetProtocol>>
- class basic_resolver :
- public basic_io_object< ResolverService >
+[[offset][The offset at which the data will be read.]]
 
+[[b][The basic\_streambuf object into which the data will be read.]]
 
-[heading Types]
-[table
- [[Name][Description]]
+[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
+``
+ bool completion_condition(
+ // Result of latest read_some_at operation.
+ const boost::system::error_code& error,
 
- [
+ // Number of bytes transferred so far.
+ std::size_t bytes_transferred
+ );
 
- [[link boost_asio.reference.ip__basic_resolver.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
+``
+A return value of true indicates that the read operation is complete. False indicates that further calls to the device's read\_some\_at function are required.]]
 
- [
+[[ec][Set to indicate what error occurred, if any.]]
 
- [[link boost_asio.reference.ip__basic_resolver.implementation_type [*implementation_type]]]
- [The underlying implementation type of I/O object. ]
-
- ]
+]
 
- [
+[heading Return Value]
+
+The number of bytes read. If an error occurs, returns the total number of bytes successfully transferred prior to the error.
 
- [[link boost_asio.reference.ip__basic_resolver.iterator [*iterator]]]
- [The iterator type. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.ip__basic_resolver.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
+[endsect]
 
- [
 
- [[link boost_asio.reference.ip__basic_resolver.query [*query]]]
- [The query type. ]
-
- ]
+[endsect]
 
- [
+[section:read_until read_until]
 
- [[link boost_asio.reference.ip__basic_resolver.service_type [*service_type]]]
- [The type of the service that will be used to provide I/O operations. ]
-
- ]
+Read data into a streambuf until a delimiter is encountered.
 
-]
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename Allocator>
+ std::size_t ``[link boost_asio.reference.read_until.overload1 read_until]``(
+ SyncReadStream & s,
+ boost::asio::basic_streambuf< Allocator > & b,
+ char delim);
 
-[heading Member Functions]
-[table
- [[Name][Description]]
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename Allocator>
+ std::size_t ``[link boost_asio.reference.read_until.overload2 read_until]``(
+ SyncReadStream & s,
+ boost::asio::basic_streambuf< Allocator > & b,
+ char delim,
+ boost::system::error_code & ec);
 
- [
- [[link boost_asio.reference.ip__basic_resolver.async_resolve [*async_resolve]]]
- [Asynchronously resolve a query to a list of entries. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver.basic_resolver [*basic_resolver]]]
- [Constructor. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver.cancel [*cancel]]]
- [Cancel any asynchronous operations that are waiting on the resolver. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver.get_io_service [*get_io_service]]]
- [Get the io_service associated with the object. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver.io_service [*io_service]]]
- [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver.resolve [*resolve]]]
- [Resolve a query to a list of entries. ]
- ]
-
-]
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename Allocator>
+ std::size_t ``[link boost_asio.reference.read_until.overload3 read_until]``(
+ SyncReadStream & s,
+ boost::asio::basic_streambuf< Allocator > & b,
+ const std::string & delim);
 
-The basic_resolver class template provides the ability to resolve a query to a list of endpoints.
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename Allocator>
+ std::size_t ``[link boost_asio.reference.read_until.overload4 read_until]``(
+ SyncReadStream & s,
+ boost::asio::basic_streambuf< Allocator > & b,
+ const std::string & delim,
+ boost::system::error_code & ec);
 
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename Allocator>
+ std::size_t ``[link boost_asio.reference.read_until.overload5 read_until]``(
+ SyncReadStream & s,
+ boost::asio::basic_streambuf< Allocator > & b,
+ const boost::regex & expr);
 
-[heading Thread Safety]
-
-[*Distinct] [*objects:] Safe.
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename Allocator>
+ std::size_t ``[link boost_asio.reference.read_until.overload6 read_until]``(
+ SyncReadStream & s,
+ boost::asio::basic_streambuf< Allocator > & b,
+ const boost::regex & expr,
+ boost::system::error_code & ec);
 
-[*Shared] [*objects:] Unsafe.
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename Allocator,
+ typename ``[link boost_asio.reference.MatchCondition MatchCondition]``>
+ std::size_t ``[link boost_asio.reference.read_until.overload7 read_until]``(
+ SyncReadStream & s,
+ boost::asio::basic_streambuf< Allocator > & b,
+ MatchCondition match_condition,
+ typename boost::enable_if< is_match_condition< MatchCondition > >::type * = 0);
 
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename Allocator,
+ typename ``[link boost_asio.reference.MatchCondition MatchCondition]``>
+ std::size_t ``[link boost_asio.reference.read_until.overload8 read_until]``(
+ SyncReadStream & s,
+ boost::asio::basic_streambuf< Allocator > & b,
+ MatchCondition match_condition,
+ boost::system::error_code & ec,
+ typename boost::enable_if< is_match_condition< MatchCondition > >::type * = 0);
 
-[section:async_resolve ip::basic_resolver::async_resolve]
 
-Asynchronously resolve a query to a list of entries.
+[section:overload1 read_until (1 of 8 overloads)]
 
- template<
- typename ``[link boost_asio.reference.ResolveHandler ResolveHandler]``>
- void ``[link boost_asio.reference.ip__basic_resolver.async_resolve.overload1 async_resolve]``(
- const query & q,
- ResolveHandler handler);
+Read data into a streambuf until a delimiter is encountered.
 
   template<
- typename ``[link boost_asio.reference.ResolveHandler ResolveHandler]``>
- void ``[link boost_asio.reference.ip__basic_resolver.async_resolve.overload2 async_resolve]``(
- const endpoint_type & e,
- ResolveHandler handler);
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename Allocator>
+ std::size_t read_until(
+ SyncReadStream & s,
+ boost::asio::basic_streambuf< Allocator > & b,
+ char delim);
 
 
-[section:overload1 ip::basic_resolver::async_resolve (1 of 2 overloads)]
+This function is used to read data into the specified streambuf until the streambuf's get area contains the specified delimiter. The call will block until one of the following conditions is true:
 
-Asynchronously resolve a query to a list of entries.
 
- template<
- typename ``[link boost_asio.reference.ResolveHandler ResolveHandler]``>
- void async_resolve(
- const query & q,
- ResolveHandler handler);
+* The get area of the streambuf contains the specified delimiter.
 
+* An error occurred.
 
-This function is used to asynchronously resolve a query into a list of endpoint entries.
+This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the streambuf's get area already contains the delimiter, the function returns immediately.
 
 
 [heading Parameters]
@@ -27136,45 +47591,68 @@
 
 [variablelist
   
-[[q][A query object that determines what endpoints will be returned.]]
+[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
 
-[[handler][The handler to be called when the resolve operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const boost::system::error_code& error, // Result of operation.
- resolver::iterator iterator // Forward-only iterator that can
- // be used to traverse the list
- // of endpoint entries.
- );
+[[b][A streambuf object into which the data will be read.]]
 
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
+[[delim][The delimiter character.]]
 
 ]
 
-[heading Remarks]
+[heading Return Value]
       
-A default constructed iterator represents the end of the list.
+The number of bytes in the streambuf's get area up to and including the delimiter.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Example]
+
+To read data into a streambuf until a newline is encountered:
+
+ boost::asio::streambuf b;
+ boost::asio::read_until(s, b, '\n');
+ std::istream is(&b);
+ std::string line;
+ std::getline(is, line);
+
+
+
 
-A successful resolve operation is guaranteed to pass at least one entry to the handler.
 
 
 [endsect]
 
 
 
-[section:overload2 ip::basic_resolver::async_resolve (2 of 2 overloads)]
+[section:overload2 read_until (2 of 8 overloads)]
 
-Asynchronously resolve an endpoint to a list of entries.
+Read data into a streambuf until a delimiter is encountered.
 
   template<
- typename ``[link boost_asio.reference.ResolveHandler ResolveHandler]``>
- void async_resolve(
- const endpoint_type & e,
- ResolveHandler handler);
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename Allocator>
+ std::size_t read_until(
+ SyncReadStream & s,
+ boost::asio::basic_streambuf< Allocator > & b,
+ char delim,
+ boost::system::error_code & ec);
 
 
-This function is used to asynchronously resolve an endpoint into a list of endpoint entries.
+This function is used to read data into the specified streambuf until the streambuf's get area contains the specified delimiter. The call will block until one of the following conditions is true:
+
+
+* The get area of the streambuf contains the specified delimiter.
+
+* An error occurred.
+
+This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the streambuf's get area already contains the delimiter, the function returns immediately.
 
 
 [heading Parameters]
@@ -27182,44 +47660,47 @@
 
 [variablelist
   
-[[e][An endpoint object that determines what endpoints will be returned.]]
+[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
 
-[[handler][The handler to be called when the resolve operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const boost::system::error_code& error, // Result of operation.
- resolver::iterator iterator // Forward-only iterator that can
- // be used to traverse the list
- // of endpoint entries.
- );
+[[b][A streambuf object into which the data will be read.]]
 
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
+[[delim][The delimiter character.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
 
 ]
 
-[heading Remarks]
+[heading Return Value]
       
-A default constructed iterator represents the end of the list.
+The number of bytes in the streambuf's get area up to and including the delimiter. Returns 0 if an error occurred.
 
-A successful resolve operation is guaranteed to pass at least one entry to the handler.
 
 
 [endsect]
 
 
-[endsect]
+
+[section:overload3 read_until (3 of 8 overloads)]
+
+Read data into a streambuf until a delimiter is encountered.
+
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename Allocator>
+ std::size_t read_until(
+ SyncReadStream & s,
+ boost::asio::basic_streambuf< Allocator > & b,
+ const std::string & delim);
 
 
-[section:basic_resolver ip::basic_resolver::basic_resolver]
+This function is used to read data into the specified streambuf until the streambuf's get area contains the specified delimiter. The call will block until one of the following conditions is true:
 
-Constructor.
 
- basic_resolver(
- boost::asio::io_service & io_service);
+* The get area of the streambuf contains the specified delimiter.
 
+* An error occurred.
 
-This constructor creates a basic_resolver.
+This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the streambuf's get area already contains the delimiter, the function returns immediately.
 
 
 [heading Parameters]
@@ -27227,59 +47708,88 @@
 
 [variablelist
   
-[[io_service][The io\_service object that the resolver will use to dispatch handlers for any asynchronous operations performed on the timer. ]]
+[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
+
+[[b][A streambuf object into which the data will be read.]]
+
+[[delim][The delimiter string.]]
 
 ]
 
+[heading Return Value]
+
+The number of bytes in the streambuf's get area up to and including the delimiter.
 
+[heading Exceptions]
+
 
-[endsect]
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
 
+]
 
+[heading Example]
+
+To read data into a streambuf until a newline is encountered:
 
-[section:cancel ip::basic_resolver::cancel]
+ boost::asio::streambuf b;
+ boost::asio::read_until(s, b, "\r\n");
+ std::istream is(&b);
+ std::string line;
+ std::getline(is, line);
 
-Cancel any asynchronous operations that are waiting on the resolver.
 
- void cancel();
 
 
-This function forces the completion of any pending asynchronous operations on the host resolver. The handler for each cancelled operation will be invoked with the boost::asio::error::operation\_aborted error code.
 
 
 [endsect]
 
 
 
-[section:endpoint_type ip::basic_resolver::endpoint_type]
-
-The endpoint type.
+[section:overload4 read_until (4 of 8 overloads)]
 
- typedef InternetProtocol::endpoint endpoint_type;
+Read data into a streambuf until a delimiter is encountered.
 
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename Allocator>
+ std::size_t read_until(
+ SyncReadStream & s,
+ boost::asio::basic_streambuf< Allocator > & b,
+ const std::string & delim,
+ boost::system::error_code & ec);
 
 
+This function is used to read data into the specified streambuf until the streambuf's get area contains the specified delimiter. The call will block until one of the following conditions is true:
 
-[endsect]
 
+* The get area of the streambuf contains the specified delimiter.
 
+* An error occurred.
 
-[section:get_io_service ip::basic_resolver::get_io_service]
+This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the streambuf's get area already contains the delimiter, the function returns immediately.
 
 
-['Inherited from basic_io_object.]
+[heading Parameters]
+
 
-Get the io_service associated with the object.
+[variablelist
+
+[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
 
- boost::asio::io_service & get_io_service();
+[[b][A streambuf object into which the data will be read.]]
 
+[[delim][The delimiter string.]]
 
-This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
+[[ec][Set to indicate what error occurred, if any.]]
 
+]
 
 [heading Return Value]
       
-A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
+The number of bytes in the streambuf's get area up to and including the delimiter. Returns 0 if an error occurred.
 
 
 
@@ -27287,50 +47797,66 @@
 
 
 
-[section:implementation_type ip::basic_resolver::implementation_type]
-
-
-['Inherited from basic_io_object.]
-
-The underlying implementation type of I/O object.
-
- typedef service_type::implementation_type implementation_type;
+[section:overload5 read_until (5 of 8 overloads)]
 
+Read data into a streambuf until a regular expression is located.
 
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename Allocator>
+ std::size_t read_until(
+ SyncReadStream & s,
+ boost::asio::basic_streambuf< Allocator > & b,
+ const boost::regex & expr);
 
 
-[endsect]
+This function is used to read data into the specified streambuf until the streambuf's get area contains some data that matches a regular expression. The call will block until one of the following conditions is true:
 
 
+* A substring of the streambuf's get area matches the regular expression.
 
-[section:io_service ip::basic_resolver::io_service]
+* An error occurred.
 
+This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the streambuf's get area already contains data that matches the regular expression, the function returns immediately.
 
-['Inherited from basic_io_object.]
 
-(Deprecated: use get_io_service().) Get the io_service associated with the object.
+[heading Parameters]
+
 
- boost::asio::io_service & io_service();
+[variablelist
+
+[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
 
+[[b][A streambuf object into which the data will be read.]]
 
-This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
+[[expr][The regular expression.]]
 
+]
 
 [heading Return Value]
       
-A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
+The number of bytes in the streambuf's get area up to and including the substring that matches the regular expression.
 
+[heading Exceptions]
+
 
-[endsect]
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
 
+]
 
+[heading Example]
+
+To read data into a streambuf until a CR-LF sequence is encountered:
 
-[section:iterator ip::basic_resolver::iterator]
+ boost::asio::streambuf b;
+ boost::asio::read_until(s, b, boost::regex("\r\n"));
+ std::istream is(&b);
+ std::string line;
+ std::getline(is, line);
 
-The iterator type.
 
- typedef InternetProtocol::resolver_iterator iterator;
 
 
 
@@ -27339,59 +47865,78 @@
 
 
 
-[section:protocol_type ip::basic_resolver::protocol_type]
+[section:overload6 read_until (6 of 8 overloads)]
 
-The protocol type.
+Read data into a streambuf until a regular expression is located.
 
- typedef InternetProtocol protocol_type;
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename Allocator>
+ std::size_t read_until(
+ SyncReadStream & s,
+ boost::asio::basic_streambuf< Allocator > & b,
+ const boost::regex & expr,
+ boost::system::error_code & ec);
 
 
+This function is used to read data into the specified streambuf until the streambuf's get area contains some data that matches a regular expression. The call will block until one of the following conditions is true:
 
 
-[endsect]
+* A substring of the streambuf's get area matches the regular expression.
+
+* An error occurred.
 
+This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the streambuf's get area already contains data that matches the regular expression, the function returns immediately.
 
 
-[section:query ip::basic_resolver::query]
+[heading Parameters]
+
 
-The query type.
+[variablelist
+
+[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
 
- typedef InternetProtocol::resolver_query query;
+[[b][A streambuf object into which the data will be read.]]
 
+[[expr][The regular expression.]]
 
+[[ec][Set to indicate what error occurred, if any.]]
 
+]
 
-[endsect]
+[heading Return Value]
+
+The number of bytes in the streambuf's get area up to and including the substring that matches the regular expression. Returns 0 if an error occurred.
 
 
-[section:resolve ip::basic_resolver::resolve]
 
-Resolve a query to a list of entries.
+[endsect]
 
- iterator ``[link boost_asio.reference.ip__basic_resolver.resolve.overload1 resolve]``(
- const query & q);
 
- iterator ``[link boost_asio.reference.ip__basic_resolver.resolve.overload2 resolve]``(
- const query & q,
- boost::system::error_code & ec);
 
- iterator ``[link boost_asio.reference.ip__basic_resolver.resolve.overload3 resolve]``(
- const endpoint_type & e);
+[section:overload7 read_until (7 of 8 overloads)]
 
- iterator ``[link boost_asio.reference.ip__basic_resolver.resolve.overload4 resolve]``(
- const endpoint_type & e,
- boost::system::error_code & ec);
+Read data into a streambuf until a function object indicates a match.
+
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename Allocator,
+ typename ``[link boost_asio.reference.MatchCondition MatchCondition]``>
+ std::size_t read_until(
+ SyncReadStream & s,
+ boost::asio::basic_streambuf< Allocator > & b,
+ MatchCondition match_condition,
+ typename boost::enable_if< is_match_condition< MatchCondition > >::type * = 0);
 
 
-[section:overload1 ip::basic_resolver::resolve (1 of 4 overloads)]
+This function is used to read data into the specified streambuf until a user-defined match condition function object, when applied to the data contained in the streambuf, indicates a successful match. The call will block until one of the following conditions is true:
 
-Resolve a query to a list of entries.
 
- iterator resolve(
- const query & q);
+* The match condition function object returns a std::pair where the second element evaluates to true.
 
+* An error occurred.
 
-This function is used to resolve a query into a list of endpoint entries.
+This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the match condition function object already indicates a match, the function returns immediately.
 
 
 [heading Parameters]
@@ -27399,13 +47944,27 @@
 
 [variablelist
   
-[[q][A query object that determines what endpoints will be returned.]]
+[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
+
+[[b][A streambuf object into which the data will be read.]]
+
+[[match_condition][The function object to be called to determine whether a match exists. The signature of the function object must be:
+``
+ pair<iterator, bool> match_condition(iterator begin, iterator end);
+
+``
+where iterator represents the type:
+``
+ buffers_iterator<basic_streambuf<Allocator>::const_buffers_type>
+
+``
+The iterator parameters begin and end define the range of bytes to be scanned to determine whether there is a match. The first member of the return value is an iterator marking one-past-the-end of the bytes that have been consumed by the match function. This iterator is used to calculate the begin parameter for any subsequent invocation of the match condition. The second member of the return value is true if a match has been found, false otherwise.]]
 
 ]
 
 [heading Return Value]
       
-A forward-only iterator that can be used to traverse the list of endpoint entries.
+The number of bytes in the streambuf's get area that have been fully consumed by the match function.
 
 [heading Exceptions]
     
@@ -27418,62 +47977,93 @@
 
 [heading Remarks]
       
-A default constructed iterator represents the end of the list.
-
-A successful call to this function is guaranteed to return at least one entry.
+The default implementation of the is_match_condition type trait evaluates to true for function pointers and function objects with a result\_type typedef. It must be specialised for other user-defined function objects.
 
+[heading Examples]
+
+To read data into a streambuf until whitespace is encountered:
 
-[endsect]
+ typedef boost::asio::buffers_iterator<
+ boost::asio::streambuf::const_buffers_type> iterator;
 
+ std::pair<iterator, bool>
+ match_whitespace(iterator begin, iterator end)
+ {
+ iterator i = begin;
+ while (i != end)
+ if (std::isspace(*i++))
+ return std::make_pair(i, true);
+ return std::make_pair(i, false);
+ }
+ ...
+ boost::asio::streambuf b;
+ boost::asio::read_until(s, b, match_whitespace);
 
 
-[section:overload2 ip::basic_resolver::resolve (2 of 4 overloads)]
 
-Resolve a query to a list of entries.
 
- iterator resolve(
- const query & q,
- boost::system::error_code & ec);
+To read data into a streambuf until a matching character is found:
 
+ class match_char
+ {
+ public:
+ explicit match_char(char c) : c_(c) {}
 
-This function is used to resolve a query into a list of endpoint entries.
+ template <typename Iterator>
+ std::pair<Iterator, bool> operator()(
+ Iterator begin, Iterator end) const
+ {
+ Iterator i = begin;
+ while (i != end)
+ if (c_ == *i++)
+ return std::make_pair(i, true);
+ return std::make_pair(i, false);
+ }
 
+ private:
+ char c_;
+ };
+
+ namespace asio {
+ template <> struct is_match_condition<match_char>
+ : public boost::true_type {};
+ } // namespace asio
+ ...
+ boost::asio::streambuf b;
+ boost::asio::read_until(s, b, match_char('a'));
 
-[heading Parameters]
-
 
-[variablelist
-
-[[q][A query object that determines what endpoints will be returned.]]
 
-[[ec][Set to indicate what error occurred, if any.]]
 
-]
 
-[heading Return Value]
-
-A forward-only iterator that can be used to traverse the list of endpoint entries. Returns a default constructed iterator if an error occurs.
+[endsect]
 
-[heading Remarks]
-
-A default constructed iterator represents the end of the list.
 
-A successful call to this function is guaranteed to return at least one entry.
 
+[section:overload8 read_until (8 of 8 overloads)]
 
-[endsect]
+Read data into a streambuf until a function object indicates a match.
 
+ template<
+ typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
+ typename Allocator,
+ typename ``[link boost_asio.reference.MatchCondition MatchCondition]``>
+ std::size_t read_until(
+ SyncReadStream & s,
+ boost::asio::basic_streambuf< Allocator > & b,
+ MatchCondition match_condition,
+ boost::system::error_code & ec,
+ typename boost::enable_if< is_match_condition< MatchCondition > >::type * = 0);
 
 
-[section:overload3 ip::basic_resolver::resolve (3 of 4 overloads)]
+This function is used to read data into the specified streambuf until a user-defined match condition function object, when applied to the data contained in the streambuf, indicates a successful match. The call will block until one of the following conditions is true:
 
-Resolve an endpoint to a list of entries.
 
- iterator resolve(
- const endpoint_type & e);
+* The match condition function object returns a std::pair where the second element evaluates to true.
 
+* An error occurred.
 
-This function is used to resolve an endpoint into a list of endpoint entries.
+This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the match condition function object already indicates a match, the function returns immediately.
 
 
 [heading Parameters]
@@ -27481,99 +48071,210 @@
 
 [variablelist
   
-[[e][An endpoint object that determines what endpoints will be returned.]]
+[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
 
-]
+[[b][A streambuf object into which the data will be read.]]
 
-[heading Return Value]
-
-A forward-only iterator that can be used to traverse the list of endpoint entries.
+[[match_condition][The function object to be called to determine whether a match exists. The signature of the function object must be:
+``
+ pair<iterator, bool> match_condition(iterator begin, iterator end);
 
-[heading Exceptions]
-
+``
+where iterator represents the type:
+``
+ buffers_iterator<basic_streambuf<Allocator>::const_buffers_type>
 
-[variablelist
-
-[[boost::system::system_error][Thrown on failure.]]
+``
+The iterator parameters begin and end define the range of bytes to be scanned to determine whether there is a match. The first member of the return value is an iterator marking one-past-the-end of the bytes that have been consumed by the match function. This iterator is used to calculate the begin parameter for any subsequent invocation of the match condition. The second member of the return value is true if a match has been found, false otherwise.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
 
 ]
 
+[heading Return Value]
+
+The number of bytes in the streambuf's get area that have been fully consumed by the match function. Returns 0 if an error occurred.
+
 [heading Remarks]
       
-A default constructed iterator represents the end of the list.
+The default implementation of the is_match_condition type trait evaluates to true for function pointers and function objects with a result\_type typedef. It must be specialised for other user-defined function objects.
 
-A successful call to this function is guaranteed to return at least one entry.
 
 
 [endsect]
 
 
+[endsect]
 
-[section:overload4 ip::basic_resolver::resolve (4 of 4 overloads)]
 
-Resolve an endpoint to a list of entries.
+[section:serial_port serial_port]
 
- iterator resolve(
- const endpoint_type & e,
- boost::system::error_code & ec);
+Typedef for the typical usage of a serial port.
 
+ typedef basic_serial_port serial_port;
 
-This function is used to resolve an endpoint into a list of endpoint entries.
 
+[heading Types]
+[table
+ [[Name][Description]]
 
-[heading Parameters]
-
+ [
 
-[variablelist
+ [[link boost_asio.reference.basic_serial_port.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
   
-[[e][An endpoint object that determines what endpoints will be returned.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
+ ]
 
-]
+ [
 
-[heading Return Value]
-
-A forward-only iterator that can be used to traverse the list of endpoint entries. Returns a default constructed iterator if an error occurs.
+ [[link boost_asio.reference.basic_serial_port.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_serial_port is always the lowest layer. ]
+
+ ]
 
-[heading Remarks]
-
-A default constructed iterator represents the end of the list.
+ [
 
-A successful call to this function is guaranteed to return at least one entry.
+ [[link boost_asio.reference.basic_serial_port.native_type [*native_type]]]
+ [The native representation of a serial port. ]
+
+ ]
 
+ [
 
-[endsect]
+ [[link boost_asio.reference.basic_serial_port.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
+
+ ]
 
+]
 
-[endsect]
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.basic_serial_port.assign [*assign]]]
+ [Assign an existing native serial port to the serial port. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.async_read_some [*async_read_some]]]
+ [Start an asynchronous read. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.async_write_some [*async_write_some]]]
+ [Start an asynchronous write. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.basic_serial_port [*basic_serial_port]]]
+ [Construct a basic_serial_port without opening it. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the serial port. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.close [*close]]]
+ [Close the serial port. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.get_option [*get_option]]]
+ [Get an option from the serial port. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.is_open [*is_open]]]
+ [Determine whether the serial port is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.native [*native]]]
+ [Get the native serial port representation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.open [*open]]]
+ [Open the serial port using the specified device name. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.read_some [*read_some]]]
+ [Read some data from the serial port. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.send_break [*send_break]]]
+ [Send a break sequence to the serial port. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.set_option [*set_option]]]
+ [Set an option on the serial port. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_serial_port.write_some [*write_some]]]
+ [Write some data to the serial port. ]
+ ]
+
+]
 
-[section:service_type ip::basic_resolver::service_type]
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.basic_serial_port.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
 
-['Inherited from basic_io_object.]
+ [
+ [[link boost_asio.reference.basic_serial_port.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
 
-The type of the service that will be used to provide I/O operations.
+]
 
- typedef ResolverService service_type;
+The basic_serial_port class template provides functionality that is common to all serial ports.
 
 
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
+[*Shared] [*objects:] Unsafe.
 
-[endsect]
 
 
 
 [endsect]
 
-[section:ip__basic_resolver_entry ip::basic_resolver_entry]
 
-An entry produced by a resolver.
+[section:serial_port_base serial_port_base]
 
- template<
- typename ``[link boost_asio.reference.InternetProtocol InternetProtocol]``>
- class basic_resolver_entry
+The serial_port_base class is used as a base for the basic_serial_port class template so that we have a common place to define the serial port options.
+
+ class serial_port_base
 
 
 [heading Types]
@@ -27582,79 +48283,123 @@
 
   [
 
- [[link boost_asio.reference.ip__basic_resolver_entry.endpoint_type [*endpoint_type]]]
- [The endpoint type associated with the endpoint entry. ]
+ [[link boost_asio.reference.serial_port_base__baud_rate [*baud_rate]]]
+ [Serial port option to permit changing the baud rate. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.ip__basic_resolver_entry.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint entry. ]
+ [[link boost_asio.reference.serial_port_base__character_size [*character_size]]]
+ [Serial port option to permit changing the character size. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.serial_port_base__flow_control [*flow_control]]]
+ [Serial port option to permit changing the flow control. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.serial_port_base__parity [*parity]]]
+ [Serial port option to permit changing the parity. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.serial_port_base__stop_bits [*stop_bits]]]
+ [Serial port option to permit changing the number of stop bits. ]
   
   ]
 
 ]
 
-[heading Member Functions]
+[heading Protected Member Functions]
 [table
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.ip__basic_resolver_entry.basic_resolver_entry [*basic_resolver_entry]]]
- [Default constructor. ]
+ [[link boost_asio.reference.serial_port_base._serial_port_base [*~serial_port_base]]]
+ [Protected destructor to prevent deletion through this type. ]
   ]
   
+]
+
+
+[section:_serial_port_base serial_port_base::~serial_port_base]
+
+Protected destructor to prevent deletion through this type.
+
+ ~serial_port_base();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:serial_port_base__baud_rate serial_port_base::baud_rate]
+
+Serial port option to permit changing the baud rate.
+
+ class baud_rate
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
   [
- [[link boost_asio.reference.ip__basic_resolver_entry.endpoint [*endpoint]]]
- [Get the endpoint associated with the entry. ]
+ [[link boost_asio.reference.serial_port_base__baud_rate.baud_rate [*baud_rate]]]
+ []
   ]
   
   [
- [[link boost_asio.reference.ip__basic_resolver_entry.host_name [*host_name]]]
- [Get the host name associated with the entry. ]
+ [[link boost_asio.reference.serial_port_base__baud_rate.load [*load]]]
+ []
   ]
   
   [
- [[link boost_asio.reference.ip__basic_resolver_entry.operator_endpoint_type [*operator endpoint_type]]]
- [Convert to the endpoint associated with the entry. ]
+ [[link boost_asio.reference.serial_port_base__baud_rate.store [*store]]]
+ []
   ]
   
   [
- [[link boost_asio.reference.ip__basic_resolver_entry.service_name [*service_name]]]
- [Get the service name associated with the entry. ]
+ [[link boost_asio.reference.serial_port_base__baud_rate.value [*value]]]
+ []
   ]
   
 ]
 
-The
-[link boost_asio.reference.ip__basic_resolver_entry ip::basic_resolver_entry] class template describes an entry as returned by a resolver.
+Implements changing the baud rate for a given serial port.
 
 
-[heading Thread Safety]
-
-[*Distinct] [*objects:] Safe.
+[section:baud_rate serial_port_base::baud_rate::baud_rate]
 
-[*Shared] [*objects:] Unsafe.
 
 
-[section:basic_resolver_entry ip::basic_resolver_entry::basic_resolver_entry]
+ baud_rate(
+ unsigned int rate = 0);
 
-Default constructor.
 
- ``[link boost_asio.reference.ip__basic_resolver_entry.basic_resolver_entry.overload1 basic_resolver_entry]``();
 
- ``[link boost_asio.reference.ip__basic_resolver_entry.basic_resolver_entry.overload2 basic_resolver_entry]``(
- const endpoint_type & endpoint,
- const std::string & host_name,
- const std::string & service_name);
+[endsect]
 
 
-[section:overload1 ip::basic_resolver_entry::basic_resolver_entry (1 of 2 overloads)]
 
-Default constructor.
+[section:load serial_port_base::baud_rate::load]
+
 
- basic_resolver_entry();
+
+ boost::system::error_code load(
+ const BOOST_ASIO_OPTION_STORAGE & storage,
+ boost::system::error_code & ec);
 
 
 
@@ -27662,28 +48407,76 @@
 
 
 
-[section:overload2 ip::basic_resolver_entry::basic_resolver_entry (2 of 2 overloads)]
+[section:store serial_port_base::baud_rate::store]
+
+
+
+ boost::system::error_code store(
+ BOOST_ASIO_OPTION_STORAGE & storage,
+ boost::system::error_code & ec) const;
 
-Construct with specified endpoint, host name and service name.
 
- basic_resolver_entry(
- const endpoint_type & endpoint,
- const std::string & host_name,
- const std::string & service_name);
+
+[endsect]
+
+
+
+[section:value serial_port_base::baud_rate::value]
+
+
+
+ unsigned int value() const;
 
 
 
 [endsect]
 
 
-[endsect]
 
+[endsect]
+
+[section:serial_port_base__character_size serial_port_base::character_size]
+
+Serial port option to permit changing the character size.
+
+ class character_size
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.serial_port_base__character_size.character_size [*character_size]]]
+ []
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_base__character_size.load [*load]]]
+ []
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_base__character_size.store [*store]]]
+ []
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_base__character_size.value [*value]]]
+ []
+ ]
+
+]
+
+Implements changing the character size for a given serial port.
+
+
+[section:character_size serial_port_base::character_size::character_size]
 
-[section:endpoint ip::basic_resolver_entry::endpoint]
 
-Get the endpoint associated with the entry.
 
- endpoint_type endpoint() const;
+ character_size(
+ unsigned int t = 8);
 
 
 
@@ -27691,12 +48484,13 @@
 
 
 
-[section:endpoint_type ip::basic_resolver_entry::endpoint_type]
+[section:load serial_port_base::character_size::load]
 
-The endpoint type associated with the endpoint entry.
 
- typedef InternetProtocol::endpoint endpoint_type;
 
+ boost::system::error_code load(
+ const BOOST_ASIO_OPTION_STORAGE & storage,
+ boost::system::error_code & ec);
 
 
 
@@ -27704,23 +48498,13 @@
 
 
 
-[section:host_name ip::basic_resolver_entry::host_name]
-
-Get the host name associated with the entry.
-
- std::string host_name() const;
-
-
-
-[endsect]
-
-
+[section:store serial_port_base::character_size::store]
 
-[section:operator_endpoint_type ip::basic_resolver_entry::operator endpoint_type]
 
-Convert to the endpoint associated with the entry.
 
- operator endpoint_type() const;
+ boost::system::error_code store(
+ BOOST_ASIO_OPTION_STORAGE & storage,
+ boost::system::error_code & ec) const;
 
 
 
@@ -27728,12 +48512,11 @@
 
 
 
-[section:protocol_type ip::basic_resolver_entry::protocol_type]
+[section:value serial_port_base::character_size::value]
 
-The protocol type associated with the endpoint entry.
 
- typedef InternetProtocol protocol_type;
 
+ unsigned int value() const;
 
 
 
@@ -27741,132 +48524,149 @@
 
 
 
-[section:service_name ip::basic_resolver_entry::service_name]
-
-Get the service name associated with the entry.
-
- std::string service_name() const;
-
-
-
 [endsect]
 
+[section:serial_port_base__flow_control serial_port_base::flow_control]
 
+Serial port option to permit changing the flow control.
 
-[endsect]
+ class flow_control
 
-[section:ip__basic_resolver_iterator ip::basic_resolver_iterator]
 
-An iterator over the entries produced by a resolver.
+[heading Types]
+[table
+ [[Name][Description]]
 
- template<
- typename ``[link boost_asio.reference.InternetProtocol InternetProtocol]``>
- class basic_resolver_iterator
+ [
+
+ [[link boost_asio.reference.serial_port_base__flow_control.type [*type]]]
+ []
+
+ ]
 
+]
 
 [heading Member Functions]
 [table
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.ip__basic_resolver_iterator.basic_resolver_iterator [*basic_resolver_iterator]]]
- [Default constructor creates an end iterator. ]
+ [[link boost_asio.reference.serial_port_base__flow_control.flow_control [*flow_control]]]
+ []
   ]
   
   [
- [[link boost_asio.reference.ip__basic_resolver_iterator.create [*create]]]
- [Create an iterator from an addrinfo list returned by getaddrinfo. ]
+ [[link boost_asio.reference.serial_port_base__flow_control.load [*load]]]
+ []
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_base__flow_control.store [*store]]]
+ []
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_base__flow_control.value [*value]]]
+ []
   ]
   
 ]
 
-The
-[link boost_asio.reference.ip__basic_resolver_iterator ip::basic_resolver_iterator] class template is used to define iterators over the results returned by a resolver.
+Implements changing the flow control for a given serial port.
 
-The iterator's value\_type, obtained when the iterator is dereferenced, is:
 
- const basic_resolver_entry<InternetProtocol>
+[section:flow_control serial_port_base::flow_control::flow_control]
 
 
 
+ flow_control(
+ type t = none);
 
 
-[heading Thread Safety]
-
-[*Distinct] [*objects:] Safe.
 
-[*Shared] [*objects:] Unsafe.
+[endsect]
 
 
 
-[section:basic_resolver_iterator ip::basic_resolver_iterator::basic_resolver_iterator]
+[section:load serial_port_base::flow_control::load]
 
-Default constructor creates an end iterator.
 
- basic_resolver_iterator();
+
+ boost::system::error_code load(
+ const BOOST_ASIO_OPTION_STORAGE & storage,
+ boost::system::error_code & ec);
 
 
 
 [endsect]
 
 
-[section:create ip::basic_resolver_iterator::create]
 
-Create an iterator from an addrinfo list returned by getaddrinfo.
+[section:store serial_port_base::flow_control::store]
 
- static basic_resolver_iterator ``[link boost_asio.reference.ip__basic_resolver_iterator.create.overload1 create]``(
- boost::asio::detail::addrinfo_type * address_info,
- const std::string & host_name,
- const std::string & service_name);
 
- static basic_resolver_iterator ``[link boost_asio.reference.ip__basic_resolver_iterator.create.overload2 create]``(
- const typename InternetProtocol::endpoint & endpoint,
- const std::string & host_name,
- const std::string & service_name);
 
+ boost::system::error_code store(
+ BOOST_ASIO_OPTION_STORAGE & storage,
+ boost::system::error_code & ec) const;
 
-[section:overload1 ip::basic_resolver_iterator::create (1 of 2 overloads)]
 
-Create an iterator from an addrinfo list returned by getaddrinfo.
 
- static basic_resolver_iterator create(
- boost::asio::detail::addrinfo_type * address_info,
- const std::string & host_name,
- const std::string & service_name);
+[endsect]
 
 
 
-[endsect]
+[section:type serial_port_base::flow_control::type]
 
 
 
-[section:overload2 ip::basic_resolver_iterator::create (2 of 2 overloads)]
+ enum type
 
-Create an iterator from an endpoint, host name and service name.
+[heading Values]
+[variablelist
 
- static basic_resolver_iterator create(
- const typename InternetProtocol::endpoint & endpoint,
- const std::string & host_name,
- const std::string & service_name);
+ [
+ [none]
+ []
+ ]
+
+ [
+ [software]
+ []
+ ]
+
+ [
+ [hardware]
+ []
+ ]
+
+]
 
 
 
 [endsect]
 
 
+
+[section:value serial_port_base::flow_control::value]
+
+
+
+ type value() const;
+
+
+
 [endsect]
 
 
+
 [endsect]
 
-[section:ip__basic_resolver_query ip::basic_resolver_query]
+[section:serial_port_base__parity serial_port_base::parity]
 
-An query to be passed to a resolver.
+Serial port option to permit changing the parity.
 
- template<
- typename ``[link boost_asio.reference.InternetProtocol InternetProtocol]``>
- class basic_resolver_query :
- public ip::resolver_query_base
+ class parity
 
 
 [heading Types]
@@ -27875,8 +48675,8 @@
 
   [
 
- [[link boost_asio.reference.ip__basic_resolver_query.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint query. ]
+ [[link boost_asio.reference.serial_port_base__parity.type [*type]]]
+ []
   
   ]
 
@@ -27887,88 +48687,50 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.ip__basic_resolver_query.basic_resolver_query [*basic_resolver_query]]]
- [Construct with specified service name for any protocol. ]
+ [[link boost_asio.reference.serial_port_base__parity.load [*load]]]
+ []
   ]
   
   [
- [[link boost_asio.reference.ip__basic_resolver_query.hints [*hints]]]
- [Get the hints associated with the query. ]
+ [[link boost_asio.reference.serial_port_base__parity.parity [*parity]]]
+ []
   ]
   
   [
- [[link boost_asio.reference.ip__basic_resolver_query.host_name [*host_name]]]
- [Get the host name associated with the query. ]
+ [[link boost_asio.reference.serial_port_base__parity.store [*store]]]
+ []
   ]
   
   [
- [[link boost_asio.reference.ip__basic_resolver_query.service_name [*service_name]]]
- [Get the service name associated with the query. ]
+ [[link boost_asio.reference.serial_port_base__parity.value [*value]]]
+ []
   ]
   
 ]
 
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link boost_asio.reference.ip__basic_resolver_query.address_configured [*address_configured]]]
- [Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver_query.all_matching [*all_matching]]]
- [If used with v4_mapped, return all matching IPv6 and IPv4 addresses. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver_query.canonical_name [*canonical_name]]]
- [Determine the canonical name of the host specified in the query. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver_query.numeric_host [*numeric_host]]]
- [Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver_query.numeric_service [*numeric_service]]]
- [Service name should be treated as a numeric string defining a port number and no name resolution should be attempted. ]
- ]
+Implements changing the parity for a given serial port.
 
- [
- [[link boost_asio.reference.ip__basic_resolver_query.passive [*passive]]]
- [Indicate that returned endpoint is intended for use as a locally bound socket endpoint. ]
- ]
 
- [
- [[link boost_asio.reference.ip__basic_resolver_query.v4_mapped [*v4_mapped]]]
- [If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. ]
- ]
+[section:load serial_port_base::parity::load]
 
-]
 
-The
-[link boost_asio.reference.ip__basic_resolver_query ip::basic_resolver_query] class template describes a query that can be passed to a resolver.
 
+ boost::system::error_code load(
+ const BOOST_ASIO_OPTION_STORAGE & storage,
+ boost::system::error_code & ec);
 
-[heading Thread Safety]
-
-[*Distinct] [*objects:] Safe.
 
-[*Shared] [*objects:] Unsafe.
 
+[endsect]
 
 
-[section:address_configured ip::basic_resolver_query::address_configured]
 
+[section:parity serial_port_base::parity::parity]
 
-['Inherited from ip::resolver_query_base.]
 
-Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system.
 
- static const int address_configured = implementation_defined;
+ parity(
+ type t = none);
 
 
 
@@ -27976,52 +48738,45 @@
 
 
 
-[section:all_matching ip::basic_resolver_query::all_matching]
-
+[section:store serial_port_base::parity::store]
 
-['Inherited from ip::resolver_query_base.]
 
-If used with v4_mapped, return all matching IPv6 and IPv4 addresses.
 
- static const int all_matching = implementation_defined;
+ boost::system::error_code store(
+ BOOST_ASIO_OPTION_STORAGE & storage,
+ boost::system::error_code & ec) const;
 
 
 
 [endsect]
 
 
-[section:basic_resolver_query ip::basic_resolver_query::basic_resolver_query]
 
-Construct with specified service name for any protocol.
+[section:type serial_port_base::parity::type]
 
- ``[link boost_asio.reference.ip__basic_resolver_query.basic_resolver_query.overload1 basic_resolver_query]``(
- const std::string & service_name,
- int flags = passive|address_configured);
 
- ``[link boost_asio.reference.ip__basic_resolver_query.basic_resolver_query.overload2 basic_resolver_query]``(
- const protocol_type & protocol,
- const std::string & service_name,
- int flags = passive|address_configured);
 
- ``[link boost_asio.reference.ip__basic_resolver_query.basic_resolver_query.overload3 basic_resolver_query]``(
- const std::string & host_name,
- const std::string & service_name,
- int flags = address_configured);
+ enum type
 
- ``[link boost_asio.reference.ip__basic_resolver_query.basic_resolver_query.overload4 basic_resolver_query]``(
- const protocol_type & protocol,
- const std::string & host_name,
- const std::string & service_name,
- int flags = address_configured);
+[heading Values]
+[variablelist
 
+ [
+ [none]
+ []
+ ]
 
-[section:overload1 ip::basic_resolver_query::basic_resolver_query (1 of 4 overloads)]
+ [
+ [odd]
+ []
+ ]
 
-Construct with specified service name for any protocol.
+ [
+ [even]
+ []
+ ]
 
- basic_resolver_query(
- const std::string & service_name,
- int flags = passive|address_configured);
+]
 
 
 
@@ -28029,62 +48784,76 @@
 
 
 
-[section:overload2 ip::basic_resolver_query::basic_resolver_query (2 of 4 overloads)]
-
-Construct with specified service name for a given protocol.
-
- basic_resolver_query(
- const protocol_type & protocol,
- const std::string & service_name,
- int flags = passive|address_configured);
-
-
+[section:value serial_port_base::parity::value]
 
-[endsect]
 
 
+ type value() const;
 
-[section:overload3 ip::basic_resolver_query::basic_resolver_query (3 of 4 overloads)]
 
-Construct with specified host name and service name for any protocol.
 
- basic_resolver_query(
- const std::string & host_name,
- const std::string & service_name,
- int flags = address_configured);
+[endsect]
 
 
 
 [endsect]
 
+[section:serial_port_base__stop_bits serial_port_base::stop_bits]
 
+Serial port option to permit changing the number of stop bits.
 
-[section:overload4 ip::basic_resolver_query::basic_resolver_query (4 of 4 overloads)]
+ class stop_bits
 
-Construct with specified host name and service name for a given protocol.
 
- basic_resolver_query(
- const protocol_type & protocol,
- const std::string & host_name,
- const std::string & service_name,
- int flags = address_configured);
+[heading Types]
+[table
+ [[Name][Description]]
 
+ [
 
+ [[link boost_asio.reference.serial_port_base__stop_bits.type [*type]]]
+ []
+
+ ]
 
-[endsect]
+]
 
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
-[endsect]
+ [
+ [[link boost_asio.reference.serial_port_base__stop_bits.load [*load]]]
+ []
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_base__stop_bits.stop_bits [*stop_bits]]]
+ []
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_base__stop_bits.store [*store]]]
+ []
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_base__stop_bits.value [*value]]]
+ []
+ ]
+
+]
 
+Implements changing the number of stop bits for a given serial port.
 
-[section:canonical_name ip::basic_resolver_query::canonical_name]
 
+[section:load serial_port_base::stop_bits::load]
 
-['Inherited from ip::resolver_query_base.]
 
-Determine the canonical name of the host specified in the query.
 
- static const int canonical_name = implementation_defined;
+ boost::system::error_code load(
+ const BOOST_ASIO_OPTION_STORAGE & storage,
+ boost::system::error_code & ec);
 
 
 
@@ -28092,53 +48861,58 @@
 
 
 
-[section:hints ip::basic_resolver_query::hints]
-
-Get the hints associated with the query.
-
- const boost::asio::detail::addrinfo_type & hints() const;
-
-
+[section:stop_bits serial_port_base::stop_bits::stop_bits]
 
-[endsect]
 
 
+ stop_bits(
+ type t = one);
 
-[section:host_name ip::basic_resolver_query::host_name]
 
-Get the host name associated with the query.
 
- std::string host_name() const;
+[endsect]
 
 
 
-[endsect]
+[section:store serial_port_base::stop_bits::store]
 
 
 
-[section:numeric_host ip::basic_resolver_query::numeric_host]
+ boost::system::error_code store(
+ BOOST_ASIO_OPTION_STORAGE & storage,
+ boost::system::error_code & ec) const;
 
 
-['Inherited from ip::resolver_query_base.]
 
-Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted.
+[endsect]
 
- static const int numeric_host = implementation_defined;
 
 
+[section:type serial_port_base::stop_bits::type]
 
-[endsect]
 
 
+ enum type
 
-[section:numeric_service ip::basic_resolver_query::numeric_service]
+[heading Values]
+[variablelist
 
+ [
+ [one]
+ []
+ ]
 
-['Inherited from ip::resolver_query_base.]
+ [
+ [onepointfive]
+ []
+ ]
 
-Service name should be treated as a numeric string defining a port number and no name resolution should be attempted.
+ [
+ [two]
+ []
+ ]
 
- static const int numeric_service = implementation_defined;
+]
 
 
 
@@ -28146,14 +48920,11 @@
 
 
 
-[section:passive ip::basic_resolver_query::passive]
-
+[section:value serial_port_base::stop_bits::value]
 
-['Inherited from ip::resolver_query_base.]
 
-Indicate that returned endpoint is intended for use as a locally bound socket endpoint.
 
- static const int passive = implementation_defined;
+ type value() const;
 
 
 
@@ -28161,63 +48932,193 @@
 
 
 
-[section:protocol_type ip::basic_resolver_query::protocol_type]
+[endsect]
 
-The protocol type associated with the endpoint query.
+[section:serial_port_service serial_port_service]
 
- typedef InternetProtocol protocol_type;
+Default service implementation for a serial port.
 
+ class serial_port_service :
+ public io_service::service
 
 
+[heading Types]
+[table
+ [[Name][Description]]
 
-[endsect]
+ [
 
+ [[link boost_asio.reference.serial_port_service.implementation_type [*implementation_type]]]
+ [The type of a serial port implementation. ]
+
+ ]
 
+ [
 
-[section:service_name ip::basic_resolver_query::service_name]
+ [[link boost_asio.reference.serial_port_service.native_type [*native_type]]]
+ [The native handle type. ]
+
+ ]
 
-Get the service name associated with the query.
+]
 
- std::string service_name() const;
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.serial_port_service.assign [*assign]]]
+ [Assign an existing native handle to a serial port. ]
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_service.async_read_some [*async_read_some]]]
+ [Start an asynchronous read. ]
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_service.async_write_some [*async_write_some]]]
+ [Start an asynchronous write. ]
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_service.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the handle. ]
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_service.close [*close]]]
+ [Close a serial port implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_service.construct [*construct]]]
+ [Construct a new serial port implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_service.destroy [*destroy]]]
+ [Destroy a serial port implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_service.get_io_service [*get_io_service]]]
+ [Get the io_service object that owns the service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_service.get_option [*get_option]]]
+ [Get a serial port option. ]
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_service.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service object that owns the service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_service.is_open [*is_open]]]
+ [Determine whether the handle is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_service.native [*native]]]
+ [Get the native handle implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_service.open [*open]]]
+ [Open a serial port. ]
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_service.read_some [*read_some]]]
+ [Read some data from the stream. ]
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_service.send_break [*send_break]]]
+ [Send a break sequence to the serial port. ]
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_service.serial_port_service [*serial_port_service]]]
+ [Construct a new serial port service for the specified io_service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_service.set_option [*set_option]]]
+ [Set a serial port option. ]
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_service.shutdown_service [*shutdown_service]]]
+ [Destroy all user-defined handler objects owned by the service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.serial_port_service.write_some [*write_some]]]
+ [Write the given data to the stream. ]
+ ]
+
+]
 
+[heading Data Members]
+[table
+ [[Name][Description]]
 
-[endsect]
+ [
+ [[link boost_asio.reference.serial_port_service.id [*id]]]
+ [The unique service identifier. ]
+ ]
 
+]
 
 
-[section:v4_mapped ip::basic_resolver_query::v4_mapped]
+[section:assign serial_port_service::assign]
 
+Assign an existing native handle to a serial port.
 
-['Inherited from ip::resolver_query_base.]
+ boost::system::error_code assign(
+ implementation_type & impl,
+ const native_type & native_handle,
+ boost::system::error_code & ec);
 
-If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses.
 
- static const int v4_mapped = implementation_defined;
 
+[endsect]
 
 
-[endsect]
 
+[section:async_read_some serial_port_service::async_read_some]
 
+Start an asynchronous read.
 
-[endsect]
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_read_some(
+ implementation_type & impl,
+ const MutableBufferSequence & buffers,
+ ReadHandler handler);
 
-[section:ip__host_name ip::host_name]
 
-Get the current host name.
 
- std::string ``[link boost_asio.reference.ip__host_name.overload1 host_name]``();
+[endsect]
 
- std::string ``[link boost_asio.reference.ip__host_name.overload2 host_name]``(
- boost::system::error_code & ec);
 
 
-[section:overload1 ip::host_name (1 of 2 overloads)]
+[section:async_write_some serial_port_service::async_write_some]
 
-Get the current host name.
+Start an asynchronous write.
 
- std::string host_name();
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_write_some(
+ implementation_type & impl,
+ const ConstBufferSequence & buffers,
+ WriteHandler handler);
 
 
 
@@ -28225,11 +49126,12 @@
 
 
 
-[section:overload2 ip::host_name (2 of 2 overloads)]
+[section:cancel serial_port_service::cancel]
 
-Get the current host name.
+Cancel all asynchronous operations associated with the handle.
 
- std::string host_name(
+ boost::system::error_code cancel(
+ implementation_type & impl,
       boost::system::error_code & ec);
 
 
@@ -28237,82 +49139,72 @@
 [endsect]
 
 
-[endsect]
-
-
-[section:ip__multicast__enable_loopback ip::multicast::enable_loopback]
-
-Socket option determining whether outgoing multicast packets will be received on the same socket if it is a member of the multicast group.
 
- typedef implementation_defined enable_loopback;
+[section:close serial_port_service::close]
 
+Close a serial port implementation.
 
+ boost::system::error_code close(
+ implementation_type & impl,
+ boost::system::error_code & ec);
 
-Implements the IPPROTO\_IP/IP\_MULTICAST\_LOOP socket option.
 
 
-[heading Examples]
-
-Setting the option:
+[endsect]
 
- boost::asio::ip::udp::socket socket(io_service);
- ...
- boost::asio::ip::multicast::enable_loopback option(true);
- socket.set_option(option);
 
 
+[section:construct serial_port_service::construct]
 
+Construct a new serial port implementation.
 
-Getting the current option value:
+ void construct(
+ implementation_type & impl);
 
- boost::asio::ip::udp::socket socket(io_service);
- ...
- boost::asio::ip::multicast::enable_loopback option;
- socket.get_option(option);
- bool is_set = option.value();
 
 
+[endsect]
 
 
 
+[section:destroy serial_port_service::destroy]
 
-[endsect]
+Destroy a serial port implementation.
 
+ void destroy(
+ implementation_type & impl);
 
 
-[section:ip__multicast__hops ip::multicast::hops]
 
-Socket option for time-to-live associated with outgoing multicast packets.
+[endsect]
 
- typedef implementation_defined hops;
 
 
+[section:get_io_service serial_port_service::get_io_service]
 
-Implements the IPPROTO\_IP/IP\_MULTICAST\_TTL socket option.
 
+['Inherited from io_service.]
 
-[heading Examples]
-
-Setting the option:
+Get the io_service object that owns the service.
 
- boost::asio::ip::udp::socket socket(io_service);
- ...
- boost::asio::ip::multicast::hops option(4);
- socket.set_option(option);
+ boost::asio::io_service & get_io_service();
 
 
 
+[endsect]
 
-Getting the current option value:
 
- boost::asio::ip::udp::socket socket(io_service);
- ...
- boost::asio::ip::multicast::hops option;
- socket.get_option(option);
- int ttl = option.value();
 
+[section:get_option serial_port_service::get_option]
 
+Get a serial port option.
 
+ template<
+ typename ``[link boost_asio.reference.GettableSerialPortOption GettableSerialPortOption]``>
+ boost::system::error_code get_option(
+ const implementation_type & impl,
+ GettableSerialPortOption & option,
+ boost::system::error_code & ec) const;
 
 
 
@@ -28320,29 +49212,23 @@
 
 
 
-[section:ip__multicast__join_group ip::multicast::join_group]
+[section:id serial_port_service::id]
 
-Socket option to join a multicast group on a specified interface.
+The unique service identifier.
 
- typedef implementation_defined join_group;
+ static boost::asio::io_service::id id;
 
 
 
-Implements the IPPROTO\_IP/IP\_ADD\_MEMBERSHIP socket option.
+[endsect]
 
 
-[heading Examples]
-
-Setting the option to join a multicast group:
 
- boost::asio::ip::udp::socket socket(io_service);
- ...
- boost::asio::ip::address multicast_address =
- boost::asio::ip::address::from_string("225.0.0.1");
- boost::asio::ip::multicast::join_group option(multicast_address);
- socket.set_option(option);
+[section:implementation_type serial_port_service::implementation_type]
 
+The type of a serial port implementation.
 
+ typedef implementation_defined implementation_type;
 
 
 
@@ -28351,30 +49237,27 @@
 
 
 
-[section:ip__multicast__leave_group ip::multicast::leave_group]
+[section:io_service serial_port_service::io_service]
 
-Socket option to leave a multicast group on a specified interface.
 
- typedef implementation_defined leave_group;
+['Inherited from io_service.]
 
+(Deprecated: use get_io_service().) Get the io_service object that owns the service.
 
+ boost::asio::io_service & io_service();
 
-Implements the IPPROTO\_IP/IP\_DROP\_MEMBERSHIP socket option.
 
 
-[heading Examples]
-
-Setting the option to leave a multicast group:
+[endsect]
 
- boost::asio::ip::udp::socket socket(io_service);
- ...
- boost::asio::ip::address multicast_address =
- boost::asio::ip::address::from_string("225.0.0.1");
- boost::asio::ip::multicast::leave_group option(multicast_address);
- socket.set_option(option);
 
 
+[section:is_open serial_port_service::is_open]
 
+Determine whether the handle is open.
+
+ bool is_open(
+ const implementation_type & impl) const;
 
 
 
@@ -28382,29 +49265,24 @@
 
 
 
-[section:ip__multicast__outbound_interface ip::multicast::outbound_interface]
+[section:native serial_port_service::native]
 
-Socket option for local interface to use for outgoing multicast packets.
+Get the native handle implementation.
 
- typedef implementation_defined outbound_interface;
+ native_type native(
+ implementation_type & impl);
 
 
 
-Implements the IPPROTO\_IP/IP\_MULTICAST\_IF socket option.
+[endsect]
 
 
-[heading Examples]
-
-Setting the option:
 
- boost::asio::ip::udp::socket socket(io_service);
- ...
- boost::asio::ip::address_v4 local_interface =
- boost::asio::ip::address_v4::from_string("1.2.3.4");
- boost::asio::ip::multicast::outbound_interface option(local_interface);
- socket.set_option(option);
+[section:native_type serial_port_service::native_type]
 
+The native handle type.
 
+ typedef implementation_defined native_type;
 
 
 
@@ -28412,60 +49290,46 @@
 [endsect]
 
 
-[section:ip__resolver_query_base ip::resolver_query_base]
 
-The resolver_query_base class is used as a base for the basic_resolver_query class templates to provide a common place to define the flag constants.
+[section:open serial_port_service::open]
 
- class resolver_query_base
+Open a serial port.
 
+ boost::system::error_code open(
+ implementation_type & impl,
+ const std::string & device,
+ boost::system::error_code & ec);
 
-[heading Data Members]
-[table
- [[Name][Description]]
 
- [
- [[link boost_asio.reference.ip__resolver_query_base.address_configured [*address_configured]]]
- [Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system. ]
- ]
 
- [
- [[link boost_asio.reference.ip__resolver_query_base.all_matching [*all_matching]]]
- [If used with v4_mapped, return all matching IPv6 and IPv4 addresses. ]
- ]
+[endsect]
 
- [
- [[link boost_asio.reference.ip__resolver_query_base.canonical_name [*canonical_name]]]
- [Determine the canonical name of the host specified in the query. ]
- ]
 
- [
- [[link boost_asio.reference.ip__resolver_query_base.numeric_host [*numeric_host]]]
- [Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. ]
- ]
 
- [
- [[link boost_asio.reference.ip__resolver_query_base.numeric_service [*numeric_service]]]
- [Service name should be treated as a numeric string defining a port number and no name resolution should be attempted. ]
- ]
+[section:read_some serial_port_service::read_some]
 
- [
- [[link boost_asio.reference.ip__resolver_query_base.passive [*passive]]]
- [Indicate that returned endpoint is intended for use as a locally bound socket endpoint. ]
- ]
+Read some data from the stream.
 
- [
- [[link boost_asio.reference.ip__resolver_query_base.v4_mapped [*v4_mapped]]]
- [If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. ]
- ]
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t read_some(
+ implementation_type & impl,
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
 
-]
 
 
-[section:address_configured ip::resolver_query_base::address_configured]
+[endsect]
 
-Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system.
 
- static const int address_configured = implementation_defined;
+
+[section:send_break serial_port_service::send_break]
+
+Send a break sequence to the serial port.
+
+ boost::system::error_code send_break(
+ implementation_type & impl,
+ boost::system::error_code & ec);
 
 
 
@@ -28473,11 +49337,12 @@
 
 
 
-[section:all_matching ip::resolver_query_base::all_matching]
+[section:serial_port_service serial_port_service::serial_port_service]
 
-If used with v4_mapped, return all matching IPv6 and IPv4 addresses.
+Construct a new serial port service for the specified io_service.
 
- static const int all_matching = implementation_defined;
+ serial_port_service(
+ boost::asio::io_service & io_service);
 
 
 
@@ -28485,11 +49350,16 @@
 
 
 
-[section:canonical_name ip::resolver_query_base::canonical_name]
+[section:set_option serial_port_service::set_option]
 
-Determine the canonical name of the host specified in the query.
+Set a serial port option.
 
- static const int canonical_name = implementation_defined;
+ template<
+ typename ``[link boost_asio.reference.SettableSerialPortOption SettableSerialPortOption]``>
+ boost::system::error_code set_option(
+ implementation_type & impl,
+ const SettableSerialPortOption & option,
+ boost::system::error_code & ec);
 
 
 
@@ -28497,11 +49367,11 @@
 
 
 
-[section:numeric_host ip::resolver_query_base::numeric_host]
+[section:shutdown_service serial_port_service::shutdown_service]
 
-Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted.
+Destroy all user-defined handler objects owned by the service.
 
- static const int numeric_host = implementation_defined;
+ void shutdown_service();
 
 
 
@@ -28509,11 +49379,16 @@
 
 
 
-[section:numeric_service ip::resolver_query_base::numeric_service]
+[section:write_some serial_port_service::write_some]
 
-Service name should be treated as a numeric string defining a port number and no name resolution should be attempted.
+Write the given data to the stream.
 
- static const int numeric_service = implementation_defined;
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t write_some(
+ implementation_type & impl,
+ const ConstBufferSequence & buffers,
+ boost::system::error_code & ec);
 
 
 
@@ -28521,23 +49396,32 @@
 
 
 
-[section:passive ip::resolver_query_base::passive]
+[endsect]
 
-Indicate that returned endpoint is intended for use as a locally bound socket endpoint.
+[section:service_already_exists service_already_exists]
 
- static const int passive = implementation_defined;
+Exception thrown when trying to add a duplicate service to an io_service.
 
+ class service_already_exists
 
 
-[endsect]
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.service_already_exists.service_already_exists [*service_already_exists]]]
+ []
+ ]
+
+]
 
 
-[section:v4_mapped ip::resolver_query_base::v4_mapped]
+[section:service_already_exists service_already_exists::service_already_exists]
 
-If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses.
 
- static const int v4_mapped = implementation_defined;
+
+ service_already_exists();
 
 
 
@@ -28547,13 +49431,13 @@
 
 [endsect]
 
-[section:ip__resolver_service ip::resolver_service]
+[section:socket_acceptor_service socket_acceptor_service]
 
-Default service implementation for a resolver.
+Default service implementation for a socket acceptor.
 
   template<
- typename ``[link boost_asio.reference.InternetProtocol InternetProtocol]``>
- class resolver_service :
+ typename ``[link boost_asio.reference.Protocol Protocol]``>
+ class socket_acceptor_service :
     public io_service::service
 
 
@@ -28563,39 +49447,32 @@
 
   [
 
- [[link boost_asio.reference.ip__resolver_service.endpoint_type [*endpoint_type]]]
+ [[link boost_asio.reference.socket_acceptor_service.endpoint_type [*endpoint_type]]]
     [The endpoint type. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.ip__resolver_service.implementation_type [*implementation_type]]]
- [The type of a resolver implementation. ]
+ [[link boost_asio.reference.socket_acceptor_service.implementation_type [*implementation_type]]]
+ [The native type of the socket acceptor. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.ip__resolver_service.iterator_type [*iterator_type]]]
- [The iterator type. ]
+ [[link boost_asio.reference.socket_acceptor_service.native_type [*native_type]]]
+ [The native acceptor type. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.ip__resolver_service.protocol_type [*protocol_type]]]
+ [[link boost_asio.reference.socket_acceptor_service.protocol_type [*protocol_type]]]
     [The protocol type. ]
   
   ]
 
- [
-
- [[link boost_asio.reference.ip__resolver_service.query_type [*query_type]]]
- [The query type. ]
-
- ]
-
 ]
 
 [heading Member Functions]
@@ -28603,50 +49480,105 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.ip__resolver_service.async_resolve [*async_resolve]]]
- [Asynchronously resolve a query to a list of entries. ]
+ [[link boost_asio.reference.socket_acceptor_service.accept [*accept]]]
+ [Accept a new connection. ]
   ]
   
   [
- [[link boost_asio.reference.ip__resolver_service.cancel [*cancel]]]
- [Cancel pending asynchronous operations. ]
+ [[link boost_asio.reference.socket_acceptor_service.assign [*assign]]]
+ [Assign an existing native acceptor to a socket acceptor. ]
   ]
   
   [
- [[link boost_asio.reference.ip__resolver_service.construct [*construct]]]
- [Construct a new resolver implementation. ]
+ [[link boost_asio.reference.socket_acceptor_service.async_accept [*async_accept]]]
+ [Start an asynchronous accept. ]
   ]
   
   [
- [[link boost_asio.reference.ip__resolver_service.destroy [*destroy]]]
- [Destroy a resolver implementation. ]
+ [[link boost_asio.reference.socket_acceptor_service.bind [*bind]]]
+ [Bind the socket acceptor to the specified local endpoint. ]
   ]
   
   [
- [[link boost_asio.reference.ip__resolver_service.get_io_service [*get_io_service]]]
+ [[link boost_asio.reference.socket_acceptor_service.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the acceptor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.socket_acceptor_service.close [*close]]]
+ [Close a socket acceptor implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.socket_acceptor_service.construct [*construct]]]
+ [Construct a new socket acceptor implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.socket_acceptor_service.destroy [*destroy]]]
+ [Destroy a socket acceptor implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.socket_acceptor_service.get_io_service [*get_io_service]]]
     [Get the io_service object that owns the service. ]
   ]
   
   [
- [[link boost_asio.reference.ip__resolver_service.io_service [*io_service]]]
+ [[link boost_asio.reference.socket_acceptor_service.get_option [*get_option]]]
+ [Get a socket option. ]
+ ]
+
+ [
+ [[link boost_asio.reference.socket_acceptor_service.io_control [*io_control]]]
+ [Perform an IO control command on the socket. ]
+ ]
+
+ [
+ [[link boost_asio.reference.socket_acceptor_service.io_service [*io_service]]]
     [(Deprecated: use get_io_service().) Get the io_service object that owns the service. ]
   ]
   
   [
- [[link boost_asio.reference.ip__resolver_service.resolve [*resolve]]]
- [Resolve a query to a list of entries. ]
+ [[link boost_asio.reference.socket_acceptor_service.is_open [*is_open]]]
+ [Determine whether the acceptor is open. ]
   ]
   
   [
- [[link boost_asio.reference.ip__resolver_service.resolver_service [*resolver_service]]]
- [Construct a new resolver service for the specified io_service. ]
+ [[link boost_asio.reference.socket_acceptor_service.listen [*listen]]]
+ [Place the socket acceptor into the state where it will listen for new connections. ]
   ]
   
   [
- [[link boost_asio.reference.ip__resolver_service.shutdown_service [*shutdown_service]]]
+ [[link boost_asio.reference.socket_acceptor_service.local_endpoint [*local_endpoint]]]
+ [Get the local endpoint. ]
+ ]
+
+ [
+ [[link boost_asio.reference.socket_acceptor_service.native [*native]]]
+ [Get the native acceptor implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.socket_acceptor_service.open [*open]]]
+ [Open a new socket acceptor implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.socket_acceptor_service.set_option [*set_option]]]
+ [Set a socket option. ]
+ ]
+
+ [
+ [[link boost_asio.reference.socket_acceptor_service.shutdown_service [*shutdown_service]]]
     [Destroy all user-defined handler objects owned by the service. ]
   ]
   
+ [
+ [[link boost_asio.reference.socket_acceptor_service.socket_acceptor_service [*socket_acceptor_service]]]
+ [Construct a new socket acceptor service for the specified io_service. ]
+ ]
+
 ]
 
 [heading Data Members]
@@ -28654,41 +49586,59 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.ip__resolver_service.id [*id]]]
+ [[link boost_asio.reference.socket_acceptor_service.id [*id]]]
     [The unique service identifier. ]
   ]
 
 ]
 
-[section:async_resolve ip::resolver_service::async_resolve]
 
-Asynchronously resolve a query to a list of entries.
+[section:accept socket_acceptor_service::accept]
+
+Accept a new connection.
 
   template<
- typename ``[link boost_asio.reference.Handler Handler]``>
- void ``[link boost_asio.reference.ip__resolver_service.async_resolve.overload1 async_resolve]``(
+ typename ``[link boost_asio.reference.SocketService SocketService]``>
+ boost::system::error_code accept(
       implementation_type & impl,
- const query_type & query,
- Handler handler);
+ basic_socket< protocol_type, SocketService > & peer,
+ endpoint_type * peer_endpoint,
+ boost::system::error_code & ec);
 
- template<
- typename ``[link boost_asio.reference.ResolveHandler ResolveHandler]``>
- void ``[link boost_asio.reference.ip__resolver_service.async_resolve.overload2 async_resolve]``(
+
+
+[endsect]
+
+
+
+[section:assign socket_acceptor_service::assign]
+
+Assign an existing native acceptor to a socket acceptor.
+
+ boost::system::error_code assign(
       implementation_type & impl,
- const endpoint_type & endpoint,
- ResolveHandler handler);
+ const protocol_type & protocol,
+ const native_type & native_acceptor,
+ boost::system::error_code & ec);
 
 
-[section:overload1 ip::resolver_service::async_resolve (1 of 2 overloads)]
 
-Asynchronously resolve a query to a list of entries.
+[endsect]
+
+
+
+[section:async_accept socket_acceptor_service::async_accept]
+
+Start an asynchronous accept.
 
   template<
- typename ``[link boost_asio.reference.Handler Handler]``>
- void async_resolve(
+ typename ``[link boost_asio.reference.SocketService SocketService]``,
+ typename ``[link boost_asio.reference.AcceptHandler AcceptHandler]``>
+ void async_accept(
       implementation_type & impl,
- const query_type & query,
- Handler handler);
+ basic_socket< protocol_type, SocketService > & peer,
+ endpoint_type * peer_endpoint,
+ AcceptHandler handler);
 
 
 
@@ -28696,31 +49646,42 @@
 
 
 
-[section:overload2 ip::resolver_service::async_resolve (2 of 2 overloads)]
+[section:bind socket_acceptor_service::bind]
 
-Asynchronously resolve an endpoint to a list of entries.
+Bind the socket acceptor to the specified local endpoint.
 
- template<
- typename ``[link boost_asio.reference.ResolveHandler ResolveHandler]``>
- void async_resolve(
+ boost::system::error_code bind(
       implementation_type & impl,
       const endpoint_type & endpoint,
- ResolveHandler handler);
+ boost::system::error_code & ec);
 
 
 
 [endsect]
 
 
+
+[section:cancel socket_acceptor_service::cancel]
+
+Cancel all asynchronous operations associated with the acceptor.
+
+ boost::system::error_code cancel(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
 [endsect]
 
 
-[section:cancel ip::resolver_service::cancel]
 
-Cancel pending asynchronous operations.
+[section:close socket_acceptor_service::close]
 
- void cancel(
- implementation_type & impl);
+Close a socket acceptor implementation.
+
+ boost::system::error_code close(
+ implementation_type & impl,
+ boost::system::error_code & ec);
 
 
 
@@ -28728,9 +49689,9 @@
 
 
 
-[section:construct ip::resolver_service::construct]
+[section:construct socket_acceptor_service::construct]
 
-Construct a new resolver implementation.
+Construct a new socket acceptor implementation.
 
   void construct(
       implementation_type & impl);
@@ -28741,9 +49702,9 @@
 
 
 
-[section:destroy ip::resolver_service::destroy]
+[section:destroy socket_acceptor_service::destroy]
 
-Destroy a resolver implementation.
+Destroy a socket acceptor implementation.
 
   void destroy(
       implementation_type & impl);
@@ -28754,11 +49715,11 @@
 
 
 
-[section:endpoint_type ip::resolver_service::endpoint_type]
+[section:endpoint_type socket_acceptor_service::endpoint_type]
 
 The endpoint type.
 
- typedef InternetProtocol::endpoint endpoint_type;
+ typedef protocol_type::endpoint endpoint_type;
 
 
 
@@ -28767,7 +49728,7 @@
 
 
 
-[section:get_io_service ip::resolver_service::get_io_service]
+[section:get_io_service socket_acceptor_service::get_io_service]
 
 
 ['Inherited from io_service.]
@@ -28782,11 +49743,16 @@
 
 
 
-[section:id ip::resolver_service::id]
+[section:get_option socket_acceptor_service::get_option]
 
-The unique service identifier.
+Get a socket option.
 
- static boost::asio::io_service::id id;
+ template<
+ typename ``[link boost_asio.reference.GettableSocketOption GettableSocketOption]``>
+ boost::system::error_code get_option(
+ const implementation_type & impl,
+ GettableSocketOption & option,
+ boost::system::error_code & ec) const;
 
 
 
@@ -28794,12 +49760,11 @@
 
 
 
-[section:implementation_type ip::resolver_service::implementation_type]
-
-The type of a resolver implementation.
+[section:id socket_acceptor_service::id]
 
- typedef implementation_defined implementation_type;
+The unique service identifier.
 
+ static boost::asio::io_service::id id;
 
 
 
@@ -28807,14 +49772,12 @@
 
 
 
-[section:io_service ip::resolver_service::io_service]
-
+[section:implementation_type socket_acceptor_service::implementation_type]
 
-['Inherited from io_service.]
+The native type of the socket acceptor.
 
-(Deprecated: use get_io_service().) Get the io_service object that owns the service.
+ typedef implementation_defined implementation_type;
 
- boost::asio::io_service & io_service();
 
 
 
@@ -28822,12 +49785,16 @@
 
 
 
-[section:iterator_type ip::resolver_service::iterator_type]
-
-The iterator type.
+[section:io_control socket_acceptor_service::io_control]
 
- typedef InternetProtocol::resolver_iterator iterator_type;
+Perform an IO control command on the socket.
 
+ template<
+ typename ``[link boost_asio.reference.IoControlCommand IoControlCommand]``>
+ boost::system::error_code io_control(
+ implementation_type & impl,
+ IoControlCommand & command,
+ boost::system::error_code & ec);
 
 
 
@@ -28835,54 +49802,56 @@
 
 
 
-[section:protocol_type ip::resolver_service::protocol_type]
+[section:io_service socket_acceptor_service::io_service]
 
-The protocol type.
 
- typedef InternetProtocol protocol_type;
+['Inherited from io_service.]
 
+(Deprecated: use get_io_service().) Get the io_service object that owns the service.
 
+ boost::asio::io_service & io_service();
 
 
-[endsect]
 
+[endsect]
 
 
-[section:query_type ip::resolver_service::query_type]
 
-The query type.
+[section:is_open socket_acceptor_service::is_open]
 
- typedef InternetProtocol::resolver_query query_type;
+Determine whether the acceptor is open.
 
+ bool is_open(
+ const implementation_type & impl) const;
 
 
 
 [endsect]
 
 
-[section:resolve ip::resolver_service::resolve]
 
-Resolve a query to a list of entries.
+[section:listen socket_acceptor_service::listen]
 
- iterator_type ``[link boost_asio.reference.ip__resolver_service.resolve.overload1 resolve]``(
- implementation_type & impl,
- const query_type & query,
- boost::system::error_code & ec);
+Place the socket acceptor into the state where it will listen for new connections.
 
- iterator_type ``[link boost_asio.reference.ip__resolver_service.resolve.overload2 resolve]``(
+ boost::system::error_code listen(
       implementation_type & impl,
- const endpoint_type & endpoint,
+ int backlog,
       boost::system::error_code & ec);
 
 
-[section:overload1 ip::resolver_service::resolve (1 of 2 overloads)]
 
-Resolve a query to a list of entries.
+[endsect]
+
 
- iterator_type resolve(
- implementation_type & impl,
- const query_type & query,
- boost::system::error_code & ec);
+
+[section:local_endpoint socket_acceptor_service::local_endpoint]
+
+Get the local endpoint.
+
+ endpoint_type local_endpoint(
+ const implementation_type & impl,
+ boost::system::error_code & ec) const;
 
 
 
@@ -28890,29 +49859,25 @@
 
 
 
-[section:overload2 ip::resolver_service::resolve (2 of 2 overloads)]
+[section:native socket_acceptor_service::native]
 
-Resolve an endpoint to a list of entries.
+Get the native acceptor implementation.
 
- iterator_type resolve(
- implementation_type & impl,
- const endpoint_type & endpoint,
- boost::system::error_code & ec);
+ native_type native(
+ implementation_type & impl);
 
 
 
 [endsect]
 
 
-[endsect]
 
+[section:native_type socket_acceptor_service::native_type]
 
-[section:resolver_service ip::resolver_service::resolver_service]
+The native acceptor type.
 
-Construct a new resolver service for the specified io_service.
+ typedef implementation_defined native_type;
 
- resolver_service(
- boost::asio::io_service & io_service);
 
 
 
@@ -28920,11 +49885,14 @@
 
 
 
-[section:shutdown_service ip::resolver_service::shutdown_service]
+[section:open socket_acceptor_service::open]
 
-Destroy all user-defined handler objects owned by the service.
+Open a new socket acceptor implementation.
 
- void shutdown_service();
+ boost::system::error_code open(
+ implementation_type & impl,
+ const protocol_type & protocol,
+ boost::system::error_code & ec);
 
 
 
@@ -28932,141 +49900,68 @@
 
 
 
-[endsect]
+[section:protocol_type socket_acceptor_service::protocol_type]
 
-[section:ip__tcp ip::tcp]
+The protocol type.
 
-Encapsulates the flags needed for TCP.
+ typedef Protocol protocol_type;
 
- class tcp
 
 
-[heading Types]
-[table
- [[Name][Description]]
 
- [
+[endsect]
+
 
- [[link boost_asio.reference.ip__tcp.acceptor [*acceptor]]]
- [The TCP acceptor type. ]
-
- ]
 
- [
+[section:set_option socket_acceptor_service::set_option]
 
- [[link boost_asio.reference.ip__tcp.endpoint [*endpoint]]]
- [The type of a TCP endpoint. ]
-
- ]
+Set a socket option.
 
- [
+ template<
+ typename ``[link boost_asio.reference.SettableSocketOption SettableSocketOption]``>
+ boost::system::error_code set_option(
+ implementation_type & impl,
+ const SettableSocketOption & option,
+ boost::system::error_code & ec);
 
- [[link boost_asio.reference.ip__tcp.iostream [*iostream]]]
- [The TCP iostream type. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.ip__tcp.no_delay [*no_delay]]]
- [Socket option for disabling the Nagle algorithm. ]
-
- ]
+[endsect]
 
- [
 
- [[link boost_asio.reference.ip__tcp.resolver [*resolver]]]
- [The TCP resolver type. ]
-
- ]
 
- [
+[section:shutdown_service socket_acceptor_service::shutdown_service]
 
- [[link boost_asio.reference.ip__tcp.resolver_iterator [*resolver_iterator]]]
- [The type of a resolver iterator. ]
-
- ]
+Destroy all user-defined handler objects owned by the service.
 
- [
+ void shutdown_service();
 
- [[link boost_asio.reference.ip__tcp.resolver_query [*resolver_query]]]
- [The type of a resolver query. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.ip__tcp.socket [*socket]]]
- [The TCP socket type. ]
-
- ]
+[endsect]
 
-]
 
-[heading Member Functions]
-[table
- [[Name][Description]]
 
- [
- [[link boost_asio.reference.ip__tcp.family [*family]]]
- [Obtain an identifier for the protocol family. ]
- ]
-
- [
- [[link boost_asio.reference.ip__tcp.protocol [*protocol]]]
- [Obtain an identifier for the protocol. ]
- ]
-
- [
- [[link boost_asio.reference.ip__tcp.type [*type]]]
- [Obtain an identifier for the type of the protocol. ]
- ]
-
- [
- [[link boost_asio.reference.ip__tcp.v4 [*v4]]]
- [Construct to represent the IPv4 TCP protocol. ]
- ]
-
- [
- [[link boost_asio.reference.ip__tcp.v6 [*v6]]]
- [Construct to represent the IPv6 TCP protocol. ]
- ]
-
-]
+[section:socket_acceptor_service socket_acceptor_service::socket_acceptor_service]
 
-[heading Friends]
-[table
- [[Name][Description]]
+Construct a new socket acceptor service for the specified io_service.
 
- [
- [[link boost_asio.reference.ip__tcp.operator_not__eq_ [*operator!=]]]
- [Compare two protocols for inequality. ]
- ]
-
- [
- [[link boost_asio.reference.ip__tcp.operator_eq__eq_ [*operator==]]]
- [Compare two protocols for equality. ]
- ]
-
-]
+ socket_acceptor_service(
+ boost::asio::io_service & io_service);
 
-The
-[link boost_asio.reference.ip__tcp ip::tcp] class contains flags necessary for TCP sockets.
 
 
-[heading Thread Safety]
-
-[*Distinct] [*objects:] Safe.
+[endsect]
 
-[*Shared] [*objects:] Safe.
 
 
+[endsect]
 
-[section:acceptor ip::tcp::acceptor]
+[section:socket_base socket_base]
 
-The TCP acceptor type.
+The socket_base class is used as a base for the basic_stream_socket and basic_datagram_socket class templates so that we have a common place to define the shutdown_type and enum.
 
- typedef basic_socket_acceptor< tcp > acceptor;
+ class socket_base
 
 
 [heading Types]
@@ -29075,228 +49970,118 @@
 
   [
 
- [[link boost_asio.reference.basic_socket_acceptor.broadcast [*broadcast]]]
+ [[link boost_asio.reference.socket_base.broadcast [*broadcast]]]
     [Socket option to permit sending of broadcast messages. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket_acceptor.bytes_readable [*bytes_readable]]]
+ [[link boost_asio.reference.socket_base.bytes_readable [*bytes_readable]]]
     [IO control command to get the amount of data that can be read without blocking. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket_acceptor.debug [*debug]]]
+ [[link boost_asio.reference.socket_base.debug [*debug]]]
     [Socket option to enable socket-level debugging. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket_acceptor.do_not_route [*do_not_route]]]
+ [[link boost_asio.reference.socket_base.do_not_route [*do_not_route]]]
     [Socket option to prevent routing, use local interfaces only. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket_acceptor.enable_connection_aborted [*enable_connection_aborted]]]
+ [[link boost_asio.reference.socket_base.enable_connection_aborted [*enable_connection_aborted]]]
     [Socket option to report aborted connections on accept. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket_acceptor.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link boost_asio.reference.basic_socket_acceptor.implementation_type [*implementation_type]]]
- [The underlying implementation type of I/O object. ]
-
- ]
-
- [
-
- [[link boost_asio.reference.basic_socket_acceptor.keep_alive [*keep_alive]]]
+ [[link boost_asio.reference.socket_base.keep_alive [*keep_alive]]]
     [Socket option to send keep-alives. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket_acceptor.linger [*linger]]]
+ [[link boost_asio.reference.socket_base.linger [*linger]]]
     [Socket option to specify whether the socket lingers on close if unsent data is present. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket_acceptor.message_flags [*message_flags]]]
+ [[link boost_asio.reference.socket_base.message_flags [*message_flags]]]
     [Bitmask type for flags that can be passed to send and receive operations. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket_acceptor.native_type [*native_type]]]
- [The native representation of an acceptor. ]
-
- ]
-
- [
-
- [[link boost_asio.reference.basic_socket_acceptor.non_blocking_io [*non_blocking_io]]]
+ [[link boost_asio.reference.socket_base.non_blocking_io [*non_blocking_io]]]
     [IO control command to set the blocking mode of the socket. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket_acceptor.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link boost_asio.reference.basic_socket_acceptor.receive_buffer_size [*receive_buffer_size]]]
+ [[link boost_asio.reference.socket_base.receive_buffer_size [*receive_buffer_size]]]
     [Socket option for the receive buffer size of a socket. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket_acceptor.receive_low_watermark [*receive_low_watermark]]]
+ [[link boost_asio.reference.socket_base.receive_low_watermark [*receive_low_watermark]]]
     [Socket option for the receive low watermark. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket_acceptor.reuse_address [*reuse_address]]]
+ [[link boost_asio.reference.socket_base.reuse_address [*reuse_address]]]
     [Socket option to allow the socket to be bound to an address that is already in use. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket_acceptor.send_buffer_size [*send_buffer_size]]]
+ [[link boost_asio.reference.socket_base.send_buffer_size [*send_buffer_size]]]
     [Socket option for the send buffer size of a socket. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket_acceptor.send_low_watermark [*send_low_watermark]]]
+ [[link boost_asio.reference.socket_base.send_low_watermark [*send_low_watermark]]]
     [Socket option for the send low watermark. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_socket_acceptor.service_type [*service_type]]]
- [The type of the service that will be used to provide I/O operations. ]
-
- ]
-
- [
-
- [[link boost_asio.reference.basic_socket_acceptor.shutdown_type [*shutdown_type]]]
+ [[link boost_asio.reference.socket_base.shutdown_type [*shutdown_type]]]
     [Different ways a socket may be shutdown. ]
   
   ]
 
 ]
 
-[heading Member Functions]
+[heading Protected Member Functions]
 [table
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.basic_socket_acceptor.accept [*accept]]]
- [Accept a new connection. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.assign [*assign]]]
- [Assigns an existing native acceptor to the acceptor. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.async_accept [*async_accept]]]
- [Start an asynchronous accept. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.basic_socket_acceptor [*basic_socket_acceptor]]]
- [Construct an acceptor without opening it. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.bind [*bind]]]
- [Bind the acceptor to the given local endpoint. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the acceptor. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.close [*close]]]
- [Close the acceptor. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.get_io_service [*get_io_service]]]
- [Get the io_service associated with the object. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.get_option [*get_option]]]
- [Get an option from the acceptor. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.io_service [*io_service]]]
- [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.is_open [*is_open]]]
- [Determine whether the acceptor is open. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.listen [*listen]]]
- [Place the acceptor into the state where it will listen for new connections. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the acceptor. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.native [*native]]]
- [Get the native acceptor representation. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.open [*open]]]
- [Open the acceptor using the specified protocol. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_acceptor.set_option [*set_option]]]
- [Set an option on the acceptor. ]
+ [[link boost_asio.reference.socket_base._socket_base [*~socket_base]]]
+ [Protected destructor to prevent deletion through this type. ]
   ]
   
 ]
@@ -29306,47 +50091,88 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.basic_socket_acceptor.max_connections [*max_connections]]]
+ [[link boost_asio.reference.socket_base.max_connections [*max_connections]]]
     [The maximum length of the queue of pending incoming connections. ]
   ]
 
   [
- [[link boost_asio.reference.basic_socket_acceptor.message_do_not_route [*message_do_not_route]]]
+ [[link boost_asio.reference.socket_base.message_do_not_route [*message_do_not_route]]]
     [Specify that the data should not be subject to routing. ]
   ]
 
   [
- [[link boost_asio.reference.basic_socket_acceptor.message_out_of_band [*message_out_of_band]]]
+ [[link boost_asio.reference.socket_base.message_out_of_band [*message_out_of_band]]]
     [Process out-of-band data. ]
   ]
 
   [
- [[link boost_asio.reference.basic_socket_acceptor.message_peek [*message_peek]]]
+ [[link boost_asio.reference.socket_base.message_peek [*message_peek]]]
     [Peek at incoming data without removing it from the input queue. ]
   ]
 
 ]
 
-The basic_socket_acceptor class template is used for accepting new socket connections.
 
+[section:broadcast socket_base::broadcast]
 
-[heading Thread Safety]
+Socket option to permit sending of broadcast messages.
+
+ typedef implementation_defined broadcast;
+
+
+
+Implements the SOL\_SOCKET/SO\_BROADCAST socket option.
+
+
+[heading Examples]
   
-[*Distinct] [*objects:] Safe.
+Setting the option:
+
+ boost::asio::ip::udp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::broadcast option(true);
+ socket.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::udp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::broadcast option;
+ socket.get_option(option);
+ bool is_set = option.value();
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:bytes_readable socket_base::bytes_readable]
+
+IO control command to get the amount of data that can be read without blocking.
+
+ typedef implementation_defined bytes_readable;
+
+
+
+Implements the FIONREAD IO control command.
 
-[*Shared] [*objects:] Unsafe.
 
 [heading Example]
   
-Opening a socket acceptor with the SO\_REUSEADDR option enabled:
 
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::tcp::v4(), port);
- acceptor.open(endpoint.protocol());
- acceptor.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true));
- acceptor.bind(endpoint);
- acceptor.listen();
 
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::bytes_readable command(true);
+ socket.io_control(command);
+ std::size_t bytes_readable = command.get();
 
 
 
@@ -29357,166 +50183,159 @@
 
 
 
-[section:endpoint ip::tcp::endpoint]
+[section:debug socket_base::debug]
 
-The type of a TCP endpoint.
+Socket option to enable socket-level debugging.
 
- typedef basic_endpoint< tcp > endpoint;
+ typedef implementation_defined debug;
 
 
-[heading Types]
-[table
- [[Name][Description]]
 
- [
+Implements the SOL\_SOCKET/SO\_DEBUG socket option.
 
- [[link boost_asio.reference.ip__basic_endpoint.data_type [*data_type]]]
- [The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. ]
+
+[heading Examples]
   
- ]
+Setting the option:
 
- [
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::debug option(true);
+ socket.set_option(option);
 
- [[link boost_asio.reference.ip__basic_endpoint.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint. ]
-
- ]
 
-]
 
-[heading Member Functions]
-[table
- [[Name][Description]]
 
- [
- [[link boost_asio.reference.ip__basic_endpoint.address [*address]]]
- [Get the IP address associated with the endpoint. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_endpoint.basic_endpoint [*basic_endpoint]]]
- [Default constructor. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_endpoint.capacity [*capacity]]]
- [Get the capacity of the endpoint in the native type. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_endpoint.data [*data]]]
- [Get the underlying endpoint in the native type. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_endpoint.operator_eq_ [*operator=]]]
- [Assign from another endpoint. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_endpoint.port [*port]]]
- [Get the port associated with the endpoint. The port number is always in the host's byte order. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_endpoint.protocol [*protocol]]]
- [The protocol associated with the endpoint. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_endpoint.resize [*resize]]]
- [Set the underlying size of the endpoint in the native type. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_endpoint.size [*size]]]
- [Get the underlying size of the endpoint in the native type. ]
- ]
-
-]
+Getting the current option value:
 
-[heading Friends]
-[table
- [[Name][Description]]
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::debug option;
+ socket.get_option(option);
+ bool is_set = option.value();
 
- [
- [[link boost_asio.reference.ip__basic_endpoint.operator_not__eq_ [*operator!=]]]
- [Compare two endpoints for inequality. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_endpoint.operator_lt_ [*operator<]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_endpoint.operator_eq__eq_ [*operator==]]]
- [Compare two endpoints for equality. ]
- ]
+
+
+
+
+
+[endsect]
+
+
+
+[section:do_not_route socket_base::do_not_route]
+
+Socket option to prevent routing, use local interfaces only.
+
+ typedef implementation_defined do_not_route;
+
+
+
+Implements the SOL\_SOCKET/SO\_DONTROUTE socket option.
+
+
+[heading Examples]
   
-]
+Setting the option:
 
-The
-[link boost_asio.reference.ip__basic_endpoint ip::basic_endpoint] class template describes an endpoint that may be associated with a particular socket.
+ boost::asio::ip::udp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::do_not_route option(true);
+ socket.set_option(option);
 
 
-[heading Thread Safety]
+
+
+Getting the current option value:
+
+ boost::asio::ip::udp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::do_not_route option;
+ socket.get_option(option);
+ bool is_set = option.value();
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:enable_connection_aborted socket_base::enable_connection_aborted]
+
+Socket option to report aborted connections on accept.
+
+ typedef implementation_defined enable_connection_aborted;
+
+
+
+Implements a custom socket option that determines whether or not an accept operation is permitted to fail with boost::asio::error::connection\_aborted. By default the option is false.
+
+
+[heading Examples]
   
-[*Distinct] [*objects:] Safe.
+Setting the option:
+
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
+ boost::asio::socket_base::enable_connection_aborted option(true);
+ acceptor.set_option(option);
 
-[*Shared] [*objects:] Unsafe.
 
 
 
+Getting the current option value:
+
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
+ boost::asio::socket_base::enable_connection_aborted option;
+ acceptor.get_option(option);
+ bool is_set = option.value();
+
+
+
+
+
+
+[endsect]
+
+
 
-[endsect]
+[section:keep_alive socket_base::keep_alive]
 
+Socket option to send keep-alives.
 
+ typedef implementation_defined keep_alive;
 
-[section:family ip::tcp::family]
 
-Obtain an identifier for the protocol family.
 
- int family() const;
+Implements the SOL\_SOCKET/SO\_KEEPALIVE socket option.
 
 
+[heading Examples]
+
+Setting the option:
 
-[endsect]
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::keep_alive option(true);
+ socket.set_option(option);
 
 
 
-[section:iostream ip::tcp::iostream]
 
-The TCP iostream type.
+Getting the current option value:
 
- typedef basic_socket_iostream< tcp > iostream;
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::keep_alive option;
+ socket.get_option(option);
+ bool is_set = option.value();
 
 
-[heading Member Functions]
-[table
- [[Name][Description]]
 
- [
- [[link boost_asio.reference.basic_socket_iostream.basic_socket_iostream [*basic_socket_iostream]]]
- [Construct a basic_socket_iostream without establishing a connection. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_iostream.close [*close]]]
- [Close the connection. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_iostream.connect [*connect]]]
- [Establish a connection to an endpoint corresponding to a resolver query. ]
- ]
-
- [
- [[link boost_asio.reference.basic_socket_iostream.rdbuf [*rdbuf]]]
- [Return a pointer to the underlying streambuf. ]
- ]
-
-]
 
 
 
@@ -29524,15 +50343,15 @@
 
 
 
-[section:no_delay ip::tcp::no_delay]
+[section:linger socket_base::linger]
 
-Socket option for disabling the Nagle algorithm.
+Socket option to specify whether the socket lingers on close if unsent data is present.
 
- typedef implementation_defined no_delay;
+ typedef implementation_defined linger;
 
 
 
-Implements the IPPROTO\_TCP/TCP\_NODELAY socket option.
+Implements the SOL\_SOCKET/SO\_LINGER socket option.
 
 
 [heading Examples]
@@ -29541,7 +50360,7 @@
 
    boost::asio::ip::tcp::socket socket(io_service);
    ...
- boost::asio::ip::tcp::no_delay option(true);
+ boost::asio::socket_base::linger option(true, 30);
    socket.set_option(option);
 
 
@@ -29551,9 +50370,10 @@
 
    boost::asio::ip::tcp::socket socket(io_service);
    ...
- boost::asio::ip::tcp::no_delay option;
+ boost::asio::socket_base::linger option;
    socket.get_option(option);
- bool is_set = option.value();
+ bool is_set = option.enabled();
+ unsigned short timeout = option.timeout();
 
 
 
@@ -29564,13 +50384,11 @@
 
 
 
-[section:operator_not__eq_ ip::tcp::operator!=]
+[section:max_connections socket_base::max_connections]
 
-Compare two protocols for inequality.
+The maximum length of the queue of pending incoming connections.
 
- friend bool operator!=(
- const tcp & p1,
- const tcp & p2);
+ static const int max_connections = implementation_defined;
 
 
 
@@ -29578,13 +50396,11 @@
 
 
 
-[section:operator_eq__eq_ ip::tcp::operator==]
+[section:message_do_not_route socket_base::message_do_not_route]
 
-Compare two protocols for equality.
+Specify that the data should not be subject to routing.
 
- friend bool operator==(
- const tcp & p1,
- const tcp & p2);
+ static const int message_do_not_route = implementation_defined;
 
 
 
@@ -29592,11 +50408,12 @@
 
 
 
-[section:protocol ip::tcp::protocol]
+[section:message_flags socket_base::message_flags]
 
-Obtain an identifier for the protocol.
+Bitmask type for flags that can be passed to send and receive operations.
+
+ typedef int message_flags;
 
- int protocol() const;
 
 
 
@@ -29604,105 +50421,51 @@
 
 
 
-[section:resolver ip::tcp::resolver]
+[section:message_out_of_band socket_base::message_out_of_band]
 
-The TCP resolver type.
+Process out-of-band data.
 
- typedef basic_resolver< tcp > resolver;
+ static const int message_out_of_band = implementation_defined;
 
 
-[heading Types]
-[table
- [[Name][Description]]
 
- [
+[endsect]
 
- [[link boost_asio.reference.ip__basic_resolver.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.ip__basic_resolver.implementation_type [*implementation_type]]]
- [The underlying implementation type of I/O object. ]
-
- ]
+[section:message_peek socket_base::message_peek]
 
- [
+Peek at incoming data without removing it from the input queue.
 
- [[link boost_asio.reference.ip__basic_resolver.iterator [*iterator]]]
- [The iterator type. ]
-
- ]
+ static const int message_peek = implementation_defined;
 
- [
 
- [[link boost_asio.reference.ip__basic_resolver.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
 
- [
+[endsect]
 
- [[link boost_asio.reference.ip__basic_resolver.query [*query]]]
- [The query type. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.ip__basic_resolver.service_type [*service_type]]]
- [The type of the service that will be used to provide I/O operations. ]
-
- ]
+[section:non_blocking_io socket_base::non_blocking_io]
 
-]
+IO control command to set the blocking mode of the socket.
 
-[heading Member Functions]
-[table
- [[Name][Description]]
+ typedef implementation_defined non_blocking_io;
 
- [
- [[link boost_asio.reference.ip__basic_resolver.async_resolve [*async_resolve]]]
- [Asynchronously resolve a query to a list of entries. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver.basic_resolver [*basic_resolver]]]
- [Constructor. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver.cancel [*cancel]]]
- [Cancel any asynchronous operations that are waiting on the resolver. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver.get_io_service [*get_io_service]]]
- [Get the io_service associated with the object. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver.io_service [*io_service]]]
- [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver.resolve [*resolve]]]
- [Resolve a query to a list of entries. ]
- ]
-
-]
 
-The basic_resolver class template provides the ability to resolve a query to a list of endpoints.
 
+Implements the FIONBIO IO control command.
 
-[heading Thread Safety]
+
+[heading Example]
   
-[*Distinct] [*objects:] Safe.
 
-[*Shared] [*objects:] Unsafe.
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::non_blocking_io command(true);
+ socket.io_control(command);
+
+
 
 
 
@@ -29711,45 +50474,78 @@
 
 
 
-[section:resolver_iterator ip::tcp::resolver_iterator]
+[section:receive_buffer_size socket_base::receive_buffer_size]
 
-The type of a resolver iterator.
+Socket option for the receive buffer size of a socket.
 
- typedef basic_resolver_iterator< tcp > resolver_iterator;
+ typedef implementation_defined receive_buffer_size;
 
 
-[heading Member Functions]
-[table
- [[Name][Description]]
 
- [
- [[link boost_asio.reference.ip__basic_resolver_iterator.basic_resolver_iterator [*basic_resolver_iterator]]]
- [Default constructor creates an end iterator. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver_iterator.create [*create]]]
- [Create an iterator from an addrinfo list returned by getaddrinfo. ]
- ]
+Implements the SOL\_SOCKET/SO\_RCVBUF socket option.
+
+
+[heading Examples]
   
-]
+Setting the option:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::receive_buffer_size option(8192);
+ socket.set_option(option);
 
-The
-[link boost_asio.reference.ip__basic_resolver_iterator ip::basic_resolver_iterator] class template is used to define iterators over the results returned by a resolver.
 
-The iterator's value\_type, obtained when the iterator is dereferenced, is:
 
- const basic_resolver_entry<InternetProtocol>
 
+Getting the current option value:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::receive_buffer_size option;
+ socket.get_option(option);
+ int size = option.value();
 
 
 
 
-[heading Thread Safety]
+
+
+[endsect]
+
+
+
+[section:receive_low_watermark socket_base::receive_low_watermark]
+
+Socket option for the receive low watermark.
+
+ typedef implementation_defined receive_low_watermark;
+
+
+
+Implements the SOL\_SOCKET/SO\_RCVLOWAT socket option.
+
+
+[heading Examples]
   
-[*Distinct] [*objects:] Safe.
+Setting the option:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::receive_low_watermark option(1024);
+ socket.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::receive_low_watermark option;
+ socket.get_option(option);
+ int size = option.value();
+
 
-[*Shared] [*objects:] Unsafe.
 
 
 
@@ -29758,102 +50554,78 @@
 
 
 
-[section:resolver_query ip::tcp::resolver_query]
+[section:reuse_address socket_base::reuse_address]
 
-The type of a resolver query.
+Socket option to allow the socket to be bound to an address that is already in use.
 
- typedef basic_resolver_query< tcp > resolver_query;
+ typedef implementation_defined reuse_address;
 
 
-[heading Types]
-[table
- [[Name][Description]]
 
- [
+Implements the SOL\_SOCKET/SO\_REUSEADDR socket option.
 
- [[link boost_asio.reference.ip__basic_resolver_query.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint query. ]
+
+[heading Examples]
   
- ]
+Setting the option:
 
-]
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
+ boost::asio::socket_base::reuse_address option(true);
+ acceptor.set_option(option);
 
-[heading Member Functions]
-[table
- [[Name][Description]]
 
- [
- [[link boost_asio.reference.ip__basic_resolver_query.basic_resolver_query [*basic_resolver_query]]]
- [Construct with specified service name for any protocol. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver_query.hints [*hints]]]
- [Get the hints associated with the query. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver_query.host_name [*host_name]]]
- [Get the host name associated with the query. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver_query.service_name [*service_name]]]
- [Get the service name associated with the query. ]
- ]
-
-]
 
-[heading Data Members]
-[table
- [[Name][Description]]
 
- [
- [[link boost_asio.reference.ip__basic_resolver_query.address_configured [*address_configured]]]
- [Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system. ]
- ]
+Getting the current option value:
 
- [
- [[link boost_asio.reference.ip__basic_resolver_query.all_matching [*all_matching]]]
- [If used with v4_mapped, return all matching IPv6 and IPv4 addresses. ]
- ]
+ boost::asio::ip::tcp::acceptor acceptor(io_service);
+ ...
+ boost::asio::socket_base::reuse_address option;
+ acceptor.get_option(option);
+ bool is_set = option.value();
 
- [
- [[link boost_asio.reference.ip__basic_resolver_query.canonical_name [*canonical_name]]]
- [Determine the canonical name of the host specified in the query. ]
- ]
 
- [
- [[link boost_asio.reference.ip__basic_resolver_query.numeric_host [*numeric_host]]]
- [Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. ]
- ]
 
- [
- [[link boost_asio.reference.ip__basic_resolver_query.numeric_service [*numeric_service]]]
- [Service name should be treated as a numeric string defining a port number and no name resolution should be attempted. ]
- ]
 
- [
- [[link boost_asio.reference.ip__basic_resolver_query.passive [*passive]]]
- [Indicate that returned endpoint is intended for use as a locally bound socket endpoint. ]
- ]
 
- [
- [[link boost_asio.reference.ip__basic_resolver_query.v4_mapped [*v4_mapped]]]
- [If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. ]
- ]
 
-]
+[endsect]
 
-The
-[link boost_asio.reference.ip__basic_resolver_query ip::basic_resolver_query] class template describes a query that can be passed to a resolver.
 
 
-[heading Thread Safety]
+[section:send_buffer_size socket_base::send_buffer_size]
+
+Socket option for the send buffer size of a socket.
+
+ typedef implementation_defined send_buffer_size;
+
+
+
+Implements the SOL\_SOCKET/SO\_SNDBUF socket option.
+
+
+[heading Examples]
   
-[*Distinct] [*objects:] Safe.
+Setting the option:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::send_buffer_size option(8192);
+ socket.set_option(option);
+
+
+
+
+Getting the current option value:
+
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::send_buffer_size option;
+ socket.get_option(option);
+ int size = option.value();
+
 
-[*Shared] [*objects:] Unsafe.
 
 
 
@@ -29862,161 +50634,152 @@
 
 
 
-[section:socket ip::tcp::socket]
+[section:send_low_watermark socket_base::send_low_watermark]
 
-The TCP socket type.
+Socket option for the send low watermark.
 
- typedef basic_stream_socket< tcp > socket;
+ typedef implementation_defined send_low_watermark;
 
 
-[heading Types]
-[table
- [[Name][Description]]
 
- [
+Implements the SOL\_SOCKET/SO\_SNDLOWAT socket option.
 
- [[link boost_asio.reference.basic_stream_socket.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
+
+[heading Examples]
   
- ]
+Setting the option:
 
- [
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::send_low_watermark option(1024);
+ socket.set_option(option);
 
- [[link boost_asio.reference.basic_stream_socket.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.basic_stream_socket.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
 
- [
+Getting the current option value:
 
- [[link boost_asio.reference.basic_stream_socket.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
+ boost::asio::ip::tcp::socket socket(io_service);
+ ...
+ boost::asio::socket_base::send_low_watermark option;
+ socket.get_option(option);
+ int size = option.value();
 
- [
 
- [[link boost_asio.reference.basic_stream_socket.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.basic_stream_socket.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.basic_stream_socket.implementation_type [*implementation_type]]]
- [The underlying implementation type of I/O object. ]
-
- ]
+[endsect]
 
- [
 
- [[link boost_asio.reference.basic_stream_socket.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
 
- [
+[section:shutdown_type socket_base::shutdown_type]
 
- [[link boost_asio.reference.basic_stream_socket.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
+Different ways a socket may be shutdown.
 
- [
+ enum shutdown_type
 
- [[link boost_asio.reference.basic_stream_socket.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
-
- ]
+[heading Values]
+[variablelist
 
   [
-
- [[link boost_asio.reference.basic_stream_socket.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
+ [shutdown_receive]
+ [Shutdown the receive side of the socket. ]
   ]
 
   [
-
- [[link boost_asio.reference.basic_stream_socket.native_type [*native_type]]]
- [The native representation of a socket. ]
-
+ [shutdown_send]
+ [Shutdown the send side of the socket. ]
   ]
 
   [
-
- [[link boost_asio.reference.basic_stream_socket.non_blocking_io [*non_blocking_io]]]
- [IO control command to set the blocking mode of the socket. ]
-
+ [shutdown_both]
+ [Shutdown both send and receive on the socket. ]
   ]
 
- [
+]
 
- [[link boost_asio.reference.basic_stream_socket.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
+
+
+[endsect]
+
+
+
+[section:_socket_base socket_base::~socket_base]
+
+Protected destructor to prevent deletion through this type.
+
+ ~socket_base();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:ssl__basic_context ssl::basic_context]
+
+SSL context.
+
+ template<
+ typename ``[link boost_asio.reference.Service Service]``>
+ class basic_context :
+ public ssl::context_base
+
+
+[heading Types]
+[table
+ [[Name][Description]]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
+ [[link boost_asio.reference.ssl__basic_context.file_format [*file_format]]]
+ [File format types. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
+ [[link boost_asio.reference.ssl__basic_context.impl_type [*impl_type]]]
+ [The native implementation type of the locking dispatcher. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
+ [[link boost_asio.reference.ssl__basic_context.method [*method]]]
+ [Different methods supported by a context. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
+ [[link boost_asio.reference.ssl__basic_context.options [*options]]]
+ [Bitmask type for SSL options. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
+ [[link boost_asio.reference.ssl__basic_context.password_purpose [*password_purpose]]]
+ [Purpose of PEM password. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.service_type [*service_type]]]
- [The type of the service that will be used to provide I/O operations. ]
+ [[link boost_asio.reference.ssl__basic_context.service_type [*service_type]]]
+ [The type of the service that will be used to provide context operations. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_stream_socket.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
+ [[link boost_asio.reference.ssl__basic_context.verify_mode [*verify_mode]]]
+ [Bitmask type for peer verification. ]
   
   ]
 
@@ -30027,199 +50790,208 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.basic_stream_socket.assign [*assign]]]
- [Assign an existing native socket to the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_stream_socket.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
- ]
-
- [
- [[link boost_asio.reference.basic_stream_socket.async_read_some [*async_read_some]]]
- [Start an asynchronous read. ]
- ]
-
- [
- [[link boost_asio.reference.basic_stream_socket.async_receive [*async_receive]]]
- [Start an asynchronous receive. ]
- ]
-
- [
- [[link boost_asio.reference.basic_stream_socket.async_send [*async_send]]]
- [Start an asynchronous send. ]
- ]
-
- [
- [[link boost_asio.reference.basic_stream_socket.async_write_some [*async_write_some]]]
- [Start an asynchronous write. ]
- ]
-
- [
- [[link boost_asio.reference.basic_stream_socket.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
+ [[link boost_asio.reference.ssl__basic_context.add_verify_path [*add_verify_path]]]
+ [Add a directory containing certificate authority files to be used for performing verification. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.available [*available]]]
- [Determine the number of bytes available for reading. ]
+ [[link boost_asio.reference.ssl__basic_context.basic_context [*basic_context]]]
+ [Constructor. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.basic_stream_socket [*basic_stream_socket]]]
- [Construct a basic_stream_socket without opening it. ]
+ [[link boost_asio.reference.ssl__basic_context.impl [*impl]]]
+ [Get the underlying implementation in the native type. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.bind [*bind]]]
- [Bind the socket to the given local endpoint. ]
+ [[link boost_asio.reference.ssl__basic_context.load_verify_file [*load_verify_file]]]
+ [Load a certification authority file for performing verification. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
+ [[link boost_asio.reference.ssl__basic_context.set_options [*set_options]]]
+ [Set options on the context. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.close [*close]]]
- [Close the socket. ]
+ [[link boost_asio.reference.ssl__basic_context.set_password_callback [*set_password_callback]]]
+ [Set the password callback. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.connect [*connect]]]
- [Connect the socket to the specified endpoint. ]
+ [[link boost_asio.reference.ssl__basic_context.set_verify_mode [*set_verify_mode]]]
+ [Set the peer verification mode. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.get_io_service [*get_io_service]]]
- [Get the io_service associated with the object. ]
+ [[link boost_asio.reference.ssl__basic_context.use_certificate_chain_file [*use_certificate_chain_file]]]
+ [Use a certificate chain from a file. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.get_option [*get_option]]]
- [Get an option from the socket. ]
+ [[link boost_asio.reference.ssl__basic_context.use_certificate_file [*use_certificate_file]]]
+ [Use a certificate from a file. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
+ [[link boost_asio.reference.ssl__basic_context.use_private_key_file [*use_private_key_file]]]
+ [Use a private key from a file. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.io_service [*io_service]]]
- [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ [[link boost_asio.reference.ssl__basic_context.use_rsa_private_key_file [*use_rsa_private_key_file]]]
+ [Use an RSA private key from a file. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.is_open [*is_open]]]
- [Determine whether the socket is open. ]
+ [[link boost_asio.reference.ssl__basic_context.use_tmp_dh_file [*use_tmp_dh_file]]]
+ [Use the specified file to obtain the temporary Diffie-Hellman parameters. ]
   ]
   
   [
- [[link boost_asio.reference.basic_stream_socket.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the socket. ]
+ [[link boost_asio.reference.ssl__basic_context._basic_context [*~basic_context]]]
+ [Destructor. ]
   ]
   
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
   [
- [[link boost_asio.reference.basic_stream_socket.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer. ]
+ [[link boost_asio.reference.ssl__basic_context.default_workarounds [*default_workarounds]]]
+ [Implement various bug workarounds. ]
   ]
-
+
   [
- [[link boost_asio.reference.basic_stream_socket.native [*native]]]
- [Get the native socket representation. ]
+ [[link boost_asio.reference.ssl__basic_context.no_sslv2 [*no_sslv2]]]
+ [Disable SSL v2. ]
   ]
-
+
   [
- [[link boost_asio.reference.basic_stream_socket.open [*open]]]
- [Open the socket using the specified protocol. ]
+ [[link boost_asio.reference.ssl__basic_context.no_sslv3 [*no_sslv3]]]
+ [Disable SSL v3. ]
   ]
-
+
   [
- [[link boost_asio.reference.basic_stream_socket.read_some [*read_some]]]
- [Read some data from the socket. ]
+ [[link boost_asio.reference.ssl__basic_context.no_tlsv1 [*no_tlsv1]]]
+ [Disable TLS v1. ]
   ]
-
+
   [
- [[link boost_asio.reference.basic_stream_socket.receive [*receive]]]
- [Receive some data on the socket. ]
+ [[link boost_asio.reference.ssl__basic_context.single_dh_use [*single_dh_use]]]
+ [Always create a new key when using tmp_dh parameters. ]
   ]
-
+
   [
- [[link boost_asio.reference.basic_stream_socket.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint of the socket. ]
+ [[link boost_asio.reference.ssl__basic_context.verify_client_once [*verify_client_once]]]
+ [Do not request client certificate on renegotiation. Ignored unless verify_peer is set. ]
   ]
-
+
   [
- [[link boost_asio.reference.basic_stream_socket.send [*send]]]
- [Send some data on the socket. ]
+ [[link boost_asio.reference.ssl__basic_context.verify_fail_if_no_peer_cert [*verify_fail_if_no_peer_cert]]]
+ [Fail verification if the peer has no certificate. Ignored unless verify_peer is set. ]
   ]
-
+
   [
- [[link boost_asio.reference.basic_stream_socket.set_option [*set_option]]]
- [Set an option on the socket. ]
+ [[link boost_asio.reference.ssl__basic_context.verify_none [*verify_none]]]
+ [No verification. ]
   ]
-
+
   [
- [[link boost_asio.reference.basic_stream_socket.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
+ [[link boost_asio.reference.ssl__basic_context.verify_peer [*verify_peer]]]
+ [Verify the peer. ]
   ]
+
+]
+
+[section:add_verify_path ssl::basic_context::add_verify_path]
+
+Add a directory containing certificate authority files to be used for performing verification.
+
+ void ``[link boost_asio.reference.ssl__basic_context.add_verify_path.overload1 add_verify_path]``(
+ const std::string & path);
+
+ boost::system::error_code ``[link boost_asio.reference.ssl__basic_context.add_verify_path.overload2 add_verify_path]``(
+ const std::string & path,
+ boost::system::error_code & ec);
+
+
+[section:overload1 ssl::basic_context::add_verify_path (1 of 2 overloads)]
+
+Add a directory containing certificate authority files to be used for performing verification.
+
+ void add_verify_path(
+ const std::string & path);
+
+
+This function is used to specify the name of a directory containing certification authority certificates. Each file in the directory must contain a single certificate. The files must be named using the subject name's hash and an extension of ".0".
+
+
+[heading Parameters]
+
+
+[variablelist
   
- [
- [[link boost_asio.reference.basic_stream_socket.write_some [*write_some]]]
- [Write some data to the socket. ]
- ]
+[[path][The name of a directory containing the certificates.]]
+
+]
+
+[heading Exceptions]
+
+
+[variablelist
   
+[[boost::system::system_error][Thrown on failure. ]]
+
 ]
 
-[heading Data Members]
-[table
- [[Name][Description]]
 
- [
- [[link boost_asio.reference.basic_stream_socket.max_connections [*max_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
 
- [
- [[link boost_asio.reference.basic_stream_socket.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
+[endsect]
 
- [
- [[link boost_asio.reference.basic_stream_socket.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
 
- [
- [[link boost_asio.reference.basic_stream_socket.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
 
-]
+[section:overload2 ssl::basic_context::add_verify_path (2 of 2 overloads)]
 
-The basic_stream_socket class template provides asynchronous and blocking stream-oriented socket functionality.
+Add a directory containing certificate authority files to be used for performing verification.
+
+ boost::system::error_code add_verify_path(
+ const std::string & path,
+ boost::system::error_code & ec);
 
 
-[heading Thread Safety]
+This function is used to specify the name of a directory containing certification authority certificates. Each file in the directory must contain a single certificate. The files must be named using the subject name's hash and an extension of ".0".
+
+
+[heading Parameters]
+
+
+[variablelist
   
-[*Distinct] [*objects:] Safe.
+[[path][The name of a directory containing the certificates.]]
 
-[*Shared] [*objects:] Unsafe.
+[[ec][Set to indicate what error occurred, if any. ]]
 
+]
 
 
 
 [endsect]
 
 
+[endsect]
+
 
-[section:type ip::tcp::type]
+[section:basic_context ssl::basic_context::basic_context]
 
-Obtain an identifier for the type of the protocol.
+Constructor.
 
- int type() const;
+ basic_context(
+ boost::asio::io_service & io_service,
+ method m);
 
 
 
@@ -30227,11 +50999,14 @@
 
 
 
-[section:v4 ip::tcp::v4]
+[section:default_workarounds ssl::basic_context::default_workarounds]
 
-Construct to represent the IPv4 TCP protocol.
 
- static tcp v4();
+['Inherited from ssl::context_base.]
+
+Implement various bug workarounds.
+
+ static const int default_workarounds = implementation_defined;
 
 
 
@@ -30239,11 +51014,29 @@
 
 
 
-[section:v6 ip::tcp::v6]
+[section:file_format ssl::basic_context::file_format]
 
-Construct to represent the IPv6 TCP protocol.
 
- static tcp v6();
+['Inherited from ssl::context_base.]
+
+File format types.
+
+ enum file_format
+
+[heading Values]
+[variablelist
+
+ [
+ [asn1]
+ [ASN.1 file. ]
+ ]
+
+ [
+ [pem]
+ [PEM file. ]
+ ]
+
+]
 
 
 
@@ -30251,250 +51044,213 @@
 
 
 
+[section:impl ssl::basic_context::impl]
+
+Get the underlying implementation in the native type.
+
+ impl_type impl();
+
+
+This function may be used to obtain the underlying implementation of the context. This is intended to allow access to context functionality that is not otherwise provided.
+
+
 [endsect]
 
-[section:ip__udp ip::udp]
 
-Encapsulates the flags needed for UDP.
 
- class udp
+[section:impl_type ssl::basic_context::impl_type]
 
+The native implementation type of the locking dispatcher.
 
-[heading Types]
-[table
- [[Name][Description]]
+ typedef service_type::impl_type impl_type;
 
- [
 
- [[link boost_asio.reference.ip__udp.endpoint [*endpoint]]]
- [The type of a UDP endpoint. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.ip__udp.resolver [*resolver]]]
- [The UDP resolver type. ]
-
- ]
+[endsect]
 
- [
 
- [[link boost_asio.reference.ip__udp.resolver_iterator [*resolver_iterator]]]
- [The type of a resolver iterator. ]
-
- ]
+[section:load_verify_file ssl::basic_context::load_verify_file]
 
- [
+Load a certification authority file for performing verification.
 
- [[link boost_asio.reference.ip__udp.resolver_query [*resolver_query]]]
- [The type of a resolver query. ]
-
- ]
+ void ``[link boost_asio.reference.ssl__basic_context.load_verify_file.overload1 load_verify_file]``(
+ const std::string & filename);
 
- [
+ boost::system::error_code ``[link boost_asio.reference.ssl__basic_context.load_verify_file.overload2 load_verify_file]``(
+ const std::string & filename,
+ boost::system::error_code & ec);
 
- [[link boost_asio.reference.ip__udp.socket [*socket]]]
- [The UDP socket type. ]
-
- ]
 
-]
+[section:overload1 ssl::basic_context::load_verify_file (1 of 2 overloads)]
 
-[heading Member Functions]
-[table
- [[Name][Description]]
+Load a certification authority file for performing verification.
 
- [
- [[link boost_asio.reference.ip__udp.family [*family]]]
- [Obtain an identifier for the protocol family. ]
- ]
-
- [
- [[link boost_asio.reference.ip__udp.protocol [*protocol]]]
- [Obtain an identifier for the protocol. ]
- ]
-
- [
- [[link boost_asio.reference.ip__udp.type [*type]]]
- [Obtain an identifier for the type of the protocol. ]
- ]
-
- [
- [[link boost_asio.reference.ip__udp.v4 [*v4]]]
- [Construct to represent the IPv4 UDP protocol. ]
- ]
-
- [
- [[link boost_asio.reference.ip__udp.v6 [*v6]]]
- [Construct to represent the IPv6 UDP protocol. ]
- ]
+ void load_verify_file(
+ const std::string & filename);
+
+
+This function is used to load one or more trusted certification authorities from a file.
+
+
+[heading Parameters]
+
+
+[variablelist
   
+[[filename][The name of a file containing certification authority certificates in PEM format.]]
+
 ]
 
-[heading Friends]
-[table
- [[Name][Description]]
+[heading Exceptions]
+
 
- [
- [[link boost_asio.reference.ip__udp.operator_not__eq_ [*operator!=]]]
- [Compare two protocols for inequality. ]
- ]
-
- [
- [[link boost_asio.reference.ip__udp.operator_eq__eq_ [*operator==]]]
- [Compare two protocols for equality. ]
- ]
+[variablelist
   
+[[boost::system::system_error][Thrown on failure. ]]
+
 ]
 
-The
-[link boost_asio.reference.ip__udp ip::udp] class contains flags necessary for UDP sockets.
 
 
-[heading Thread Safety]
-
-[*Distinct] [*objects:] Safe.
+[endsect]
 
-[*Shared] [*objects:] Safe.
 
 
+[section:overload2 ssl::basic_context::load_verify_file (2 of 2 overloads)]
 
-[section:endpoint ip::udp::endpoint]
+Load a certification authority file for performing verification.
 
-The type of a UDP endpoint.
+ boost::system::error_code load_verify_file(
+ const std::string & filename,
+ boost::system::error_code & ec);
 
- typedef basic_endpoint< udp > endpoint;
 
+This function is used to load the certificates for one or more trusted certification authorities from a file.
 
-[heading Types]
-[table
- [[Name][Description]]
 
- [
+[heading Parameters]
+
 
- [[link boost_asio.reference.ip__basic_endpoint.data_type [*data_type]]]
- [The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. ]
+[variablelist
   
- ]
-
- [
+[[filename][The name of a file containing certification authority certificates in PEM format.]]
 
- [[link boost_asio.reference.ip__basic_endpoint.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint. ]
-
- ]
+[[ec][Set to indicate what error occurred, if any. ]]
 
 ]
 
-[heading Member Functions]
-[table
- [[Name][Description]]
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:method ssl::basic_context::method]
+
+
+['Inherited from ssl::context_base.]
+
+Different methods supported by a context.
+
+ enum method
+
+[heading Values]
+[variablelist
 
   [
- [[link boost_asio.reference.ip__basic_endpoint.address [*address]]]
- [Get the IP address associated with the endpoint. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_endpoint.basic_endpoint [*basic_endpoint]]]
- [Default constructor. ]
+ [sslv2]
+ [Generic SSL version 2. ]
   ]
-
+
   [
- [[link boost_asio.reference.ip__basic_endpoint.capacity [*capacity]]]
- [Get the capacity of the endpoint in the native type. ]
+ [sslv2_client]
+ [SSL version 2 client. ]
   ]
-
+
   [
- [[link boost_asio.reference.ip__basic_endpoint.data [*data]]]
- [Get the underlying endpoint in the native type. ]
+ [sslv2_server]
+ [SSL version 2 server. ]
   ]
-
+
   [
- [[link boost_asio.reference.ip__basic_endpoint.operator_eq_ [*operator=]]]
- [Assign from another endpoint. ]
+ [sslv3]
+ [Generic SSL version 3. ]
   ]
-
+
   [
- [[link boost_asio.reference.ip__basic_endpoint.port [*port]]]
- [Get the port associated with the endpoint. The port number is always in the host's byte order. ]
+ [sslv3_client]
+ [SSL version 3 client. ]
   ]
-
+
   [
- [[link boost_asio.reference.ip__basic_endpoint.protocol [*protocol]]]
- [The protocol associated with the endpoint. ]
+ [sslv3_server]
+ [SSL version 3 server. ]
   ]
-
+
   [
- [[link boost_asio.reference.ip__basic_endpoint.resize [*resize]]]
- [Set the underlying size of the endpoint in the native type. ]
+ [tlsv1]
+ [Generic TLS version 1. ]
   ]
-
+
   [
- [[link boost_asio.reference.ip__basic_endpoint.size [*size]]]
- [Get the underlying size of the endpoint in the native type. ]
+ [tlsv1_client]
+ [TLS version 1 client. ]
   ]
-
-]
 
-[heading Friends]
-[table
- [[Name][Description]]
+ [
+ [tlsv1_server]
+ [TLS version 1 server. ]
+ ]
 
   [
- [[link boost_asio.reference.ip__basic_endpoint.operator_not__eq_ [*operator!=]]]
- [Compare two endpoints for inequality. ]
+ [sslv23]
+ [Generic SSL/TLS. ]
   ]
-
+
   [
- [[link boost_asio.reference.ip__basic_endpoint.operator_lt_ [*operator<]]]
- [Compare endpoints for ordering. ]
+ [sslv23_client]
+ [SSL/TLS client. ]
   ]
-
+
   [
- [[link boost_asio.reference.ip__basic_endpoint.operator_eq__eq_ [*operator==]]]
- [Compare two endpoints for equality. ]
+ [sslv23_server]
+ [SSL/TLS server. ]
   ]
-
-]
 
-The
-[link boost_asio.reference.ip__basic_endpoint ip::basic_endpoint] class template describes an endpoint that may be associated with a particular socket.
+]
 
 
-[heading Thread Safety]
-
-[*Distinct] [*objects:] Safe.
 
-[*Shared] [*objects:] Unsafe.
+[endsect]
 
 
 
+[section:no_sslv2 ssl::basic_context::no_sslv2]
 
-[endsect]
 
+['Inherited from ssl::context_base.]
 
+Disable SSL v2.
 
-[section:family ip::udp::family]
+ static const int no_sslv2 = implementation_defined;
 
-Obtain an identifier for the protocol family.
 
- int family() const;
 
+[endsect]
 
 
-[endsect]
 
+[section:no_sslv3 ssl::basic_context::no_sslv3]
 
 
-[section:operator_not__eq_ ip::udp::operator!=]
+['Inherited from ssl::context_base.]
 
-Compare two protocols for inequality.
+Disable SSL v3.
 
- friend bool operator!=(
- const udp & p1,
- const udp & p2);
+ static const int no_sslv3 = implementation_defined;
 
 
 
@@ -30502,13 +51258,14 @@
 
 
 
-[section:operator_eq__eq_ ip::udp::operator==]
+[section:no_tlsv1 ssl::basic_context::no_tlsv1]
 
-Compare two protocols for equality.
 
- friend bool operator==(
- const udp & p1,
- const udp & p2);
+['Inherited from ssl::context_base.]
+
+Disable TLS v1.
+
+ static const int no_tlsv1 = implementation_defined;
 
 
 
@@ -30516,11 +51273,15 @@
 
 
 
-[section:protocol ip::udp::protocol]
+[section:options ssl::basic_context::options]
 
-Obtain an identifier for the protocol.
 
- int protocol() const;
+['Inherited from ssl::context_base.]
+
+Bitmask type for SSL options.
+
+ typedef int options;
+
 
 
 
@@ -30528,622 +51289,440 @@
 
 
 
-[section:resolver ip::udp::resolver]
+[section:password_purpose ssl::basic_context::password_purpose]
 
-The UDP resolver type.
 
- typedef basic_resolver< udp > resolver;
+['Inherited from ssl::context_base.]
 
+Purpose of PEM password.
 
-[heading Types]
-[table
- [[Name][Description]]
+ enum password_purpose
 
- [
+[heading Values]
+[variablelist
 
- [[link boost_asio.reference.ip__basic_resolver.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
+ [
+ [for_reading]
+ [The password is needed for reading/decryption. ]
   ]
 
   [
-
- [[link boost_asio.reference.ip__basic_resolver.implementation_type [*implementation_type]]]
- [The underlying implementation type of I/O object. ]
-
+ [for_writing]
+ [The password is needed for writing/encryption. ]
   ]
 
- [
+]
 
- [[link boost_asio.reference.ip__basic_resolver.iterator [*iterator]]]
- [The iterator type. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.ip__basic_resolver.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
+[endsect]
 
- [
 
- [[link boost_asio.reference.ip__basic_resolver.query [*query]]]
- [The query type. ]
-
- ]
 
- [
+[section:service_type ssl::basic_context::service_type]
 
- [[link boost_asio.reference.ip__basic_resolver.service_type [*service_type]]]
- [The type of the service that will be used to provide I/O operations. ]
-
- ]
+The type of the service that will be used to provide context operations.
 
-]
+ typedef Service service_type;
 
-[heading Member Functions]
-[table
- [[Name][Description]]
 
- [
- [[link boost_asio.reference.ip__basic_resolver.async_resolve [*async_resolve]]]
- [Asynchronously resolve a query to a list of entries. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver.basic_resolver [*basic_resolver]]]
- [Constructor. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver.cancel [*cancel]]]
- [Cancel any asynchronous operations that are waiting on the resolver. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver.get_io_service [*get_io_service]]]
- [Get the io_service associated with the object. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver.io_service [*io_service]]]
- [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver.resolve [*resolve]]]
- [Resolve a query to a list of entries. ]
- ]
-
-]
 
-The basic_resolver class template provides the ability to resolve a query to a list of endpoints.
 
+[endsect]
 
-[heading Thread Safety]
-
-[*Distinct] [*objects:] Safe.
 
-[*Shared] [*objects:] Unsafe.
+[section:set_options ssl::basic_context::set_options]
 
+Set options on the context.
 
+ void ``[link boost_asio.reference.ssl__basic_context.set_options.overload1 set_options]``(
+ options o);
 
+ boost::system::error_code ``[link boost_asio.reference.ssl__basic_context.set_options.overload2 set_options]``(
+ options o,
+ boost::system::error_code & ec);
 
-[endsect]
 
+[section:overload1 ssl::basic_context::set_options (1 of 2 overloads)]
 
+Set options on the context.
 
-[section:resolver_iterator ip::udp::resolver_iterator]
+ void set_options(
+ options o);
 
-The type of a resolver iterator.
 
- typedef basic_resolver_iterator< udp > resolver_iterator;
+This function may be used to configure the SSL options used by the context.
 
 
-[heading Member Functions]
-[table
- [[Name][Description]]
+[heading Parameters]
+
 
- [
- [[link boost_asio.reference.ip__basic_resolver_iterator.basic_resolver_iterator [*basic_resolver_iterator]]]
- [Default constructor creates an end iterator. ]
- ]
+[variablelist
   
- [
- [[link boost_asio.reference.ip__basic_resolver_iterator.create [*create]]]
- [Create an iterator from an addrinfo list returned by getaddrinfo. ]
- ]
+[[o][A bitmask of options. The available option values are defined in the context\_base class. The options are bitwise-ored with any existing value for the options.]]
+
+]
+
+[heading Exceptions]
+
+
+[variablelist
   
+[[boost::system::system_error][Thrown on failure. ]]
+
 ]
 
-The
-[link boost_asio.reference.ip__basic_resolver_iterator ip::basic_resolver_iterator] class template is used to define iterators over the results returned by a resolver.
 
-The iterator's value\_type, obtained when the iterator is dereferenced, is:
 
- const basic_resolver_entry<InternetProtocol>
+[endsect]
 
 
 
+[section:overload2 ssl::basic_context::set_options (2 of 2 overloads)]
 
+Set options on the context.
 
-[heading Thread Safety]
+ boost::system::error_code set_options(
+ options o,
+ boost::system::error_code & ec);
+
+
+This function may be used to configure the SSL options used by the context.
+
+
+[heading Parameters]
+
+
+[variablelist
   
-[*Distinct] [*objects:] Safe.
+[[o][A bitmask of options. The available option values are defined in the context\_base class. The options are bitwise-ored with any existing value for the options.]]
 
-[*Shared] [*objects:] Unsafe.
+[[ec][Set to indicate what error occurred, if any. ]]
 
+]
 
 
 
 [endsect]
 
 
+[endsect]
 
-[section:resolver_query ip::udp::resolver_query]
+[section:set_password_callback ssl::basic_context::set_password_callback]
 
-The type of a resolver query.
+Set the password callback.
 
- typedef basic_resolver_query< udp > resolver_query;
+ template<
+ typename PasswordCallback>
+ void ``[link boost_asio.reference.ssl__basic_context.set_password_callback.overload1 set_password_callback]``(
+ PasswordCallback callback);
 
+ template<
+ typename PasswordCallback>
+ boost::system::error_code ``[link boost_asio.reference.ssl__basic_context.set_password_callback.overload2 set_password_callback]``(
+ PasswordCallback callback,
+ boost::system::error_code & ec);
 
-[heading Types]
-[table
- [[Name][Description]]
 
- [
+[section:overload1 ssl::basic_context::set_password_callback (1 of 2 overloads)]
 
- [[link boost_asio.reference.ip__basic_resolver_query.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint query. ]
+Set the password callback.
+
+ template<
+ typename PasswordCallback>
+ void set_password_callback(
+ PasswordCallback callback);
+
+
+This function is used to specify a callback function to obtain password information about an encrypted key in PEM format.
+
+
+[heading Parameters]
+
+
+[variablelist
   
- ]
+[[callback][The function object to be used for obtaining the password. The function signature of the handler must be:
+``
+ std::string password_callback(
+ std::size_t max_length, // The maximum size for a password.
+ password_purpose purpose // Whether password is for reading or writing.
+ );
+
+``
+The return value of the callback is a string containing the password.]]
 
 ]
 
-[heading Member Functions]
-[table
- [[Name][Description]]
+[heading Exceptions]
+
 
- [
- [[link boost_asio.reference.ip__basic_resolver_query.basic_resolver_query [*basic_resolver_query]]]
- [Construct with specified service name for any protocol. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver_query.hints [*hints]]]
- [Get the hints associated with the query. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver_query.host_name [*host_name]]]
- [Get the host name associated with the query. ]
- ]
-
- [
- [[link boost_asio.reference.ip__basic_resolver_query.service_name [*service_name]]]
- [Get the service name associated with the query. ]
- ]
+[variablelist
   
+[[boost::system::system_error][Thrown on failure. ]]
+
 ]
 
-[heading Data Members]
-[table
- [[Name][Description]]
 
- [
- [[link boost_asio.reference.ip__basic_resolver_query.address_configured [*address_configured]]]
- [Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system. ]
- ]
 
- [
- [[link boost_asio.reference.ip__basic_resolver_query.all_matching [*all_matching]]]
- [If used with v4_mapped, return all matching IPv6 and IPv4 addresses. ]
- ]
+[endsect]
 
- [
- [[link boost_asio.reference.ip__basic_resolver_query.canonical_name [*canonical_name]]]
- [Determine the canonical name of the host specified in the query. ]
- ]
 
- [
- [[link boost_asio.reference.ip__basic_resolver_query.numeric_host [*numeric_host]]]
- [Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. ]
- ]
 
- [
- [[link boost_asio.reference.ip__basic_resolver_query.numeric_service [*numeric_service]]]
- [Service name should be treated as a numeric string defining a port number and no name resolution should be attempted. ]
- ]
+[section:overload2 ssl::basic_context::set_password_callback (2 of 2 overloads)]
 
- [
- [[link boost_asio.reference.ip__basic_resolver_query.passive [*passive]]]
- [Indicate that returned endpoint is intended for use as a locally bound socket endpoint. ]
- ]
+Set the password callback.
 
- [
- [[link boost_asio.reference.ip__basic_resolver_query.v4_mapped [*v4_mapped]]]
- [If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. ]
- ]
+ template<
+ typename PasswordCallback>
+ boost::system::error_code set_password_callback(
+ PasswordCallback callback,
+ boost::system::error_code & ec);
 
-]
 
-The
-[link boost_asio.reference.ip__basic_resolver_query ip::basic_resolver_query] class template describes a query that can be passed to a resolver.
+This function is used to specify a callback function to obtain password information about an encrypted key in PEM format.
 
 
-[heading Thread Safety]
+[heading Parameters]
+
+
+[variablelist
   
-[*Distinct] [*objects:] Safe.
+[[callback][The function object to be used for obtaining the password. The function signature of the handler must be:
+``
+ std::string password_callback(
+ std::size_t max_length, // The maximum size for a password.
+ password_purpose purpose // Whether password is for reading or writing.
+ );
 
-[*Shared] [*objects:] Unsafe.
+``
+The return value of the callback is a string containing the password.]]
 
+[[ec][Set to indicate what error occurred, if any. ]]
+
+]
 
 
 
 [endsect]
 
 
+[endsect]
 
-[section:socket ip::udp::socket]
+[section:set_verify_mode ssl::basic_context::set_verify_mode]
 
-The UDP socket type.
+Set the peer verification mode.
 
- typedef basic_datagram_socket< udp > socket;
+ void ``[link boost_asio.reference.ssl__basic_context.set_verify_mode.overload1 set_verify_mode]``(
+ verify_mode v);
 
+ boost::system::error_code ``[link boost_asio.reference.ssl__basic_context.set_verify_mode.overload2 set_verify_mode]``(
+ verify_mode v,
+ boost::system::error_code & ec);
 
-[heading Types]
-[table
- [[Name][Description]]
 
- [
+[section:overload1 ssl::basic_context::set_verify_mode (1 of 2 overloads)]
 
- [[link boost_asio.reference.basic_datagram_socket.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
+Set the peer verification mode.
 
- [
+ void set_verify_mode(
+ verify_mode v);
 
- [[link boost_asio.reference.basic_datagram_socket.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
 
- [
+This function may be used to configure the peer verification mode used by the context.
 
- [[link boost_asio.reference.basic_datagram_socket.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
 
- [
+[heading Parameters]
+
 
- [[link boost_asio.reference.basic_datagram_socket.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
+[variablelist
   
- ]
+[[v][A bitmask of peer verification modes. The available verify\_mode values are defined in the context\_base class.]]
 
- [
+]
 
- [[link boost_asio.reference.basic_datagram_socket.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
+[heading Exceptions]
+
+
+[variablelist
   
- ]
+[[boost::system::system_error][Thrown on failure. ]]
 
- [
+]
 
- [[link boost_asio.reference.basic_datagram_socket.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.basic_datagram_socket.implementation_type [*implementation_type]]]
- [The underlying implementation type of I/O object. ]
-
- ]
+[endsect]
 
- [
 
- [[link boost_asio.reference.basic_datagram_socket.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
 
- [
+[section:overload2 ssl::basic_context::set_verify_mode (2 of 2 overloads)]
 
- [[link boost_asio.reference.basic_datagram_socket.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
+Set the peer verification mode.
 
- [
+ boost::system::error_code set_verify_mode(
+ verify_mode v,
+ boost::system::error_code & ec);
 
- [[link boost_asio.reference.basic_datagram_socket.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
-
- ]
 
- [
+This function may be used to configure the peer verification mode used by the context.
 
- [[link boost_asio.reference.basic_datagram_socket.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
+
+[heading Parameters]
+
+
+[variablelist
   
- ]
+[[v][A bitmask of peer verification modes. The available verify\_mode values are defined in the context\_base class.]]
+
+[[ec][Set to indicate what error occurred, if any. ]]
+
+]
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:single_dh_use ssl::basic_context::single_dh_use]
+
+
+['Inherited from ssl::context_base.]
+
+Always create a new key when using tmp_dh parameters.
+
+ static const int single_dh_use = implementation_defined;
+
+
+
+[endsect]
+
+
+[section:use_certificate_chain_file ssl::basic_context::use_certificate_chain_file]
+
+Use a certificate chain from a file.
+
+ void ``[link boost_asio.reference.ssl__basic_context.use_certificate_chain_file.overload1 use_certificate_chain_file]``(
+ const std::string & filename);
+
+ boost::system::error_code ``[link boost_asio.reference.ssl__basic_context.use_certificate_chain_file.overload2 use_certificate_chain_file]``(
+ const std::string & filename,
+ boost::system::error_code & ec);
+
+
+[section:overload1 ssl::basic_context::use_certificate_chain_file (1 of 2 overloads)]
+
+Use a certificate chain from a file.
+
+ void use_certificate_chain_file(
+ const std::string & filename);
+
 
- [
+This function is used to load a certificate chain into the context from a file.
 
- [[link boost_asio.reference.basic_datagram_socket.native_type [*native_type]]]
- [The native representation of a socket. ]
-
- ]
 
- [
+[heading Parameters]
+
 
- [[link boost_asio.reference.basic_datagram_socket.non_blocking_io [*non_blocking_io]]]
- [IO control command to set the blocking mode of the socket. ]
+[variablelist
   
- ]
+[[filename][The name of the file containing the certificate. The file must use the PEM format.]]
 
- [
+]
 
- [[link boost_asio.reference.basic_datagram_socket.protocol_type [*protocol_type]]]
- [The protocol type. ]
+[heading Exceptions]
+
+
+[variablelist
   
- ]
+[[boost::system::system_error][Thrown on failure. ]]
 
- [
+]
 
- [[link boost_asio.reference.basic_datagram_socket.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.basic_datagram_socket.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
+[endsect]
 
- [
 
- [[link boost_asio.reference.basic_datagram_socket.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
 
- [
+[section:overload2 ssl::basic_context::use_certificate_chain_file (2 of 2 overloads)]
 
- [[link boost_asio.reference.basic_datagram_socket.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
+Use a certificate chain from a file.
 
- [
+ boost::system::error_code use_certificate_chain_file(
+ const std::string & filename,
+ boost::system::error_code & ec);
 
- [[link boost_asio.reference.basic_datagram_socket.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
 
- [
+This function is used to load a certificate chain into the context from a file.
 
- [[link boost_asio.reference.basic_datagram_socket.service_type [*service_type]]]
- [The type of the service that will be used to provide I/O operations. ]
-
- ]
 
- [
+[heading Parameters]
+
 
- [[link boost_asio.reference.basic_datagram_socket.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
+[variablelist
   
- ]
+[[filename][The name of the file containing the certificate. The file must use the PEM format.]]
+
+[[ec][Set to indicate what error occurred, if any. ]]
 
 ]
 
-[heading Member Functions]
-[table
- [[Name][Description]]
 
- [
- [[link boost_asio.reference.basic_datagram_socket.assign [*assign]]]
- [Assign an existing native socket to the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.async_receive [*async_receive]]]
- [Start an asynchronous receive on a connected socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.async_receive_from [*async_receive_from]]]
- [Start an asynchronous receive. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.async_send [*async_send]]]
- [Start an asynchronous send on a connected socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.async_send_to [*async_send_to]]]
- [Start an asynchronous send. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.available [*available]]]
- [Determine the number of bytes available for reading. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.basic_datagram_socket [*basic_datagram_socket]]]
- [Construct a basic_datagram_socket without opening it. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.bind [*bind]]]
- [Bind the socket to the given local endpoint. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.close [*close]]]
- [Close the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.connect [*connect]]]
- [Connect the socket to the specified endpoint. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.get_io_service [*get_io_service]]]
- [Get the io_service associated with the object. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.get_option [*get_option]]]
- [Get an option from the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.io_service [*io_service]]]
- [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.is_open [*is_open]]]
- [Determine whether the socket is open. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.native [*native]]]
- [Get the native socket representation. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.open [*open]]]
- [Open the socket using the specified protocol. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.receive [*receive]]]
- [Receive some data on a connected socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.receive_from [*receive_from]]]
- [Receive a datagram with the endpoint of the sender. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint of the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.send [*send]]]
- [Send some data on a connected socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.send_to [*send_to]]]
- [Send a datagram to the specified endpoint. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.set_option [*set_option]]]
- [Set an option on the socket. ]
- ]
-
- [
- [[link boost_asio.reference.basic_datagram_socket.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
- ]
-
-]
 
-[heading Data Members]
-[table
- [[Name][Description]]
+[endsect]
 
- [
- [[link boost_asio.reference.basic_datagram_socket.max_connections [*max_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
 
- [
- [[link boost_asio.reference.basic_datagram_socket.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
+[endsect]
 
- [
- [[link boost_asio.reference.basic_datagram_socket.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
+[section:use_certificate_file ssl::basic_context::use_certificate_file]
 
- [
- [[link boost_asio.reference.basic_datagram_socket.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
+Use a certificate from a file.
 
-]
+ void ``[link boost_asio.reference.ssl__basic_context.use_certificate_file.overload1 use_certificate_file]``(
+ const std::string & filename,
+ file_format format);
 
-The basic_datagram_socket class template provides asynchronous and blocking datagram-oriented socket functionality.
+ boost::system::error_code ``[link boost_asio.reference.ssl__basic_context.use_certificate_file.overload2 use_certificate_file]``(
+ const std::string & filename,
+ file_format format,
+ boost::system::error_code & ec);
 
 
-[heading Thread Safety]
-
-[*Distinct] [*objects:] Safe.
+[section:overload1 ssl::basic_context::use_certificate_file (1 of 2 overloads)]
 
-[*Shared] [*objects:] Unsafe.
+Use a certificate from a file.
 
+ void use_certificate_file(
+ const std::string & filename,
+ file_format format);
 
 
+This function is used to load a certificate into the context from a file.
 
-[endsect]
 
+[heading Parameters]
+
 
+[variablelist
+
+[[filename][The name of the file containing the certificate.]]
 
-[section:type ip::udp::type]
+[[format][The file format (ASN.1 or PEM).]]
 
-Obtain an identifier for the type of the protocol.
+]
 
- int type() const;
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
+
+]
 
 
 
@@ -31151,66 +51730,84 @@
 
 
 
-[section:v4 ip::udp::v4]
+[section:overload2 ssl::basic_context::use_certificate_file (2 of 2 overloads)]
 
-Construct to represent the IPv4 UDP protocol.
+Use a certificate from a file.
 
- static udp v4();
+ boost::system::error_code use_certificate_file(
+ const std::string & filename,
+ file_format format,
+ boost::system::error_code & ec);
 
 
+This function is used to load a certificate into the context from a file.
 
-[endsect]
 
+[heading Parameters]
+
 
+[variablelist
+
+[[filename][The name of the file containing the certificate.]]
 
-[section:v6 ip::udp::v6]
+[[format][The file format (ASN.1 or PEM).]]
 
-Construct to represent the IPv6 UDP protocol.
+[[ec][Set to indicate what error occurred, if any. ]]
 
- static udp v6();
+]
 
 
 
 [endsect]
 
 
-
 [endsect]
 
+[section:use_private_key_file ssl::basic_context::use_private_key_file]
 
-[section:ip__unicast__hops ip::unicast::hops]
+Use a private key from a file.
 
-Socket option for time-to-live associated with outgoing unicast packets.
+ void ``[link boost_asio.reference.ssl__basic_context.use_private_key_file.overload1 use_private_key_file]``(
+ const std::string & filename,
+ file_format format);
 
- typedef implementation_defined hops;
+ boost::system::error_code ``[link boost_asio.reference.ssl__basic_context.use_private_key_file.overload2 use_private_key_file]``(
+ const std::string & filename,
+ file_format format,
+ boost::system::error_code & ec);
 
 
+[section:overload1 ssl::basic_context::use_private_key_file (1 of 2 overloads)]
 
-Implements the IPPROTO\_IP/IP\_UNICAST\_TTL socket option.
+Use a private key from a file.
 
+ void use_private_key_file(
+ const std::string & filename,
+ file_format format);
 
-[heading Examples]
-
-Setting the option:
 
- boost::asio::ip::udp::socket socket(io_service);
- ...
- boost::asio::ip::unicast::hops option(4);
- socket.set_option(option);
+This function is used to load a private key into the context from a file.
 
 
+[heading Parameters]
+
 
+[variablelist
+
+[[filename][The name of the file containing the private key.]]
 
-Getting the current option value:
+[[format][The file format (ASN.1 or PEM).]]
 
- boost::asio::ip::udp::socket socket(io_service);
- ...
- boost::asio::ip::unicast::hops option;
- socket.get_option(option);
- int ttl = option.value();
+]
 
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
 
+]
 
 
 
@@ -31218,273 +51815,241 @@
 
 
 
-[section:ip__v6_only ip::v6_only]
+[section:overload2 ssl::basic_context::use_private_key_file (2 of 2 overloads)]
 
-Socket option for determining whether an IPv6 socket supports IPv6 communication only.
+Use a private key from a file.
 
- typedef implementation_defined v6_only;
+ boost::system::error_code use_private_key_file(
+ const std::string & filename,
+ file_format format,
+ boost::system::error_code & ec);
 
 
+This function is used to load a private key into the context from a file.
 
-Implements the IPPROTO\_IPV6/IP\_V6ONLY socket option.
 
+[heading Parameters]
+
 
-[heading Examples]
+[variablelist
   
-Setting the option:
-
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::ip::v6_only option(true);
- socket.set_option(option);
+[[filename][The name of the file containing the private key.]]
 
+[[format][The file format (ASN.1 or PEM).]]
 
+[[ec][Set to indicate what error occurred, if any. ]]
 
+]
 
-Getting the current option value:
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::ip::v6_only option;
- socket.get_option(option);
- bool v6_only = option.value();
 
+[endsect]
 
 
+[endsect]
 
+[section:use_rsa_private_key_file ssl::basic_context::use_rsa_private_key_file]
 
+Use an RSA private key from a file.
 
-[endsect]
+ void ``[link boost_asio.reference.ssl__basic_context.use_rsa_private_key_file.overload1 use_rsa_private_key_file]``(
+ const std::string & filename,
+ file_format format);
 
+ boost::system::error_code ``[link boost_asio.reference.ssl__basic_context.use_rsa_private_key_file.overload2 use_rsa_private_key_file]``(
+ const std::string & filename,
+ file_format format,
+ boost::system::error_code & ec);
 
-[section:is_read_buffered is_read_buffered]
 
-The is_read_buffered class is a traits class that may be used to determine whether a stream type supports buffering of read data.
+[section:overload1 ssl::basic_context::use_rsa_private_key_file (1 of 2 overloads)]
 
- template<
- typename Stream>
- class is_read_buffered
+Use an RSA private key from a file.
 
+ void use_rsa_private_key_file(
+ const std::string & filename,
+ file_format format);
 
-[heading Data Members]
-[table
- [[Name][Description]]
 
- [
- [[link boost_asio.reference.is_read_buffered.value [*value]]]
- [The value member is true only if the Stream type supports buffering of read data. ]
- ]
+This function is used to load an RSA private key into the context from a file.
 
-]
 
+[heading Parameters]
+
 
-[section:value is_read_buffered::value]
+[variablelist
+
+[[filename][The name of the file containing the RSA private key.]]
 
-The value member is true only if the Stream type supports buffering of read data.
+[[format][The file format (ASN.1 or PEM).]]
 
- static const bool value;
+]
 
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
 
-[endsect]
+]
 
 
 
 [endsect]
 
-[section:is_write_buffered is_write_buffered]
-
-The is_write_buffered class is a traits class that may be used to determine whether a stream type supports buffering of written data.
 
- template<
- typename Stream>
- class is_write_buffered
 
+[section:overload2 ssl::basic_context::use_rsa_private_key_file (2 of 2 overloads)]
 
-[heading Data Members]
-[table
- [[Name][Description]]
+Use an RSA private key from a file.
 
- [
- [[link boost_asio.reference.is_write_buffered.value [*value]]]
- [The value member is true only if the Stream type supports buffering of written data. ]
- ]
+ boost::system::error_code use_rsa_private_key_file(
+ const std::string & filename,
+ file_format format,
+ boost::system::error_code & ec);
 
-]
 
+This function is used to load an RSA private key into the context from a file.
 
-[section:value is_write_buffered::value]
 
-The value member is true only if the Stream type supports buffering of written data.
+[heading Parameters]
+
 
- static const bool value;
+[variablelist
+
+[[filename][The name of the file containing the RSA private key.]]
 
+[[format][The file format (ASN.1 or PEM).]]
 
+[[ec][Set to indicate what error occurred, if any. ]]
 
-[endsect]
+]
 
 
 
 [endsect]
 
-[section:mutable_buffer mutable_buffer]
 
-Holds a buffer that can be modified.
+[endsect]
 
- class mutable_buffer
+[section:use_tmp_dh_file ssl::basic_context::use_tmp_dh_file]
 
+Use the specified file to obtain the temporary Diffie-Hellman parameters.
 
-[heading Member Functions]
-[table
- [[Name][Description]]
+ void ``[link boost_asio.reference.ssl__basic_context.use_tmp_dh_file.overload1 use_tmp_dh_file]``(
+ const std::string & filename);
 
- [
- [[link boost_asio.reference.mutable_buffer.mutable_buffer [*mutable_buffer]]]
- [Construct an empty buffer. ]
- ]
-
-]
+ boost::system::error_code ``[link boost_asio.reference.ssl__basic_context.use_tmp_dh_file.overload2 use_tmp_dh_file]``(
+ const std::string & filename,
+ boost::system::error_code & ec);
 
-[heading Friends]
-[table
- [[Name][Description]]
 
- [
- [[link boost_asio.reference.mutable_buffer.buffer_cast_helper [*buffer_cast_helper]]]
- []
- ]
-
- [
- [[link boost_asio.reference.mutable_buffer.buffer_size_helper [*buffer_size_helper]]]
- []
- ]
-
-]
+[section:overload1 ssl::basic_context::use_tmp_dh_file (1 of 2 overloads)]
 
-The mutable_buffer class provides a safe representation of a buffer that can be modified. It does not own the underlying data, and so is cheap to copy or assign.
+Use the specified file to obtain the temporary Diffie-Hellman parameters.
+
+ void use_tmp_dh_file(
+ const std::string & filename);
 
 
-[section:buffer_cast_helper mutable_buffer::buffer_cast_helper]
+This function is used to load Diffie-Hellman parameters into the context from a file.
 
 
+[heading Parameters]
+
 
- friend void * buffer_cast_helper(
- const mutable_buffer & b);
+[variablelist
+
+[[filename][The name of the file containing the Diffie-Hellman parameters. The file must use the PEM format.]]
 
+]
 
+[heading Exceptions]
+
 
-[endsect]
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
 
+]
 
 
-[section:buffer_size_helper mutable_buffer::buffer_size_helper]
 
+[endsect]
 
 
- friend std::size_t buffer_size_helper(
- const mutable_buffer & b);
 
+[section:overload2 ssl::basic_context::use_tmp_dh_file (2 of 2 overloads)]
 
+Use the specified file to obtain the temporary Diffie-Hellman parameters.
 
-[endsect]
+ boost::system::error_code use_tmp_dh_file(
+ const std::string & filename,
+ boost::system::error_code & ec);
 
 
-[section:mutable_buffer mutable_buffer::mutable_buffer]
+This function is used to load Diffie-Hellman parameters into the context from a file.
 
-Construct an empty buffer.
 
- ``[link boost_asio.reference.mutable_buffer.mutable_buffer.overload1 mutable_buffer]``();
+[heading Parameters]
+
 
- ``[link boost_asio.reference.mutable_buffer.mutable_buffer.overload2 mutable_buffer]``(
- void * data,
- std::size_t size);
+[variablelist
+
+[[filename][The name of the file containing the Diffie-Hellman parameters. The file must use the PEM format.]]
 
+[[ec][Set to indicate what error occurred, if any. ]]
 
-[section:overload1 mutable_buffer::mutable_buffer (1 of 2 overloads)]
+]
 
-Construct an empty buffer.
 
- mutable_buffer();
 
+[endsect]
 
 
 [endsect]
 
 
+[section:verify_client_once ssl::basic_context::verify_client_once]
 
-[section:overload2 mutable_buffer::mutable_buffer (2 of 2 overloads)]
-
-Construct a buffer to represent a given memory range.
 
- mutable_buffer(
- void * data,
- std::size_t size);
+['Inherited from ssl::context_base.]
 
+Do not request client certificate on renegotiation. Ignored unless verify_peer is set.
 
+ static const int verify_client_once = implementation_defined;
 
-[endsect]
 
 
 [endsect]
 
 
-[endsect]
 
-[section:mutable_buffers_1 mutable_buffers_1]
+[section:verify_fail_if_no_peer_cert ssl::basic_context::verify_fail_if_no_peer_cert]
 
-Adapts a single modifiable buffer so that it meets the requirements of the MutableBufferSequence concept.
 
- class mutable_buffers_1 :
- public mutable_buffer
+['Inherited from ssl::context_base.]
 
+Fail verification if the peer has no certificate. Ignored unless verify_peer is set.
 
-[heading Types]
-[table
- [[Name][Description]]
+ static const int verify_fail_if_no_peer_cert = implementation_defined;
 
- [
 
- [[link boost_asio.reference.mutable_buffers_1.const_iterator [*const_iterator]]]
- [A random-access iterator type that may be used to read elements. ]
-
- ]
 
- [
+[endsect]
 
- [[link boost_asio.reference.mutable_buffers_1.value_type [*value_type]]]
- [The type for each element in the list of buffers. ]
-
- ]
 
-]
 
-[heading Member Functions]
-[table
- [[Name][Description]]
+[section:verify_mode ssl::basic_context::verify_mode]
 
- [
- [[link boost_asio.reference.mutable_buffers_1.begin [*begin]]]
- [Get a random-access iterator to the first element. ]
- ]
-
- [
- [[link boost_asio.reference.mutable_buffers_1.end [*end]]]
- [Get a random-access iterator for one past the last element. ]
- ]
-
- [
- [[link boost_asio.reference.mutable_buffers_1.mutable_buffers_1 [*mutable_buffers_1]]]
- [Construct to represent a single modifiable buffer. ]
- ]
-
-]
 
+['Inherited from ssl::context_base.]
 
-[section:begin mutable_buffers_1::begin]
+Bitmask type for peer verification.
 
-Get a random-access iterator to the first element.
+ typedef int verify_mode;
 
- const_iterator begin() const;
 
 
 
@@ -31492,12 +52057,14 @@
 
 
 
-[section:const_iterator mutable_buffers_1::const_iterator]
+[section:verify_none ssl::basic_context::verify_none]
 
-A random-access iterator type that may be used to read elements.
 
- typedef const mutable_buffer * const_iterator;
+['Inherited from ssl::context_base.]
+
+No verification.
 
+ static const int verify_none = implementation_defined;
 
 
 
@@ -31505,11 +52072,14 @@
 
 
 
-[section:end mutable_buffers_1::end]
+[section:verify_peer ssl::basic_context::verify_peer]
 
-Get a random-access iterator for one past the last element.
 
- const_iterator end() const;
+['Inherited from ssl::context_base.]
+
+Verify the peer.
+
+ static const int verify_peer = implementation_defined;
 
 
 
@@ -31517,12 +52087,11 @@
 
 
 
-[section:mutable_buffers_1 mutable_buffers_1::mutable_buffers_1]
+[section:_basic_context ssl::basic_context::~basic_context]
 
-Construct to represent a single modifiable buffer.
+Destructor.
 
- mutable_buffers_1(
- const mutable_buffer & b);
+ ~basic_context();
 
 
 
@@ -31530,350 +52099,442 @@
 
 
 
-[section:value_type mutable_buffers_1::value_type]
+[endsect]
 
-The type for each element in the list of buffers.
 
- typedef mutable_buffer value_type;
+[section:ssl__context ssl::context]
 
+Typedef for the typical usage of context.
 
-[heading Member Functions]
-[table
- [[Name][Description]]
+ typedef basic_context< context_service > context;
 
- [
- [[link boost_asio.reference.mutable_buffer.mutable_buffer [*mutable_buffer]]]
- [Construct an empty buffer. ]
- ]
-
-]
 
-[heading Friends]
+[heading Types]
 [table
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.mutable_buffer.buffer_cast_helper [*buffer_cast_helper]]]
- []
- ]
+
+ [[link boost_asio.reference.ssl__basic_context.file_format [*file_format]]]
+ [File format types. ]
   
- [
- [[link boost_asio.reference.mutable_buffer.buffer_size_helper [*buffer_size_helper]]]
- []
   ]
-
-]
-
-The mutable_buffer class provides a safe representation of a buffer that can be modified. It does not own the underlying data, and so is cheap to copy or assign.
 
+ [
 
+ [[link boost_asio.reference.ssl__basic_context.impl_type [*impl_type]]]
+ [The native implementation type of the locking dispatcher. ]
+
+ ]
 
-[endsect]
+ [
 
+ [[link boost_asio.reference.ssl__basic_context.method [*method]]]
+ [Different methods supported by a context. ]
+
+ ]
 
+ [
 
-[endsect]
+ [[link boost_asio.reference.ssl__basic_context.options [*options]]]
+ [Bitmask type for SSL options. ]
+
+ ]
 
+ [
 
-[section:placeholders__bytes_transferred placeholders::bytes_transferred]
+ [[link boost_asio.reference.ssl__basic_context.password_purpose [*password_purpose]]]
+ [Purpose of PEM password. ]
+
+ ]
 
-An argument placeholder, for use with boost::bind(), that corresponds to the bytes_transferred argument of a handler for asynchronous functions such as boost::asio::basic_stream_socket::async_write_some or boost::asio::async_write.
+ [
 
- unspecified bytes_transferred;
+ [[link boost_asio.reference.ssl__basic_context.service_type [*service_type]]]
+ [The type of the service that will be used to provide context operations. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.ssl__basic_context.verify_mode [*verify_mode]]]
+ [Bitmask type for peer verification. ]
+
+ ]
 
-[endsect]
+]
 
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.ssl__basic_context.add_verify_path [*add_verify_path]]]
+ [Add a directory containing certificate authority files to be used for performing verification. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__basic_context.basic_context [*basic_context]]]
+ [Constructor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__basic_context.impl [*impl]]]
+ [Get the underlying implementation in the native type. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__basic_context.load_verify_file [*load_verify_file]]]
+ [Load a certification authority file for performing verification. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__basic_context.set_options [*set_options]]]
+ [Set options on the context. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__basic_context.set_password_callback [*set_password_callback]]]
+ [Set the password callback. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__basic_context.set_verify_mode [*set_verify_mode]]]
+ [Set the peer verification mode. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__basic_context.use_certificate_chain_file [*use_certificate_chain_file]]]
+ [Use a certificate chain from a file. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__basic_context.use_certificate_file [*use_certificate_file]]]
+ [Use a certificate from a file. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__basic_context.use_private_key_file [*use_private_key_file]]]
+ [Use a private key from a file. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__basic_context.use_rsa_private_key_file [*use_rsa_private_key_file]]]
+ [Use an RSA private key from a file. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__basic_context.use_tmp_dh_file [*use_tmp_dh_file]]]
+ [Use the specified file to obtain the temporary Diffie-Hellman parameters. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__basic_context._basic_context [*~basic_context]]]
+ [Destructor. ]
+ ]
+
+]
 
-[section:placeholders__error placeholders::error]
+[heading Data Members]
+[table
+ [[Name][Description]]
 
-An argument placeholder, for use with boost::bind(), that corresponds to the error argument of a handler for any of the asynchronous functions.
+ [
+ [[link boost_asio.reference.ssl__basic_context.default_workarounds [*default_workarounds]]]
+ [Implement various bug workarounds. ]
+ ]
 
- unspecified error;
+ [
+ [[link boost_asio.reference.ssl__basic_context.no_sslv2 [*no_sslv2]]]
+ [Disable SSL v2. ]
+ ]
 
+ [
+ [[link boost_asio.reference.ssl__basic_context.no_sslv3 [*no_sslv3]]]
+ [Disable SSL v3. ]
+ ]
 
+ [
+ [[link boost_asio.reference.ssl__basic_context.no_tlsv1 [*no_tlsv1]]]
+ [Disable TLS v1. ]
+ ]
 
-[endsect]
+ [
+ [[link boost_asio.reference.ssl__basic_context.single_dh_use [*single_dh_use]]]
+ [Always create a new key when using tmp_dh parameters. ]
+ ]
 
+ [
+ [[link boost_asio.reference.ssl__basic_context.verify_client_once [*verify_client_once]]]
+ [Do not request client certificate on renegotiation. Ignored unless verify_peer is set. ]
+ ]
 
+ [
+ [[link boost_asio.reference.ssl__basic_context.verify_fail_if_no_peer_cert [*verify_fail_if_no_peer_cert]]]
+ [Fail verification if the peer has no certificate. Ignored unless verify_peer is set. ]
+ ]
 
-[section:placeholders__iterator placeholders::iterator]
+ [
+ [[link boost_asio.reference.ssl__basic_context.verify_none [*verify_none]]]
+ [No verification. ]
+ ]
 
-An argument placeholder, for use with boost::bind(), that corresponds to the iterator argument of a handler for asynchronous functions such as boost::asio::basic_resolver::resolve.
+ [
+ [[link boost_asio.reference.ssl__basic_context.verify_peer [*verify_peer]]]
+ [Verify the peer. ]
+ ]
 
- unspecified iterator;
+]
 
 
 
 [endsect]
 
 
-[section:read read]
-
-Attempt to read a certain amount of data from a stream before returning.
-
- template<
- typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link boost_asio.reference.read.overload1 read]``(
- SyncReadStream & s,
- const MutableBufferSequence & buffers);
-
- template<
- typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename CompletionCondition>
- std::size_t ``[link boost_asio.reference.read.overload2 read]``(
- SyncReadStream & s,
- const MutableBufferSequence & buffers,
- CompletionCondition completion_condition);
-
- template<
- typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename CompletionCondition>
- std::size_t ``[link boost_asio.reference.read.overload3 read]``(
- SyncReadStream & s,
- const MutableBufferSequence & buffers,
- CompletionCondition completion_condition,
- boost::system::error_code & ec);
-
- template<
- typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t ``[link boost_asio.reference.read.overload4 read]``(
- SyncReadStream & s,
- basic_streambuf< Allocator > & b);
-
- template<
- typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator,
- typename CompletionCondition>
- std::size_t ``[link boost_asio.reference.read.overload5 read]``(
- SyncReadStream & s,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition);
+[section:ssl__context_base ssl::context_base]
 
- template<
- typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator,
- typename CompletionCondition>
- std::size_t ``[link boost_asio.reference.read.overload6 read]``(
- SyncReadStream & s,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition,
- boost::system::error_code & ec);
+The context_base class is used as a base for the basic_context class template so that we have a common place to define various enums.
 
+ class context_base
 
-[section:overload1 read (1 of 6 overloads)]
 
-Attempt to read a certain amount of data from a stream before returning.
+[heading Types]
+[table
+ [[Name][Description]]
 
- template<
- typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read(
- SyncReadStream & s,
- const MutableBufferSequence & buffers);
+ [
 
+ [[link boost_asio.reference.ssl__context_base.file_format [*file_format]]]
+ [File format types. ]
+
+ ]
 
-This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
+ [
 
+ [[link boost_asio.reference.ssl__context_base.method [*method]]]
+ [Different methods supported by a context. ]
+
+ ]
 
-* The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
+ [
 
-* An error occurred.
+ [[link boost_asio.reference.ssl__context_base.options [*options]]]
+ [Bitmask type for SSL options. ]
+
+ ]
 
-This operation is implemented in terms of one or more calls to the stream's read\_some function.
+ [
 
+ [[link boost_asio.reference.ssl__context_base.password_purpose [*password_purpose]]]
+ [Purpose of PEM password. ]
+
+ ]
 
-[heading Parameters]
-
+ [
 
-[variablelist
+ [[link boost_asio.reference.ssl__context_base.verify_mode [*verify_mode]]]
+ [Bitmask type for peer verification. ]
   
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[buffers][One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the stream.]]
+ ]
 
 ]
 
-[heading Return Value]
-
-The number of bytes transferred.
-
-[heading Exceptions]
-
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
 
-[variablelist
+ [
+ [[link boost_asio.reference.ssl__context_base._context_base [*~context_base]]]
+ [Protected destructor to prevent deletion through this type. ]
+ ]
   
-[[boost::system::system_error][Thrown on failure.]]
-
 ]
 
-[heading Example]
-
-To read into a single data buffer use the
-[link boost_asio.reference.buffer buffer] function as follows:
+[heading Data Members]
+[table
+ [[Name][Description]]
 
- boost::asio::read(s, boost::asio::buffer(data, size));
+ [
+ [[link boost_asio.reference.ssl__context_base.default_workarounds [*default_workarounds]]]
+ [Implement various bug workarounds. ]
+ ]
 
+ [
+ [[link boost_asio.reference.ssl__context_base.no_sslv2 [*no_sslv2]]]
+ [Disable SSL v2. ]
+ ]
 
-See the
-[link boost_asio.reference.buffer buffer] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+ [
+ [[link boost_asio.reference.ssl__context_base.no_sslv3 [*no_sslv3]]]
+ [Disable SSL v3. ]
+ ]
 
-[heading Remarks]
-
-This overload is equivalent to calling:
+ [
+ [[link boost_asio.reference.ssl__context_base.no_tlsv1 [*no_tlsv1]]]
+ [Disable TLS v1. ]
+ ]
 
- boost::asio::read(
- s, buffers,
- boost::asio::transfer_all());
+ [
+ [[link boost_asio.reference.ssl__context_base.single_dh_use [*single_dh_use]]]
+ [Always create a new key when using tmp_dh parameters. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__context_base.verify_client_once [*verify_client_once]]]
+ [Do not request client certificate on renegotiation. Ignored unless verify_peer is set. ]
+ ]
 
+ [
+ [[link boost_asio.reference.ssl__context_base.verify_fail_if_no_peer_cert [*verify_fail_if_no_peer_cert]]]
+ [Fail verification if the peer has no certificate. Ignored unless verify_peer is set. ]
+ ]
 
+ [
+ [[link boost_asio.reference.ssl__context_base.verify_none [*verify_none]]]
+ [No verification. ]
+ ]
 
+ [
+ [[link boost_asio.reference.ssl__context_base.verify_peer [*verify_peer]]]
+ [Verify the peer. ]
+ ]
 
+]
 
 
-[endsect]
+[section:default_workarounds ssl::context_base::default_workarounds]
 
+Implement various bug workarounds.
 
+ static const int default_workarounds = implementation_defined;
 
-[section:overload2 read (2 of 6 overloads)]
 
-Attempt to read a certain amount of data from a stream before returning.
 
- template<
- typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename CompletionCondition>
- std::size_t read(
- SyncReadStream & s,
- const MutableBufferSequence & buffers,
- CompletionCondition completion_condition);
+[endsect]
 
 
-This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
 
+[section:file_format ssl::context_base::file_format]
 
-* The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
+File format types.
 
-* The completion_condition function object returns true.
+ enum file_format
 
-This operation is implemented in terms of one or more calls to the stream's read\_some function.
+[heading Values]
+[variablelist
 
+ [
+ [asn1]
+ [ASN.1 file. ]
+ ]
 
-[heading Parameters]
-
+ [
+ [pem]
+ [PEM file. ]
+ ]
 
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
+]
 
-[[buffers][One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the stream.]]
 
-[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
-``
- bool completion_condition(
- const boost::system::error_code& error, // Result of latest read_some
- // operation.
 
- std::size_t bytes_transferred // Number of bytes transferred
- // so far.
- );
+[endsect]
 
-``
-A return value of true indicates that the read operation is complete. False indicates that further calls to the stream's read\_some function are required.]]
 
-]
 
-[heading Return Value]
-
-The number of bytes transferred.
+[section:method ssl::context_base::method]
 
-[heading Exceptions]
-
+Different methods supported by a context.
+
+ enum method
 
+[heading Values]
 [variablelist
-
-[[boost::system::system_error][Thrown on failure.]]
 
-]
+ [
+ [sslv2]
+ [Generic SSL version 2. ]
+ ]
 
-[heading Example]
-
-To read into a single data buffer use the
-[link boost_asio.reference.buffer buffer] function as follows:
+ [
+ [sslv2_client]
+ [SSL version 2 client. ]
+ ]
 
- boost::asio::read(s, boost::asio::buffer(data, size),
- boost::asio::transfer_at_least(32));
+ [
+ [sslv2_server]
+ [SSL version 2 server. ]
+ ]
 
+ [
+ [sslv3]
+ [Generic SSL version 3. ]
+ ]
 
-See the
-[link boost_asio.reference.buffer buffer] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+ [
+ [sslv3_client]
+ [SSL version 3 client. ]
+ ]
 
+ [
+ [sslv3_server]
+ [SSL version 3 server. ]
+ ]
 
+ [
+ [tlsv1]
+ [Generic TLS version 1. ]
+ ]
 
-[endsect]
+ [
+ [tlsv1_client]
+ [TLS version 1 client. ]
+ ]
 
+ [
+ [tlsv1_server]
+ [TLS version 1 server. ]
+ ]
 
+ [
+ [sslv23]
+ [Generic SSL/TLS. ]
+ ]
 
-[section:overload3 read (3 of 6 overloads)]
+ [
+ [sslv23_client]
+ [SSL/TLS client. ]
+ ]
 
-Attempt to read a certain amount of data from a stream before returning.
+ [
+ [sslv23_server]
+ [SSL/TLS server. ]
+ ]
 
- template<
- typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename CompletionCondition>
- std::size_t read(
- SyncReadStream & s,
- const MutableBufferSequence & buffers,
- CompletionCondition completion_condition,
- boost::system::error_code & ec);
+]
 
 
-This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
 
+[endsect]
 
-* The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
 
-* The completion_condition function object returns true.
 
-This operation is implemented in terms of one or more calls to the stream's read\_some function.
+[section:no_sslv2 ssl::context_base::no_sslv2]
 
+Disable SSL v2.
 
-[heading Parameters]
-
+ static const int no_sslv2 = implementation_defined;
 
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
 
-[[buffers][One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the stream.]]
 
-[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
-``
- bool completion_condition(
- const boost::system::error_code& error, // Result of latest read_some
- // operation.
+[endsect]
 
- std::size_t bytes_transferred // Number of bytes transferred
- // so far.
- );
 
-``
-A return value of true indicates that the read operation is complete. False indicates that further calls to the stream's read\_some function are required.]]
 
-[[ec][Set to indicate what error occurred, if any.]]
+[section:no_sslv3 ssl::context_base::no_sslv3]
 
-]
+Disable SSL v3.
 
-[heading Return Value]
-
-The number of bytes read. If an error occurs, returns the total number of bytes successfully transferred prior to the error.
+ static const int no_sslv3 = implementation_defined;
 
 
 
@@ -31881,125 +52542,87 @@
 
 
 
-[section:overload4 read (4 of 6 overloads)]
+[section:no_tlsv1 ssl::context_base::no_tlsv1]
 
-Attempt to read a certain amount of data from a stream before returning.
+Disable TLS v1.
 
- template<
- typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t read(
- SyncReadStream & s,
- basic_streambuf< Allocator > & b);
+ static const int no_tlsv1 = implementation_defined;
 
 
-This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
 
+[endsect]
 
-* An error occurred.
 
-This operation is implemented in terms of one or more calls to the stream's read\_some function.
 
+[section:options ssl::context_base::options]
 
-[heading Parameters]
-
+Bitmask type for SSL options.
 
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
+ typedef int options;
 
-[[b][The basic\_streambuf object into which the data will be read.]]
 
-]
 
-[heading Return Value]
-
-The number of bytes transferred.
 
-[heading Exceptions]
-
+[endsect]
 
-[variablelist
-
-[[boost::system::system_error][Thrown on failure.]]
 
-]
 
-[heading Remarks]
-
-This overload is equivalent to calling:
+[section:password_purpose ssl::context_base::password_purpose]
 
- boost::asio::read(
- s, b,
- boost::asio::transfer_all());
+Purpose of PEM password.
 
+ enum password_purpose
 
+[heading Values]
+[variablelist
 
+ [
+ [for_reading]
+ [The password is needed for reading/decryption. ]
+ ]
 
+ [
+ [for_writing]
+ [The password is needed for writing/encryption. ]
+ ]
 
+]
 
-[endsect]
 
 
+[endsect]
 
-[section:overload5 read (5 of 6 overloads)]
 
-Attempt to read a certain amount of data from a stream before returning.
 
- template<
- typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator,
- typename CompletionCondition>
- std::size_t read(
- SyncReadStream & s,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition);
+[section:single_dh_use ssl::context_base::single_dh_use]
 
+Always create a new key when using tmp_dh parameters.
 
-This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
+ static const int single_dh_use = implementation_defined;
 
 
-* The completion_condition function object returns true.
 
-This operation is implemented in terms of one or more calls to the stream's read\_some function.
+[endsect]
 
 
-[heading Parameters]
-
 
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
+[section:verify_client_once ssl::context_base::verify_client_once]
 
-[[b][The basic\_streambuf object into which the data will be read.]]
+Do not request client certificate on renegotiation. Ignored unless verify_peer is set.
 
-[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
-``
- bool completion_condition(
- const boost::system::error_code& error, // Result of latest read_some
- // operation.
+ static const int verify_client_once = implementation_defined;
 
- std::size_t bytes_transferred // Number of bytes transferred
- // so far.
- );
 
-``
-A return value of true indicates that the read operation is complete. False indicates that further calls to the stream's read\_some function are required.]]
 
-]
+[endsect]
 
-[heading Return Value]
-
-The number of bytes transferred.
 
-[heading Exceptions]
-
 
-[variablelist
-
-[[boost::system::system_error][Thrown on failure. ]]
+[section:verify_fail_if_no_peer_cert ssl::context_base::verify_fail_if_no_peer_cert]
 
-]
+Fail verification if the peer has no certificate. Ignored unless verify_peer is set.
+
+ static const int verify_fail_if_no_peer_cert = implementation_defined;
 
 
 
@@ -32007,183 +52630,202 @@
 
 
 
-[section:overload6 read (6 of 6 overloads)]
+[section:verify_mode ssl::context_base::verify_mode]
 
-Attempt to read a certain amount of data from a stream before returning.
+Bitmask type for peer verification.
 
- template<
- typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator,
- typename CompletionCondition>
- std::size_t read(
- SyncReadStream & s,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition,
- boost::system::error_code & ec);
+ typedef int verify_mode;
 
 
-This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
 
 
-* The completion_condition function object returns true.
+[endsect]
 
-This operation is implemented in terms of one or more calls to the stream's read\_some function.
 
 
-[heading Parameters]
-
+[section:verify_none ssl::context_base::verify_none]
 
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
+No verification.
 
-[[b][The basic\_streambuf object into which the data will be read.]]
+ static const int verify_none = implementation_defined;
 
-[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
-``
- bool completion_condition(
- const boost::system::error_code& error, // Result of latest read_some
- // operation.
 
- std::size_t bytes_transferred // Number of bytes transferred
- // so far.
- );
 
-``
-A return value of true indicates that the read operation is complete. False indicates that further calls to the stream's read\_some function are required.]]
+[endsect]
 
-[[ec][Set to indicate what error occurred, if any.]]
 
-]
 
-[heading Return Value]
-
-The number of bytes read. If an error occurs, returns the total number of bytes successfully transferred prior to the error.
+[section:verify_peer ssl::context_base::verify_peer]
 
+Verify the peer.
 
+ static const int verify_peer = implementation_defined;
 
-[endsect]
 
 
 [endsect]
 
-[section:read_until read_until]
 
-Read data into a streambuf until a delimiter is encountered.
 
- template<
- typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t ``[link boost_asio.reference.read_until.overload1 read_until]``(
- SyncReadStream & s,
- boost::asio::basic_streambuf< Allocator > & b,
- char delim);
+[section:_context_base ssl::context_base::~context_base]
 
- template<
- typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t ``[link boost_asio.reference.read_until.overload2 read_until]``(
- SyncReadStream & s,
- boost::asio::basic_streambuf< Allocator > & b,
- char delim,
- boost::system::error_code & ec);
+Protected destructor to prevent deletion through this type.
 
- template<
- typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t ``[link boost_asio.reference.read_until.overload3 read_until]``(
- SyncReadStream & s,
- boost::asio::basic_streambuf< Allocator > & b,
- const std::string & delim);
+ ~context_base();
 
- template<
- typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t ``[link boost_asio.reference.read_until.overload4 read_until]``(
- SyncReadStream & s,
- boost::asio::basic_streambuf< Allocator > & b,
- const std::string & delim,
- boost::system::error_code & ec);
 
- template<
- typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t ``[link boost_asio.reference.read_until.overload5 read_until]``(
- SyncReadStream & s,
- boost::asio::basic_streambuf< Allocator > & b,
- const boost::regex & expr);
 
- template<
- typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t ``[link boost_asio.reference.read_until.overload6 read_until]``(
- SyncReadStream & s,
- boost::asio::basic_streambuf< Allocator > & b,
- const boost::regex & expr,
- boost::system::error_code & ec);
+[endsect]
 
 
-[section:overload1 read_until (1 of 6 overloads)]
 
-Read data into a streambuf until a delimiter is encountered.
+[endsect]
 
- template<
- typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t read_until(
- SyncReadStream & s,
- boost::asio::basic_streambuf< Allocator > & b,
- char delim);
+[section:ssl__context_service ssl::context_service]
 
+Default service implementation for a context.
 
-This function is used to read data into the specified streambuf until the streambuf's get area contains the specified delimiter. The call will block until one of the following conditions is true:
+ class context_service :
+ public io_service::service
 
 
-* The get area of the streambuf contains the specified delimiter.
+[heading Types]
+[table
+ [[Name][Description]]
 
-* An error occurred.
+ [
 
-This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the streambuf's get area already contains the delimiter, the function returns immediately.
+ [[link boost_asio.reference.ssl__context_service.impl_type [*impl_type]]]
+ [The type of the context. ]
+
+ ]
 
+]
 
-[heading Parameters]
-
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
-[variablelist
+ [
+ [[link boost_asio.reference.ssl__context_service.add_verify_path [*add_verify_path]]]
+ [Add a directory containing certification authority files to be used for performing verification. ]
+ ]
   
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
+ [
+ [[link boost_asio.reference.ssl__context_service.context_service [*context_service]]]
+ [Constructor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__context_service.create [*create]]]
+ [Create a new context implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__context_service.destroy [*destroy]]]
+ [Destroy a context implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__context_service.get_io_service [*get_io_service]]]
+ [Get the io_service object that owns the service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__context_service.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service object that owns the service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__context_service.load_verify_file [*load_verify_file]]]
+ [Load a certification authority file for performing verification. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__context_service.null [*null]]]
+ [Return a null context implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__context_service.set_options [*set_options]]]
+ [Set options on the context. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__context_service.set_password_callback [*set_password_callback]]]
+ [Set the password callback. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__context_service.set_verify_mode [*set_verify_mode]]]
+ [Set peer verification mode. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__context_service.shutdown_service [*shutdown_service]]]
+ [Destroy all user-defined handler objects owned by the service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__context_service.use_certificate_chain_file [*use_certificate_chain_file]]]
+ [Use a certificate chain from a file. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__context_service.use_certificate_file [*use_certificate_file]]]
+ [Use a certificate from a file. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__context_service.use_private_key_file [*use_private_key_file]]]
+ [Use a private key from a file. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__context_service.use_rsa_private_key_file [*use_rsa_private_key_file]]]
+ [Use an RSA private key from a file. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__context_service.use_tmp_dh_file [*use_tmp_dh_file]]]
+ [Use the specified file to obtain the temporary Diffie-Hellman parameters. ]
+ ]
+
+]
 
-[[b][A streambuf object into which the data will be read.]]
+[heading Data Members]
+[table
+ [[Name][Description]]
 
-[[delim][The delimiter character.]]
+ [
+ [[link boost_asio.reference.ssl__context_service.id [*id]]]
+ [The unique service identifier. ]
+ ]
 
 ]
 
-[heading Return Value]
-
-The number of bytes in the streambuf's get area up to and including the delimiter.
 
-[heading Exceptions]
-
+[section:add_verify_path ssl::context_service::add_verify_path]
 
-[variablelist
-
-[[boost::system::system_error][Thrown on failure.]]
+Add a directory containing certification authority files to be used for performing verification.
 
-]
+ boost::system::error_code add_verify_path(
+ impl_type & impl,
+ const std::string & path,
+ boost::system::error_code & ec);
 
-[heading Example]
-
-To read data into a streambuf until a newline is encountered:
 
- boost::asio::streambuf b;
- boost::asio::read_until(s, b, '\n');
- std::istream is(&b);
- std::string line;
- std::getline(is, line);
 
+[endsect]
+
+
+
+[section:context_service ssl::context_service::context_service]
 
+Constructor.
 
+ context_service(
+ boost::asio::io_service & io_service);
 
 
 
@@ -32191,116 +52833,81 @@
 
 
 
-[section:overload2 read_until (2 of 6 overloads)]
+[section:create ssl::context_service::create]
 
-Read data into a streambuf until a delimiter is encountered.
+Create a new context implementation.
 
- template<
- typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t read_until(
- SyncReadStream & s,
- boost::asio::basic_streambuf< Allocator > & b,
- char delim,
- boost::system::error_code & ec);
+ void create(
+ impl_type & impl,
+ context_base::method m);
 
 
-This function is used to read data into the specified streambuf until the streambuf's get area contains the specified delimiter. The call will block until one of the following conditions is true:
+
+[endsect]
 
 
-* The get area of the streambuf contains the specified delimiter.
 
-* An error occurred.
+[section:destroy ssl::context_service::destroy]
 
-This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the streambuf's get area already contains the delimiter, the function returns immediately.
+Destroy a context implementation.
+
+ void destroy(
+ impl_type & impl);
 
 
-[heading Parameters]
-
 
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
+[endsect]
 
-[[b][A streambuf object into which the data will be read.]]
 
-[[delim][The delimiter character.]]
 
-[[ec][Set to indicate what error occurred, if any.]]
+[section:get_io_service ssl::context_service::get_io_service]
 
-]
 
-[heading Return Value]
-
-The number of bytes in the streambuf's get area up to and including the delimiter. Returns 0 if an error occurred.
+['Inherited from io_service.]
 
+Get the io_service object that owns the service.
 
+ boost::asio::io_service & get_io_service();
 
-[endsect]
 
 
+[endsect]
 
-[section:overload3 read_until (3 of 6 overloads)]
 
-Read data into a streambuf until a delimiter is encountered.
 
- template<
- typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t read_until(
- SyncReadStream & s,
- boost::asio::basic_streambuf< Allocator > & b,
- const std::string & delim);
+[section:id ssl::context_service::id]
 
+The unique service identifier.
 
-This function is used to read data into the specified streambuf until the streambuf's get area contains the specified delimiter. The call will block until one of the following conditions is true:
+ static boost::asio::io_service::id id;
 
 
-* The get area of the streambuf contains the specified delimiter.
 
-* An error occurred.
+[endsect]
 
-This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the streambuf's get area already contains the delimiter, the function returns immediately.
 
 
-[heading Parameters]
-
+[section:impl_type ssl::context_service::impl_type]
 
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
+The type of the context.
 
-[[b][A streambuf object into which the data will be read.]]
+ typedef implementation_defined impl_type;
 
-[[delim][The delimiter string.]]
 
-]
 
-[heading Return Value]
-
-The number of bytes in the streambuf's get area up to and including the delimiter.
 
-[heading Exceptions]
-
+[endsect]
 
-[variablelist
-
-[[boost::system::system_error][Thrown on failure.]]
 
-]
 
-[heading Example]
-
-To read data into a streambuf until a newline is encountered:
+[section:io_service ssl::context_service::io_service]
 
- boost::asio::streambuf b;
- boost::asio::read_until(s, b, "\r\n");
- std::istream is(&b);
- std::string line;
- std::getline(is, line);
 
+['Inherited from io_service.]
 
+(Deprecated: use get_io_service().) Get the io_service object that owns the service.
 
+ boost::asio::io_service & io_service();
 
 
 
@@ -32308,116 +52915,85 @@
 
 
 
-[section:overload4 read_until (4 of 6 overloads)]
+[section:load_verify_file ssl::context_service::load_verify_file]
 
-Read data into a streambuf until a delimiter is encountered.
+Load a certification authority file for performing verification.
 
- template<
- typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t read_until(
- SyncReadStream & s,
- boost::asio::basic_streambuf< Allocator > & b,
- const std::string & delim,
+ boost::system::error_code load_verify_file(
+ impl_type & impl,
+ const std::string & filename,
       boost::system::error_code & ec);
 
 
-This function is used to read data into the specified streambuf until the streambuf's get area contains the specified delimiter. The call will block until one of the following conditions is true:
-
-
-* The get area of the streambuf contains the specified delimiter.
-
-* An error occurred.
 
-This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the streambuf's get area already contains the delimiter, the function returns immediately.
+[endsect]
 
 
-[heading Parameters]
-
 
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
+[section:null ssl::context_service::null]
 
-[[b][A streambuf object into which the data will be read.]]
+Return a null context implementation.
 
-[[delim][The delimiter string.]]
+ impl_type null() const;
 
-[[ec][Set to indicate what error occurred, if any.]]
 
-]
 
-[heading Return Value]
-
-The number of bytes in the streambuf's get area up to and including the delimiter. Returns 0 if an error occurred.
+[endsect]
 
 
 
-[endsect]
+[section:set_options ssl::context_service::set_options]
 
+Set options on the context.
 
+ boost::system::error_code set_options(
+ impl_type & impl,
+ context_base::options o,
+ boost::system::error_code & ec);
 
-[section:overload5 read_until (5 of 6 overloads)]
 
-Read data into a streambuf until a regular expression is located.
 
- template<
- typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t read_until(
- SyncReadStream & s,
- boost::asio::basic_streambuf< Allocator > & b,
- const boost::regex & expr);
+[endsect]
 
 
-This function is used to read data into the specified streambuf until the streambuf's get area contains some data that matches a regular expression. The call will block until one of the following conditions is true:
 
+[section:set_password_callback ssl::context_service::set_password_callback]
 
-* A substring of the streambuf's get area matches the regular expression.
+Set the password callback.
 
-* An error occurred.
+ template<
+ typename PasswordCallback>
+ boost::system::error_code set_password_callback(
+ impl_type & impl,
+ PasswordCallback callback,
+ boost::system::error_code & ec);
 
-This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the streambuf's get area already contains data that matches the regular expression, the function returns immediately.
 
 
-[heading Parameters]
-
+[endsect]
 
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
 
-[[b][A streambuf object into which the data will be read.]]
 
-[[expr][The regular expression.]]
+[section:set_verify_mode ssl::context_service::set_verify_mode]
 
-]
+Set peer verification mode.
 
-[heading Return Value]
-
-The number of bytes in the streambuf's get area up to and including the substring that matches the regular expression.
+ boost::system::error_code set_verify_mode(
+ impl_type & impl,
+ context_base::verify_mode v,
+ boost::system::error_code & ec);
 
-[heading Exceptions]
-
 
-[variablelist
-
-[[boost::system::system_error][Thrown on failure.]]
 
-]
+[endsect]
 
-[heading Example]
-
-To read data into a streambuf until a CR-LF sequence is encountered:
 
- boost::asio::streambuf b;
- boost::asio::read_until(s, b, boost::regex("\r\n"));
- std::istream is(&b);
- std::string line;
- std::getline(is, line);
 
+[section:shutdown_service ssl::context_service::shutdown_service]
 
+Destroy all user-defined handler objects owned by the service.
 
+ void shutdown_service();
 
 
 
@@ -32425,80 +53001,77 @@
 
 
 
-[section:overload6 read_until (6 of 6 overloads)]
+[section:use_certificate_chain_file ssl::context_service::use_certificate_chain_file]
 
-Read data into a streambuf until a regular expression is located.
+Use a certificate chain from a file.
 
- template<
- typename ``[link boost_asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t read_until(
- SyncReadStream & s,
- boost::asio::basic_streambuf< Allocator > & b,
- const boost::regex & expr,
+ boost::system::error_code use_certificate_chain_file(
+ impl_type & impl,
+ const std::string & filename,
       boost::system::error_code & ec);
 
 
-This function is used to read data into the specified streambuf until the streambuf's get area contains some data that matches a regular expression. The call will block until one of the following conditions is true:
 
+[endsect]
 
-* A substring of the streambuf's get area matches the regular expression.
 
-* An error occurred.
 
-This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the streambuf's get area already contains data that matches the regular expression, the function returns immediately.
+[section:use_certificate_file ssl::context_service::use_certificate_file]
 
+Use a certificate from a file.
 
-[heading Parameters]
-
+ boost::system::error_code use_certificate_file(
+ impl_type & impl,
+ const std::string & filename,
+ context_base::file_format format,
+ boost::system::error_code & ec);
 
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
 
-[[b][A streambuf object into which the data will be read.]]
 
-[[expr][The regular expression.]]
+[endsect]
 
-[[ec][Set to indicate what error occurred, if any.]]
 
-]
 
-[heading Return Value]
-
-The number of bytes in the streambuf's get area up to and including the substring that matches the regular expression. Returns 0 if an error occurred.
+[section:use_private_key_file ssl::context_service::use_private_key_file]
 
+Use a private key from a file.
 
+ boost::system::error_code use_private_key_file(
+ impl_type & impl,
+ const std::string & filename,
+ context_base::file_format format,
+ boost::system::error_code & ec);
 
-[endsect]
 
 
 [endsect]
 
-[section:service_already_exists service_already_exists]
 
-Exception thrown when trying to add a duplicate service to an io_service.
 
- class service_already_exists
+[section:use_rsa_private_key_file ssl::context_service::use_rsa_private_key_file]
 
+Use an RSA private key from a file.
 
-[heading Member Functions]
-[table
- [[Name][Description]]
+ boost::system::error_code use_rsa_private_key_file(
+ impl_type & impl,
+ const std::string & filename,
+ context_base::file_format format,
+ boost::system::error_code & ec);
 
- [
- [[link boost_asio.reference.service_already_exists.service_already_exists [*service_already_exists]]]
- []
- ]
-
-]
 
 
-[section:service_already_exists service_already_exists::service_already_exists]
+[endsect]
 
 
 
- service_already_exists();
+[section:use_tmp_dh_file ssl::context_service::use_tmp_dh_file]
+
+Use the specified file to obtain the temporary Diffie-Hellman parameters.
+
+ boost::system::error_code use_tmp_dh_file(
+ impl_type & impl,
+ const std::string & filename,
+ boost::system::error_code & ec);
 
 
 
@@ -32508,14 +53081,15 @@
 
 [endsect]
 
-[section:socket_acceptor_service socket_acceptor_service]
+[section:ssl__stream ssl::stream]
 
-Default service implementation for a socket acceptor.
+Provides stream-oriented functionality using SSL.
 
   template<
- typename ``[link boost_asio.reference.Protocol Protocol]``>
- class socket_acceptor_service :
- public io_service::service
+ typename Stream,
+ typename ``[link boost_asio.reference.Service Service]`` = stream_service>
+ class stream :
+ public ssl::stream_base
 
 
 [heading Types]
@@ -32524,29 +53098,36 @@
 
   [
 
- [[link boost_asio.reference.socket_acceptor_service.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
+ [[link boost_asio.reference.ssl__stream.handshake_type [*handshake_type]]]
+ [Different handshake types. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.socket_acceptor_service.implementation_type [*implementation_type]]]
- [The native type of the socket acceptor. ]
+ [[link boost_asio.reference.ssl__stream.impl_type [*impl_type]]]
+ [The native implementation type of the stream. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.socket_acceptor_service.native_type [*native_type]]]
- [The native acceptor type. ]
+ [[link boost_asio.reference.ssl__stream.lowest_layer_type [*lowest_layer_type]]]
+ [The type of the lowest layer. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.socket_acceptor_service.protocol_type [*protocol_type]]]
- [The protocol type. ]
+ [[link boost_asio.reference.ssl__stream.next_layer_type [*next_layer_type]]]
+ [The type of the next layer. ]
+
+ ]
+
+ [
+
+ [[link boost_asio.reference.ssl__stream.service_type [*service_type]]]
+ [The type of the service that will be used to provide stream operations. ]
   
   ]
 
@@ -32557,130 +53138,270 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.socket_acceptor_service.accept [*accept]]]
- [Accept a new connection. ]
+ [[link boost_asio.reference.ssl__stream.async_handshake [*async_handshake]]]
+ [Start an asynchronous SSL handshake. ]
   ]
   
   [
- [[link boost_asio.reference.socket_acceptor_service.assign [*assign]]]
- [Assign an existing native acceptor to a socket acceptor. ]
+ [[link boost_asio.reference.ssl__stream.async_read_some [*async_read_some]]]
+ [Start an asynchronous read. ]
   ]
   
   [
- [[link boost_asio.reference.socket_acceptor_service.async_accept [*async_accept]]]
- [Start an asynchronous accept. ]
+ [[link boost_asio.reference.ssl__stream.async_shutdown [*async_shutdown]]]
+ [Asynchronously shut down SSL on the stream. ]
   ]
   
   [
- [[link boost_asio.reference.socket_acceptor_service.bind [*bind]]]
- [Bind the socket acceptor to the specified local endpoint. ]
+ [[link boost_asio.reference.ssl__stream.async_write_some [*async_write_some]]]
+ [Start an asynchronous write. ]
   ]
   
   [
- [[link boost_asio.reference.socket_acceptor_service.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the acceptor. ]
+ [[link boost_asio.reference.ssl__stream.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
   ]
   
   [
- [[link boost_asio.reference.socket_acceptor_service.close [*close]]]
- [Close a socket acceptor implementation. ]
+ [[link boost_asio.reference.ssl__stream.handshake [*handshake]]]
+ [Perform SSL handshaking. ]
   ]
   
   [
- [[link boost_asio.reference.socket_acceptor_service.construct [*construct]]]
- [Construct a new socket acceptor implementation. ]
+ [[link boost_asio.reference.ssl__stream.impl [*impl]]]
+ [Get the underlying implementation in the native type. ]
   ]
   
   [
- [[link boost_asio.reference.socket_acceptor_service.destroy [*destroy]]]
- [Destroy a socket acceptor implementation. ]
+ [[link boost_asio.reference.ssl__stream.in_avail [*in_avail]]]
+ [Determine the amount of data that may be read without blocking. ]
   ]
   
   [
- [[link boost_asio.reference.socket_acceptor_service.get_io_service [*get_io_service]]]
- [Get the io_service object that owns the service. ]
+ [[link boost_asio.reference.ssl__stream.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
   ]
   
   [
- [[link boost_asio.reference.socket_acceptor_service.get_option [*get_option]]]
- [Get a socket option. ]
+ [[link boost_asio.reference.ssl__stream.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
   ]
   
   [
- [[link boost_asio.reference.socket_acceptor_service.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
+ [[link boost_asio.reference.ssl__stream.next_layer [*next_layer]]]
+ [Get a reference to the next layer. ]
   ]
   
   [
- [[link boost_asio.reference.socket_acceptor_service.io_service [*io_service]]]
- [(Deprecated: use get_io_service().) Get the io_service object that owns the service. ]
+ [[link boost_asio.reference.ssl__stream.peek [*peek]]]
+ [Peek at the incoming data on the stream. ]
   ]
   
   [
- [[link boost_asio.reference.socket_acceptor_service.is_open [*is_open]]]
- [Determine whether the acceptor is open. ]
+ [[link boost_asio.reference.ssl__stream.read_some [*read_some]]]
+ [Read some data from the stream. ]
   ]
   
   [
- [[link boost_asio.reference.socket_acceptor_service.listen [*listen]]]
- [Place the socket acceptor into the state where it will listen for new connections. ]
+ [[link boost_asio.reference.ssl__stream.shutdown [*shutdown]]]
+ [Shut down SSL on the stream. ]
   ]
   
   [
- [[link boost_asio.reference.socket_acceptor_service.local_endpoint [*local_endpoint]]]
- [Get the local endpoint. ]
+ [[link boost_asio.reference.ssl__stream.stream [*stream]]]
+ [Construct a stream. ]
   ]
   
   [
- [[link boost_asio.reference.socket_acceptor_service.native [*native]]]
- [Get the native acceptor implementation. ]
+ [[link boost_asio.reference.ssl__stream.write_some [*write_some]]]
+ [Write some data to the stream. ]
   ]
   
   [
- [[link boost_asio.reference.socket_acceptor_service.open [*open]]]
- [Open a new socket acceptor implementation. ]
+ [[link boost_asio.reference.ssl__stream._stream [*~stream]]]
+ [Destructor. ]
   ]
   
- [
- [[link boost_asio.reference.socket_acceptor_service.set_option [*set_option]]]
- [Set a socket option. ]
- ]
+]
+
+The stream class template provides asynchronous and blocking stream-oriented functionality using SSL.
+
+
+[heading Thread Safety]
   
- [
- [[link boost_asio.reference.socket_acceptor_service.shutdown_service [*shutdown_service]]]
- [Destroy all user-defined handler objects owned by the service. ]
- ]
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
+
+[heading Example]
   
- [
- [[link boost_asio.reference.socket_acceptor_service.socket_acceptor_service [*socket_acceptor_service]]]
- [Construct a new socket acceptor service for the specified io_service. ]
- ]
+To use the SSL stream template with an ip::tcp::socket, you would write:
+
+ boost::asio::io_service io_service;
+ boost::asio::ssl::context context(io_service, boost::asio::ssl::context::sslv23);
+ boost::asio::ssl::stream<boost::asio::ip::tcp::socket> sock(io_service, context);
+
+
+
+
+
+
+[section:async_handshake ssl::stream::async_handshake]
+
+Start an asynchronous SSL handshake.
+
+ template<
+ typename HandshakeHandler>
+ void async_handshake(
+ handshake_type type,
+ HandshakeHandler handler);
+
+
+This function is used to asynchronously perform an SSL handshake on the stream. This function call always returns immediately.
+
+
+[heading Parameters]
+
+
+[variablelist
   
+[[type][The type of handshaking to be performed, i.e. as a client or as a server.]]
+
+[[handler][The handler to be called when the handshake operation completes. Copies will be made of the handler as required. The equivalent function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error // Result of operation.
+ );
+
+``
+]]
+
 ]
 
-[heading Data Members]
-[table
- [[Name][Description]]
 
- [
- [[link boost_asio.reference.socket_acceptor_service.id [*id]]]
- [The unique service identifier. ]
- ]
+
+[endsect]
+
+
+
+[section:async_read_some ssl::stream::async_read_some]
+
+Start an asynchronous read.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_read_some(
+ const MutableBufferSequence & buffers,
+ ReadHandler handler);
+
+
+This function is used to asynchronously read one or more bytes of data from the stream. The function call always returns immediately.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[buffers][The buffers into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying buffers is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+
+[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The equivalent function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ std::size_t bytes_transferred // Number of bytes read.
+ );
+
+``
+]]
+
+]
+
+[heading Remarks]
+
+The async\_read\_some operation may not read all of the requested number of bytes. Consider using the
+[link boost_asio.reference.async_read async_read] function if you need to ensure that the requested amount of data is read before the asynchronous operation completes.
+
+
+
+[endsect]
+
+
+
+[section:async_shutdown ssl::stream::async_shutdown]
+
+Asynchronously shut down SSL on the stream.
+
+ template<
+ typename ShutdownHandler>
+ void async_shutdown(
+ ShutdownHandler handler);
+
+
+This function is used to asynchronously shut down SSL on the stream. This function call always returns immediately.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[handler][The handler to be called when the handshake operation completes. Copies will be made of the handler as required. The equivalent function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error // Result of operation.
+ );
+
+``
+]]
 
 ]
 
 
-[section:accept socket_acceptor_service::accept]
 
-Accept a new connection.
+[endsect]
+
+
+
+[section:async_write_some ssl::stream::async_write_some]
+
+Start an asynchronous write.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_write_some(
+ const ConstBufferSequence & buffers,
+ WriteHandler handler);
+
+
+This function is used to asynchronously write one or more bytes of data to the stream. The function call always returns immediately.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[buffers][The data to be written to the stream. Although the buffers object may be copied as necessary, ownership of the underlying buffers is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+
+[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The equivalent function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ std::size_t bytes_transferred // Number of bytes written.
+ );
+
+``
+]]
+
+]
 
- template<
- typename ``[link boost_asio.reference.SocketService SocketService]``>
- boost::system::error_code accept(
- implementation_type & impl,
- basic_socket< protocol_type, SocketService > & peer,
- endpoint_type * peer_endpoint,
- boost::system::error_code & ec);
+[heading Remarks]
+
+The async\_write\_some operation may not transmit all of the data to the peer. Consider using the
+[link boost_asio.reference.async_write async_write] function if you need to ensure that all data is written before the blocking operation completes.
 
 
 
@@ -32688,63 +53409,65 @@
 
 
 
-[section:assign socket_acceptor_service::assign]
+[section:get_io_service ssl::stream::get_io_service]
 
-Assign an existing native acceptor to a socket acceptor.
+Get the io_service associated with the object.
 
- boost::system::error_code assign(
- implementation_type & impl,
- const protocol_type & protocol,
- const native_type & native_acceptor,
- boost::system::error_code & ec);
+ boost::asio::io_service & get_io_service();
 
 
+This function may be used to obtain the io_service object that the stream uses to dispatch handlers for asynchronous operations.
 
-[endsect]
 
+[heading Return Value]
+
+A reference to the io_service object that stream will use to dispatch handlers. Ownership is not transferred to the caller.
 
 
-[section:async_accept socket_acceptor_service::async_accept]
 
-Start an asynchronous accept.
+[endsect]
 
- template<
- typename ``[link boost_asio.reference.SocketService SocketService]``,
- typename ``[link boost_asio.reference.AcceptHandler AcceptHandler]``>
- void async_accept(
- implementation_type & impl,
- basic_socket< protocol_type, SocketService > & peer,
- endpoint_type * peer_endpoint,
- AcceptHandler handler);
 
+[section:handshake ssl::stream::handshake]
 
+Perform SSL handshaking.
 
-[endsect]
+ void ``[link boost_asio.reference.ssl__stream.handshake.overload1 handshake]``(
+ handshake_type type);
 
+ boost::system::error_code ``[link boost_asio.reference.ssl__stream.handshake.overload2 handshake]``(
+ handshake_type type,
+ boost::system::error_code & ec);
 
 
-[section:bind socket_acceptor_service::bind]
+[section:overload1 ssl::stream::handshake (1 of 2 overloads)]
 
-Bind the socket acceptor to the specified local endpoint.
+Perform SSL handshaking.
 
- boost::system::error_code bind(
- implementation_type & impl,
- const endpoint_type & endpoint,
- boost::system::error_code & ec);
+ void handshake(
+ handshake_type type);
 
 
+This function is used to perform SSL handshaking on the stream. The function call will block until handshaking is complete or an error occurs.
 
-[endsect]
 
+[heading Parameters]
+
 
+[variablelist
+
+[[type][The type of handshaking to be performed, i.e. as a client or as a server.]]
 
-[section:cancel socket_acceptor_service::cancel]
+]
 
-Cancel all asynchronous operations associated with the acceptor.
+[heading Exceptions]
+
 
- boost::system::error_code cancel(
- implementation_type & impl,
- boost::system::error_code & ec);
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
+
+]
 
 
 
@@ -32752,39 +53475,57 @@
 
 
 
-[section:close socket_acceptor_service::close]
+[section:overload2 ssl::stream::handshake (2 of 2 overloads)]
 
-Close a socket acceptor implementation.
+Perform SSL handshaking.
 
- boost::system::error_code close(
- implementation_type & impl,
+ boost::system::error_code handshake(
+ handshake_type type,
       boost::system::error_code & ec);
 
 
+This function is used to perform SSL handshaking on the stream. The function call will block until handshaking is complete or an error occurs.
 
-[endsect]
 
+[heading Parameters]
+
 
+[variablelist
+
+[[type][The type of handshaking to be performed, i.e. as a client or as a server.]]
 
-[section:construct socket_acceptor_service::construct]
+[[ec][Set to indicate what error occurred, if any. ]]
+
+]
 
-Construct a new socket acceptor implementation.
 
- void construct(
- implementation_type & impl);
 
+[endsect]
 
 
 [endsect]
 
 
+[section:handshake_type ssl::stream::handshake_type]
+
+Different handshake types.
 
-[section:destroy socket_acceptor_service::destroy]
+ enum handshake_type
 
-Destroy a socket acceptor implementation.
+[heading Values]
+[variablelist
 
- void destroy(
- implementation_type & impl);
+ [
+ [client]
+ [Perform handshaking as a client. ]
+ ]
+
+ [
+ [server]
+ [Perform handshaking as a server. ]
+ ]
+
+]
 
 
 
@@ -32792,129 +53533,136 @@
 
 
 
-[section:endpoint_type socket_acceptor_service::endpoint_type]
+[section:impl ssl::stream::impl]
 
-The endpoint type.
+Get the underlying implementation in the native type.
 
- typedef protocol_type::endpoint endpoint_type;
+ impl_type impl();
 
 
+This function may be used to obtain the underlying implementation of the context. This is intended to allow access to stream functionality that is not otherwise provided.
 
 
 [endsect]
 
 
 
-[section:get_io_service socket_acceptor_service::get_io_service]
-
+[section:impl_type ssl::stream::impl_type]
 
-['Inherited from io_service.]
+The native implementation type of the stream.
 
-Get the io_service object that owns the service.
+ typedef service_type::impl_type impl_type;
 
- boost::asio::io_service & get_io_service();
 
 
 
 [endsect]
 
 
+[section:in_avail ssl::stream::in_avail]
 
-[section:get_option socket_acceptor_service::get_option]
+Determine the amount of data that may be read without blocking.
 
-Get a socket option.
+ std::size_t ``[link boost_asio.reference.ssl__stream.in_avail.overload1 in_avail]``();
 
- template<
- typename ``[link boost_asio.reference.GettableSocketOption GettableSocketOption]``>
- boost::system::error_code get_option(
- const implementation_type & impl,
- GettableSocketOption & option,
- boost::system::error_code & ec) const;
+ std::size_t ``[link boost_asio.reference.ssl__stream.in_avail.overload2 in_avail]``(
+ boost::system::error_code & ec);
 
 
+[section:overload1 ssl::stream::in_avail (1 of 2 overloads)]
 
-[endsect]
+Determine the amount of data that may be read without blocking.
 
+ std::size_t in_avail();
 
 
-[section:id socket_acceptor_service::id]
+This function is used to determine the amount of data, in bytes, that may be read from the stream without blocking.
 
-The unique service identifier.
 
- static boost::asio::io_service::id id;
+[heading Return Value]
+
+The number of bytes of data that can be read without blocking.
 
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
 
-[endsect]
+]
 
 
 
-[section:implementation_type socket_acceptor_service::implementation_type]
+[endsect]
 
-The native type of the socket acceptor.
 
- typedef implementation_defined implementation_type;
 
+[section:overload2 ssl::stream::in_avail (2 of 2 overloads)]
 
+Determine the amount of data that may be read without blocking.
 
+ std::size_t in_avail(
+ boost::system::error_code & ec);
 
-[endsect]
 
+This function is used to determine the amount of data, in bytes, that may be read from the stream without blocking.
 
 
-[section:io_control socket_acceptor_service::io_control]
+[heading Parameters]
+
 
-Perform an IO control command on the socket.
+[variablelist
+
+[[ec][Set to indicate what error occurred, if any.]]
 
- template<
- typename ``[link boost_asio.reference.IoControlCommand IoControlCommand]``>
- boost::system::error_code io_control(
- implementation_type & impl,
- IoControlCommand & command,
- boost::system::error_code & ec);
+]
+
+[heading Return Value]
+
+The number of bytes of data that can be read without blocking.
 
 
 
 [endsect]
 
 
-
-[section:io_service socket_acceptor_service::io_service]
+[endsect]
 
 
-['Inherited from io_service.]
+[section:io_service ssl::stream::io_service]
 
-(Deprecated: use get_io_service().) Get the io_service object that owns the service.
+(Deprecated: use get_io_service().) Get the io_service associated with the object.
 
   boost::asio::io_service & io_service();
 
 
+This function may be used to obtain the io_service object that the stream uses to dispatch handlers for asynchronous operations.
 
-[endsect]
 
+[heading Return Value]
+
+A reference to the io_service object that stream will use to dispatch handlers. Ownership is not transferred to the caller.
 
 
-[section:is_open socket_acceptor_service::is_open]
 
-Determine whether the acceptor is open.
+[endsect]
 
- bool is_open(
- const implementation_type & impl) const;
 
 
+[section:lowest_layer ssl::stream::lowest_layer]
 
-[endsect]
+Get a reference to the lowest layer.
 
+ lowest_layer_type & lowest_layer();
 
 
-[section:listen socket_acceptor_service::listen]
+This function returns a reference to the lowest layer in a stack of stream layers.
 
-Place the socket acceptor into the state where it will listen for new connections.
 
- boost::system::error_code listen(
- implementation_type & impl,
- int backlog,
- boost::system::error_code & ec);
+[heading Return Value]
+
+A reference to the lowest layer in the stack of stream layers. Ownership is not transferred to the caller.
 
 
 
@@ -32922,13 +53670,12 @@
 
 
 
-[section:local_endpoint socket_acceptor_service::local_endpoint]
+[section:lowest_layer_type ssl::stream::lowest_layer_type]
 
-Get the local endpoint.
+The type of the lowest layer.
+
+ typedef next_layer_type::lowest_layer_type lowest_layer_type;
 
- endpoint_type local_endpoint(
- const implementation_type & impl,
- boost::system::error_code & ec) const;
 
 
 
@@ -32936,70 +53683,88 @@
 
 
 
-[section:native socket_acceptor_service::native]
+[section:next_layer ssl::stream::next_layer]
 
-Get the native acceptor implementation.
+Get a reference to the next layer.
+
+ next_layer_type & next_layer();
 
- native_type native(
- implementation_type & impl);
 
+This function returns a reference to the next layer in a stack of stream layers.
 
 
-[endsect]
+[heading Return Value]
+
+A reference to the next layer in the stack of stream layers. Ownership is not transferred to the caller.
 
 
 
-[section:native_type socket_acceptor_service::native_type]
+[endsect]
 
-The native acceptor type.
 
- typedef implementation_defined native_type;
 
+[section:next_layer_type ssl::stream::next_layer_type]
 
+The type of the next layer.
 
+ typedef boost::remove_reference< Stream >::type next_layer_type;
 
-[endsect]
 
 
 
-[section:open socket_acceptor_service::open]
+[endsect]
 
-Open a new socket acceptor implementation.
 
- boost::system::error_code open(
- implementation_type & impl,
- const protocol_type & protocol,
- boost::system::error_code & ec);
+[section:peek ssl::stream::peek]
 
+Peek at the incoming data on the stream.
 
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.ssl__stream.peek.overload1 peek]``(
+ const MutableBufferSequence & buffers);
 
-[endsect]
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.ssl__stream.peek.overload2 peek]``(
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
 
 
+[section:overload1 ssl::stream::peek (1 of 2 overloads)]
 
-[section:protocol_type socket_acceptor_service::protocol_type]
+Peek at the incoming data on the stream.
 
-The protocol type.
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t peek(
+ const MutableBufferSequence & buffers);
 
- typedef Protocol protocol_type;
 
+This function is used to peek at the incoming data on the stream, without removing it from the input queue. The function call will block until data has been read successfully or an error occurs.
 
 
+[heading Parameters]
+
 
-[endsect]
+[variablelist
+
+[[buffers][The buffers into which the data will be read.]]
 
+]
 
+[heading Return Value]
+
+The number of bytes read.
 
-[section:set_option socket_acceptor_service::set_option]
+[heading Exceptions]
+
 
-Set a socket option.
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
 
- template<
- typename ``[link boost_asio.reference.SettableSocketOption SettableSocketOption]``>
- boost::system::error_code set_option(
- implementation_type & impl,
- const SettableSocketOption & option,
- boost::system::error_code & ec);
+]
 
 
 
@@ -33007,211 +53772,186 @@
 
 
 
-[section:shutdown_service socket_acceptor_service::shutdown_service]
+[section:overload2 ssl::stream::peek (2 of 2 overloads)]
 
-Destroy all user-defined handler objects owned by the service.
+Peek at the incoming data on the stream.
 
- void shutdown_service();
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t peek(
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
 
 
+This function is used to peek at the incoming data on the stream, withoutxi removing it from the input queue. The function call will block until data has been read successfully or an error occurs.
 
-[endsect]
 
+[heading Parameters]
+
 
+[variablelist
+
+[[buffers][The buffers into which the data will be read.]]
 
-[section:socket_acceptor_service socket_acceptor_service::socket_acceptor_service]
+[[ec][Set to indicate what error occurred, if any.]]
 
-Construct a new socket acceptor service for the specified io_service.
+]
 
- socket_acceptor_service(
- boost::asio::io_service & io_service);
+[heading Return Value]
+
+The number of bytes read. Returns 0 if an error occurred.
 
 
 
 [endsect]
 
 
-
 [endsect]
 
-[section:socket_base socket_base]
+[section:read_some ssl::stream::read_some]
 
-The socket_base class is used as a base for the basic_stream_socket and basic_datagram_socket class templates so that we have a common place to define the shutdown_type and enum.
+Read some data from the stream.
 
- class socket_base
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.ssl__stream.read_some.overload1 read_some]``(
+ const MutableBufferSequence & buffers);
 
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.ssl__stream.read_some.overload2 read_some]``(
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
 
-[heading Types]
-[table
- [[Name][Description]]
 
- [
+[section:overload1 ssl::stream::read_some (1 of 2 overloads)]
 
- [[link boost_asio.reference.socket_base.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
+Read some data from the stream.
 
- [
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t read_some(
+ const MutableBufferSequence & buffers);
 
- [[link boost_asio.reference.socket_base.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
 
- [
+This function is used to read data from the stream. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
 
- [[link boost_asio.reference.socket_base.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
 
- [
+[heading Parameters]
+
 
- [[link boost_asio.reference.socket_base.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
+[variablelist
   
- ]
+[[buffers][The buffers into which the data will be read.]]
 
- [
+]
 
- [[link boost_asio.reference.socket_base.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
+[heading Return Value]
+
+The number of bytes read.
 
- [
+[heading Exceptions]
+
 
- [[link boost_asio.reference.socket_base.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
+[variablelist
   
- ]
+[[boost::system::system_error][Thrown on failure.]]
 
- [
+]
 
- [[link boost_asio.reference.socket_base.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
+[heading Remarks]
+
+The read\_some operation may not read all of the requested number of bytes. Consider using the
+[link boost_asio.reference.read read] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
 
- [
 
- [[link boost_asio.reference.socket_base.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
 
- [
+[endsect]
 
- [[link boost_asio.reference.socket_base.non_blocking_io [*non_blocking_io]]]
- [IO control command to set the blocking mode of the socket. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.socket_base.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
+[section:overload2 ssl::stream::read_some (2 of 2 overloads)]
 
- [
+Read some data from the stream.
 
- [[link boost_asio.reference.socket_base.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t read_some(
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
 
- [
 
- [[link boost_asio.reference.socket_base.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
+This function is used to read data from the stream. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
 
- [
 
- [[link boost_asio.reference.socket_base.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
+[heading Parameters]
+
+
+[variablelist
   
- ]
+[[buffers][The buffers into which the data will be read.]]
 
- [
+[[ec][Set to indicate what error occurred, if any.]]
 
- [[link boost_asio.reference.socket_base.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
+]
 
- [
+[heading Return Value]
+
+The number of bytes read. Returns 0 if an error occurred.
 
- [[link boost_asio.reference.socket_base.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
+[heading Remarks]
+
+The read\_some operation may not read all of the requested number of bytes. Consider using the
+[link boost_asio.reference.read read] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
 
-]
 
-[heading Data Members]
-[table
- [[Name][Description]]
 
- [
- [[link boost_asio.reference.socket_base.max_connections [*max_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
+[endsect]
 
- [
- [[link boost_asio.reference.socket_base.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
 
- [
- [[link boost_asio.reference.socket_base.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
+[endsect]
 
- [
- [[link boost_asio.reference.socket_base.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
 
-]
+[section:service_type ssl::stream::service_type]
+
+The type of the service that will be used to provide stream operations.
+
+ typedef Service service_type;
+
 
 
-[section:broadcast socket_base::broadcast]
 
-Socket option to permit sending of broadcast messages.
+[endsect]
 
- typedef implementation_defined broadcast;
 
+[section:shutdown ssl::stream::shutdown]
 
+Shut down SSL on the stream.
 
-Implements the SOL\_SOCKET/SO\_BROADCAST socket option.
+ void ``[link boost_asio.reference.ssl__stream.shutdown.overload1 shutdown]``();
 
+ boost::system::error_code ``[link boost_asio.reference.ssl__stream.shutdown.overload2 shutdown]``(
+ boost::system::error_code & ec);
 
-[heading Examples]
-
-Setting the option:
 
- boost::asio::ip::udp::socket socket(io_service);
- ...
- boost::asio::socket_base::broadcast option(true);
- socket.set_option(option);
+[section:overload1 ssl::stream::shutdown (1 of 2 overloads)]
 
+Shut down SSL on the stream.
 
+ void shutdown();
 
 
-Getting the current option value:
+This function is used to shut down SSL on the stream. The function call will block until SSL has been shut down or an error occurs.
 
- boost::asio::ip::udp::socket socket(io_service);
- ...
- boost::asio::socket_base::broadcast option;
- socket.get_option(option);
- bool is_set = option.value();
 
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
 
+]
 
 
 
@@ -33219,189 +53959,235 @@
 
 
 
-[section:bytes_readable socket_base::bytes_readable]
+[section:overload2 ssl::stream::shutdown (2 of 2 overloads)]
 
-IO control command to get the amount of data that can be read without blocking.
+Shut down SSL on the stream.
 
- typedef implementation_defined bytes_readable;
+ boost::system::error_code shutdown(
+ boost::system::error_code & ec);
 
 
+This function is used to shut down SSL on the stream. The function call will block until SSL has been shut down or an error occurs.
 
-Implements the FIONREAD IO control command.
 
+[heading Parameters]
+
 
-[heading Example]
+[variablelist
   
+[[ec][Set to indicate what error occurred, if any. ]]
 
-
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::bytes_readable command(true);
- socket.io_control(command);
- std::size_t bytes_readable = command.get();
-
+]
 
 
 
+[endsect]
 
 
 [endsect]
 
 
+[section:stream ssl::stream::stream]
 
-[section:debug socket_base::debug]
-
-Socket option to enable socket-level debugging.
+Construct a stream.
 
- typedef implementation_defined debug;
+ template<
+ typename Arg,
+ typename Context_Service>
+ stream(
+ Arg & arg,
+ basic_context< Context_Service > & context);
 
 
+This constructor creates a stream and initialises the underlying stream object.
 
-Implements the SOL\_SOCKET/SO\_DEBUG socket option.
 
+[heading Parameters]
+
 
-[heading Examples]
+[variablelist
   
-Setting the option:
+[[arg][The argument to be passed to initialise the underlying stream.]]
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::debug option(true);
- socket.set_option(option);
+[[context][The SSL context to be used for the stream. ]]
 
+]
 
 
 
-Getting the current option value:
+[endsect]
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::debug option;
- socket.get_option(option);
- bool is_set = option.value();
 
+[section:write_some ssl::stream::write_some]
+
+Write some data to the stream.
 
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.ssl__stream.write_some.overload1 write_some]``(
+ const ConstBufferSequence & buffers);
 
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.ssl__stream.write_some.overload2 write_some]``(
+ const ConstBufferSequence & buffers,
+ boost::system::error_code & ec);
 
 
+[section:overload1 ssl::stream::write_some (1 of 2 overloads)]
 
-[endsect]
+Write some data to the stream.
 
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t write_some(
+ const ConstBufferSequence & buffers);
 
 
-[section:do_not_route socket_base::do_not_route]
+This function is used to write data on the stream. The function call will block until one or more bytes of data has been written successfully, or until an error occurs.
 
-Socket option to prevent routing, use local interfaces only.
 
- typedef implementation_defined do_not_route;
+[heading Parameters]
+
 
+[variablelist
+
+[[buffers][The data to be written.]]
 
+]
 
-Implements the SOL\_SOCKET/SO\_DONTROUTE socket option.
+[heading Return Value]
+
+The number of bytes written.
 
+[heading Exceptions]
+
 
-[heading Examples]
+[variablelist
   
-Setting the option:
+[[boost::system::system_error][Thrown on failure.]]
 
- boost::asio::ip::udp::socket socket(io_service);
- ...
- boost::asio::socket_base::do_not_route option(true);
- socket.set_option(option);
+]
 
+[heading Remarks]
+
+The write\_some operation may not transmit all of the data to the peer. Consider using the
+[link boost_asio.reference.write write] function if you need to ensure that all data is written before the blocking operation completes.
 
 
 
-Getting the current option value:
+[endsect]
 
- boost::asio::ip::udp::socket socket(io_service);
- ...
- boost::asio::socket_base::do_not_route option;
- socket.get_option(option);
- bool is_set = option.value();
 
 
+[section:overload2 ssl::stream::write_some (2 of 2 overloads)]
 
+Write some data to the stream.
 
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t write_some(
+ const ConstBufferSequence & buffers,
+ boost::system::error_code & ec);
 
 
-[endsect]
+This function is used to write data on the stream. The function call will block until one or more bytes of data has been written successfully, or until an error occurs.
 
 
+[heading Parameters]
+
 
-[section:enable_connection_aborted socket_base::enable_connection_aborted]
+[variablelist
+
+[[buffers][The data to be written to the stream.]]
 
-Socket option to report aborted connections on accept.
+[[ec][Set to indicate what error occurred, if any.]]
 
- typedef implementation_defined enable_connection_aborted;
+]
 
+[heading Return Value]
+
+The number of bytes written. Returns 0 if an error occurred.
 
+[heading Remarks]
+
+The write\_some operation may not transmit all of the data to the peer. Consider using the
+[link boost_asio.reference.write write] function if you need to ensure that all data is written before the blocking operation completes.
 
-Implements a custom socket option that determines whether or not an accept operation is permitted to fail with boost::asio::error::connection\_aborted. By default the option is false.
 
 
-[heading Examples]
-
-Setting the option:
+[endsect]
 
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
- boost::asio::socket_base::enable_connection_aborted option(true);
- acceptor.set_option(option);
 
+[endsect]
 
 
+[section:_stream ssl::stream::~stream]
 
-Getting the current option value:
+Destructor.
 
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
- boost::asio::socket_base::enable_connection_aborted option;
- acceptor.get_option(option);
- bool is_set = option.value();
+ ~stream();
 
 
 
+[endsect]
 
 
 
 [endsect]
 
+[section:ssl__stream_base ssl::stream_base]
 
+The stream_base class is used as a base for the boost::asio::ssl::stream class template so that we have a common place to define various enums.
 
-[section:keep_alive socket_base::keep_alive]
+ class stream_base
 
-Socket option to send keep-alives.
 
- typedef implementation_defined keep_alive;
+[heading Types]
+[table
+ [[Name][Description]]
 
+ [
 
+ [[link boost_asio.reference.ssl__stream_base.handshake_type [*handshake_type]]]
+ [Different handshake types. ]
+
+ ]
 
-Implements the SOL\_SOCKET/SO\_KEEPALIVE socket option.
+]
 
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
 
-[heading Examples]
+ [
+ [[link boost_asio.reference.ssl__stream_base._stream_base [*~stream_base]]]
+ [Protected destructor to prevent deletion through this type. ]
+ ]
   
-Setting the option:
-
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::keep_alive option(true);
- socket.set_option(option);
+]
 
 
+[section:handshake_type ssl::stream_base::handshake_type]
 
+Different handshake types.
 
-Getting the current option value:
+ enum handshake_type
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::keep_alive option;
- socket.get_option(option);
- bool is_set = option.value();
+[heading Values]
+[variablelist
 
+ [
+ [client]
+ [Perform handshaking as a client. ]
+ ]
 
+ [
+ [server]
+ [Perform handshaking as a server. ]
+ ]
 
+]
 
 
 
@@ -33409,52 +54195,156 @@
 
 
 
-[section:linger socket_base::linger]
+[section:_stream_base ssl::stream_base::~stream_base]
 
-Socket option to specify whether the socket lingers on close if unsent data is present.
+Protected destructor to prevent deletion through this type.
 
- typedef implementation_defined linger;
+ ~stream_base();
 
 
 
-Implements the SOL\_SOCKET/SO\_LINGER socket option.
+[endsect]
 
 
-[heading Examples]
-
-Setting the option:
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::linger option(true, 30);
- socket.set_option(option);
+[endsect]
 
+[section:ssl__stream_service ssl::stream_service]
 
+Default service implementation for an SSL stream.
 
+ class stream_service :
+ public io_service::service
 
-Getting the current option value:
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::linger option;
- socket.get_option(option);
- bool is_set = option.enabled();
- unsigned short timeout = option.timeout();
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
 
+ [[link boost_asio.reference.ssl__stream_service.impl_type [*impl_type]]]
+ [The type of a stream implementation. ]
+
+ ]
 
+]
 
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.ssl__stream_service.async_handshake [*async_handshake]]]
+ [Start an asynchronous SSL handshake. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__stream_service.async_read_some [*async_read_some]]]
+ [Start an asynchronous read. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__stream_service.async_shutdown [*async_shutdown]]]
+ [Asynchronously shut down SSL on the stream. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__stream_service.async_write_some [*async_write_some]]]
+ [Start an asynchronous write. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__stream_service.create [*create]]]
+ [Create a new stream implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__stream_service.destroy [*destroy]]]
+ [Destroy a stream implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__stream_service.get_io_service [*get_io_service]]]
+ [Get the io_service object that owns the service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__stream_service.handshake [*handshake]]]
+ [Perform SSL handshaking. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__stream_service.in_avail [*in_avail]]]
+ [Determine the amount of data that may be read without blocking. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__stream_service.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service object that owns the service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__stream_service.null [*null]]]
+ [Return a null stream implementation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__stream_service.peek [*peek]]]
+ [Peek at the incoming data on the stream. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__stream_service.read_some [*read_some]]]
+ [Read some data from the stream. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__stream_service.shutdown [*shutdown]]]
+ [Shut down SSL on the stream. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__stream_service.shutdown_service [*shutdown_service]]]
+ [Destroy all user-defined handler objects owned by the service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__stream_service.stream_service [*stream_service]]]
+ [Construct a new stream service for the specified io_service. ]
+ ]
+
+ [
+ [[link boost_asio.reference.ssl__stream_service.write_some [*write_some]]]
+ [Write some data to the stream. ]
+ ]
+
+]
 
+[heading Data Members]
+[table
+ [[Name][Description]]
 
-[endsect]
+ [
+ [[link boost_asio.reference.ssl__stream_service.id [*id]]]
+ [The unique service identifier. ]
+ ]
 
+]
 
 
-[section:max_connections socket_base::max_connections]
+[section:async_handshake ssl::stream_service::async_handshake]
 
-The maximum length of the queue of pending incoming connections.
+Start an asynchronous SSL handshake.
 
- static const int max_connections = implementation_defined;
+ template<
+ typename Stream,
+ typename HandshakeHandler>
+ void async_handshake(
+ impl_type & impl,
+ Stream & next_layer,
+ stream_base::handshake_type type,
+ HandshakeHandler handler);
 
 
 
@@ -33462,11 +54352,19 @@
 
 
 
-[section:message_do_not_route socket_base::message_do_not_route]
+[section:async_read_some ssl::stream_service::async_read_some]
 
-Specify that the data should not be subject to routing.
+Start an asynchronous read.
 
- static const int message_do_not_route = implementation_defined;
+ template<
+ typename Stream,
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_read_some(
+ impl_type & impl,
+ Stream & next_layer,
+ const MutableBufferSequence & buffers,
+ ReadHandler handler);
 
 
 
@@ -33474,12 +54372,17 @@
 
 
 
-[section:message_flags socket_base::message_flags]
-
-Bitmask type for flags that can be passed to send and receive operations.
+[section:async_shutdown ssl::stream_service::async_shutdown]
 
- typedef int message_flags;
+Asynchronously shut down SSL on the stream.
 
+ template<
+ typename Stream,
+ typename ShutdownHandler>
+ void async_shutdown(
+ impl_type & impl,
+ Stream & next_layer,
+ ShutdownHandler handler);
 
 
 
@@ -33487,11 +54390,19 @@
 
 
 
-[section:message_out_of_band socket_base::message_out_of_band]
+[section:async_write_some ssl::stream_service::async_write_some]
 
-Process out-of-band data.
+Start an asynchronous write.
 
- static const int message_out_of_band = implementation_defined;
+ template<
+ typename Stream,
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_write_some(
+ impl_type & impl,
+ Stream & next_layer,
+ const ConstBufferSequence & buffers,
+ WriteHandler handler);
 
 
 
@@ -33499,11 +54410,17 @@
 
 
 
-[section:message_peek socket_base::message_peek]
+[section:create ssl::stream_service::create]
 
-Peek at incoming data without removing it from the input queue.
+Create a new stream implementation.
 
- static const int message_peek = implementation_defined;
+ template<
+ typename Stream,
+ typename Context_Service>
+ void create(
+ impl_type & impl,
+ Stream & next_layer,
+ basic_context< Context_Service > & context);
 
 
 
@@ -33511,28 +54428,30 @@
 
 
 
-[section:non_blocking_io socket_base::non_blocking_io]
+[section:destroy ssl::stream_service::destroy]
 
-IO control command to set the blocking mode of the socket.
+Destroy a stream implementation.
 
- typedef implementation_defined non_blocking_io;
+ template<
+ typename Stream>
+ void destroy(
+ impl_type & impl,
+ Stream & next_layer);
 
 
 
-Implements the FIONBIO IO control command.
+[endsect]
 
 
-[heading Example]
-
 
+[section:get_io_service ssl::stream_service::get_io_service]
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::non_blocking_io command(true);
- socket.io_control(command);
 
+['Inherited from io_service.]
 
+Get the io_service object that owns the service.
 
+ boost::asio::io_service & get_io_service();
 
 
 
@@ -33540,39 +54459,29 @@
 
 
 
-[section:receive_buffer_size socket_base::receive_buffer_size]
-
-Socket option for the receive buffer size of a socket.
-
- typedef implementation_defined receive_buffer_size;
-
-
-
-Implements the SOL\_SOCKET/SO\_RCVBUF socket option.
-
+[section:handshake ssl::stream_service::handshake]
 
-[heading Examples]
-
-Setting the option:
+Perform SSL handshaking.
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::receive_buffer_size option(8192);
- socket.set_option(option);
+ template<
+ typename Stream>
+ boost::system::error_code handshake(
+ impl_type & impl,
+ Stream & next_layer,
+ stream_base::handshake_type type,
+ boost::system::error_code & ec);
 
 
 
+[endsect]
 
-Getting the current option value:
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::receive_buffer_size option;
- socket.get_option(option);
- int size = option.value();
 
+[section:id ssl::stream_service::id]
 
+The unique service identifier.
 
+ static boost::asio::io_service::id id;
 
 
 
@@ -33580,79 +54489,75 @@
 
 
 
-[section:receive_low_watermark socket_base::receive_low_watermark]
-
-Socket option for the receive low watermark.
+[section:impl_type ssl::stream_service::impl_type]
 
- typedef implementation_defined receive_low_watermark;
+The type of a stream implementation.
 
+ typedef implementation_defined impl_type;
 
 
-Implements the SOL\_SOCKET/SO\_RCVLOWAT socket option.
 
 
-[heading Examples]
-
-Setting the option:
+[endsect]
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::receive_low_watermark option(1024);
- socket.set_option(option);
 
 
+[section:in_avail ssl::stream_service::in_avail]
 
+Determine the amount of data that may be read without blocking.
 
-Getting the current option value:
+ template<
+ typename Stream>
+ std::size_t in_avail(
+ impl_type & impl,
+ Stream & next_layer,
+ boost::system::error_code & ec);
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::receive_low_watermark option;
- socket.get_option(option);
- int size = option.value();
 
 
+[endsect]
 
 
 
+[section:io_service ssl::stream_service::io_service]
 
-[endsect]
 
+['Inherited from io_service.]
 
+(Deprecated: use get_io_service().) Get the io_service object that owns the service.
 
-[section:reuse_address socket_base::reuse_address]
+ boost::asio::io_service & io_service();
 
-Socket option to allow the socket to be bound to an address that is already in use.
 
- typedef implementation_defined reuse_address;
 
+[endsect]
 
 
-Implements the SOL\_SOCKET/SO\_REUSEADDR socket option.
 
+[section:null ssl::stream_service::null]
 
-[heading Examples]
-
-Setting the option:
+Return a null stream implementation.
 
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
- boost::asio::socket_base::reuse_address option(true);
- acceptor.set_option(option);
+ impl_type null() const;
 
 
 
+[endsect]
 
-Getting the current option value:
 
- boost::asio::ip::tcp::acceptor acceptor(io_service);
- ...
- boost::asio::socket_base::reuse_address option;
- acceptor.get_option(option);
- bool is_set = option.value();
 
+[section:peek ssl::stream_service::peek]
 
+Peek at the incoming data on the stream.
 
+ template<
+ typename Stream,
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t peek(
+ impl_type & impl,
+ Stream & next_layer,
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
 
 
 
@@ -33660,128 +54565,160 @@
 
 
 
-[section:send_buffer_size socket_base::send_buffer_size]
-
-Socket option for the send buffer size of a socket.
+[section:read_some ssl::stream_service::read_some]
 
- typedef implementation_defined send_buffer_size;
+Read some data from the stream.
 
+ template<
+ typename Stream,
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t read_some(
+ impl_type & impl,
+ Stream & next_layer,
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
 
 
-Implements the SOL\_SOCKET/SO\_SNDBUF socket option.
 
+[endsect]
 
-[heading Examples]
-
-Setting the option:
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::send_buffer_size option(8192);
- socket.set_option(option);
 
+[section:shutdown ssl::stream_service::shutdown]
 
+Shut down SSL on the stream.
 
+ template<
+ typename Stream>
+ boost::system::error_code shutdown(
+ impl_type & impl,
+ Stream & next_layer,
+ boost::system::error_code & ec);
 
-Getting the current option value:
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::send_buffer_size option;
- socket.get_option(option);
- int size = option.value();
 
+[endsect]
 
 
 
+[section:shutdown_service ssl::stream_service::shutdown_service]
 
+Destroy all user-defined handler objects owned by the service.
 
-[endsect]
+ void shutdown_service();
 
 
 
-[section:send_low_watermark socket_base::send_low_watermark]
+[endsect]
 
-Socket option for the send low watermark.
 
- typedef implementation_defined send_low_watermark;
 
+[section:stream_service ssl::stream_service::stream_service]
 
+Construct a new stream service for the specified io_service.
 
-Implements the SOL\_SOCKET/SO\_SNDLOWAT socket option.
+ stream_service(
+ boost::asio::io_service & io_service);
 
 
-[heading Examples]
-
-Setting the option:
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::send_low_watermark option(1024);
- socket.set_option(option);
+[endsect]
 
 
 
+[section:write_some ssl::stream_service::write_some]
 
-Getting the current option value:
+Write some data to the stream.
 
- boost::asio::ip::tcp::socket socket(io_service);
- ...
- boost::asio::socket_base::send_low_watermark option;
- socket.get_option(option);
- int size = option.value();
+ template<
+ typename Stream,
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t write_some(
+ impl_type & impl,
+ Stream & next_layer,
+ const ConstBufferSequence & buffers,
+ boost::system::error_code & ec);
 
 
 
+[endsect]
 
 
 
 [endsect]
 
 
+[section:strand strand]
 
-[section:shutdown_type socket_base::shutdown_type]
+Typedef for backwards compatibility.
 
-Different ways a socket may be shutdown.
+ typedef boost::asio::io_service::strand strand;
 
- enum shutdown_type
 
-[heading Values]
-[variablelist
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
   [
- [shutdown_receive]
- [Shutdown the receive side of the socket. ]
+ [[link boost_asio.reference.io_service__strand.dispatch [*dispatch]]]
+ [Request the strand to invoke the given handler. ]
   ]
-
+
   [
- [shutdown_send]
- [Shutdown the send side of the socket. ]
+ [[link boost_asio.reference.io_service__strand.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the strand. ]
   ]
-
+
   [
- [shutdown_both]
- [Shutdown both send and receive on the socket. ]
+ [[link boost_asio.reference.io_service__strand.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the strand. ]
   ]
-
+
+ [
+ [[link boost_asio.reference.io_service__strand.post [*post]]]
+ [Request the strand to invoke the given handler and return immediately. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service__strand.strand [*strand]]]
+ [Constructor. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service__strand.wrap [*wrap]]]
+ [Create a new handler that automatically dispatches the wrapped handler on the strand. ]
+ ]
+
+ [
+ [[link boost_asio.reference.io_service__strand._strand [*~strand]]]
+ [Destructor. ]
+ ]
+
 ]
 
+The io_service::strand class provides the ability to post and dispatch handlers with the guarantee that none of those handlers will execute concurrently.
+
+
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
+[*Shared] [*objects:] Safe.
 
-[endsect]
 
 
 
 [endsect]
 
-[section:ssl__basic_context ssl::basic_context]
 
-SSL context.
+[section:stream_socket_service stream_socket_service]
+
+Default service implementation for a stream socket.
 
   template<
- typename ``[link boost_asio.reference.Service Service]``>
- class basic_context :
- public ssl::context_base
+ typename ``[link boost_asio.reference.Protocol Protocol]``>
+ class stream_socket_service :
+ public io_service::service
 
 
 [heading Types]
@@ -33790,217 +54727,232 @@
 
   [
 
- [[link boost_asio.reference.ssl__basic_context.file_format [*file_format]]]
- [File format types. ]
+ [[link boost_asio.reference.stream_socket_service.endpoint_type [*endpoint_type]]]
+ [The endpoint type. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.ssl__basic_context.impl_type [*impl_type]]]
- [The native implementation type of the locking dispatcher. ]
+ [[link boost_asio.reference.stream_socket_service.implementation_type [*implementation_type]]]
+ [The type of a stream socket implementation. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.ssl__basic_context.method [*method]]]
- [Different methods supported by a context. ]
+ [[link boost_asio.reference.stream_socket_service.native_type [*native_type]]]
+ [The native socket type. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.ssl__basic_context.options [*options]]]
- [Bitmask type for SSL options. ]
+ [[link boost_asio.reference.stream_socket_service.protocol_type [*protocol_type]]]
+ [The protocol type. ]
   
   ]
 
- [
+]
 
- [[link boost_asio.reference.ssl__basic_context.password_purpose [*password_purpose]]]
- [Purpose of PEM password. ]
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.stream_socket_service.assign [*assign]]]
+ [Assign an existing native socket to a stream socket. ]
+ ]
   
+ [
+ [[link boost_asio.reference.stream_socket_service.async_connect [*async_connect]]]
+ [Start an asynchronous connect. ]
   ]
-
+
   [
-
- [[link boost_asio.reference.ssl__basic_context.service_type [*service_type]]]
- [The type of the service that will be used to provide context operations. ]
+ [[link boost_asio.reference.stream_socket_service.async_receive [*async_receive]]]
+ [Start an asynchronous receive. ]
+ ]
   
+ [
+ [[link boost_asio.reference.stream_socket_service.async_send [*async_send]]]
+ [Start an asynchronous send. ]
   ]
-
+
   [
-
- [[link boost_asio.reference.ssl__basic_context.verify_mode [*verify_mode]]]
- [Bitmask type for peer verification. ]
+ [[link boost_asio.reference.stream_socket_service.at_mark [*at_mark]]]
+ [Determine whether the socket is at the out-of-band data mark. ]
+ ]
   
+ [
+ [[link boost_asio.reference.stream_socket_service.available [*available]]]
+ [Determine the number of bytes available for reading. ]
   ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
+
   [
- [[link boost_asio.reference.ssl__basic_context.add_verify_path [*add_verify_path]]]
- [Add a directory containing certificate authority files to be used for performing verification. ]
+ [[link boost_asio.reference.stream_socket_service.bind [*bind]]]
+ [Bind the stream socket to the specified local endpoint. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__basic_context.basic_context [*basic_context]]]
- [Constructor. ]
+ [[link boost_asio.reference.stream_socket_service.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the socket. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__basic_context.impl [*impl]]]
- [Get the underlying implementation in the native type. ]
+ [[link boost_asio.reference.stream_socket_service.close [*close]]]
+ [Close a stream socket implementation. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__basic_context.load_verify_file [*load_verify_file]]]
- [Load a certification authority file for performing verification. ]
+ [[link boost_asio.reference.stream_socket_service.connect [*connect]]]
+ [Connect the stream socket to the specified endpoint. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__basic_context.set_options [*set_options]]]
- [Set options on the context. ]
+ [[link boost_asio.reference.stream_socket_service.construct [*construct]]]
+ [Construct a new stream socket implementation. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__basic_context.set_password_callback [*set_password_callback]]]
- [Set the password callback. ]
+ [[link boost_asio.reference.stream_socket_service.destroy [*destroy]]]
+ [Destroy a stream socket implementation. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__basic_context.set_verify_mode [*set_verify_mode]]]
- [Set the peer verification mode. ]
+ [[link boost_asio.reference.stream_socket_service.get_io_service [*get_io_service]]]
+ [Get the io_service object that owns the service. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__basic_context.use_certificate_chain_file [*use_certificate_chain_file]]]
- [Use a certificate chain from a file. ]
+ [[link boost_asio.reference.stream_socket_service.get_option [*get_option]]]
+ [Get a socket option. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__basic_context.use_certificate_file [*use_certificate_file]]]
- [Use a certificate from a file. ]
+ [[link boost_asio.reference.stream_socket_service.io_control [*io_control]]]
+ [Perform an IO control command on the socket. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__basic_context.use_private_key_file [*use_private_key_file]]]
- [Use a private key from a file. ]
+ [[link boost_asio.reference.stream_socket_service.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service object that owns the service. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__basic_context.use_rsa_private_key_file [*use_rsa_private_key_file]]]
- [Use an RSA private key from a file. ]
+ [[link boost_asio.reference.stream_socket_service.is_open [*is_open]]]
+ [Determine whether the socket is open. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__basic_context.use_tmp_dh_file [*use_tmp_dh_file]]]
- [Use the specified file to obtain the temporary Diffie-Hellman parameters. ]
+ [[link boost_asio.reference.stream_socket_service.local_endpoint [*local_endpoint]]]
+ [Get the local endpoint. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__basic_context._basic_context [*~basic_context]]]
- [Destructor. ]
+ [[link boost_asio.reference.stream_socket_service.native [*native]]]
+ [Get the native socket implementation. ]
   ]
   
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
   [
- [[link boost_asio.reference.ssl__basic_context.default_workarounds [*default_workarounds]]]
- [Implement various bug workarounds. ]
+ [[link boost_asio.reference.stream_socket_service.open [*open]]]
+ [Open a stream socket. ]
   ]
-
+
   [
- [[link boost_asio.reference.ssl__basic_context.no_sslv2 [*no_sslv2]]]
- [Disable SSL v2. ]
+ [[link boost_asio.reference.stream_socket_service.receive [*receive]]]
+ [Receive some data from the peer. ]
   ]
-
+
   [
- [[link boost_asio.reference.ssl__basic_context.no_sslv3 [*no_sslv3]]]
- [Disable SSL v3. ]
+ [[link boost_asio.reference.stream_socket_service.remote_endpoint [*remote_endpoint]]]
+ [Get the remote endpoint. ]
   ]
-
+
   [
- [[link boost_asio.reference.ssl__basic_context.no_tlsv1 [*no_tlsv1]]]
- [Disable TLS v1. ]
+ [[link boost_asio.reference.stream_socket_service.send [*send]]]
+ [Send the given data to the peer. ]
   ]
-
+
   [
- [[link boost_asio.reference.ssl__basic_context.single_dh_use [*single_dh_use]]]
- [Always create a new key when using tmp_dh parameters. ]
+ [[link boost_asio.reference.stream_socket_service.set_option [*set_option]]]
+ [Set a socket option. ]
   ]
-
+
   [
- [[link boost_asio.reference.ssl__basic_context.verify_client_once [*verify_client_once]]]
- [Do not request client certificate on renegotiation. Ignored unless verify_peer is set. ]
+ [[link boost_asio.reference.stream_socket_service.shutdown [*shutdown]]]
+ [Disable sends or receives on the socket. ]
   ]
-
+
   [
- [[link boost_asio.reference.ssl__basic_context.verify_fail_if_no_peer_cert [*verify_fail_if_no_peer_cert]]]
- [Fail verification if the peer has no certificate. Ignored unless verify_peer is set. ]
+ [[link boost_asio.reference.stream_socket_service.shutdown_service [*shutdown_service]]]
+ [Destroy all user-defined handler objects owned by the service. ]
   ]
-
+
   [
- [[link boost_asio.reference.ssl__basic_context.verify_none [*verify_none]]]
- [No verification. ]
+ [[link boost_asio.reference.stream_socket_service.stream_socket_service [*stream_socket_service]]]
+ [Construct a new stream socket service for the specified io_service. ]
   ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
 
   [
- [[link boost_asio.reference.ssl__basic_context.verify_peer [*verify_peer]]]
- [Verify the peer. ]
+ [[link boost_asio.reference.stream_socket_service.id [*id]]]
+ [The unique service identifier. ]
   ]
 
 ]
 
-[section:add_verify_path ssl::basic_context::add_verify_path]
 
-Add a directory containing certificate authority files to be used for performing verification.
+[section:assign stream_socket_service::assign]
 
- void ``[link boost_asio.reference.ssl__basic_context.add_verify_path.overload1 add_verify_path]``(
- const std::string & path);
+Assign an existing native socket to a stream socket.
 
- boost::system::error_code ``[link boost_asio.reference.ssl__basic_context.add_verify_path.overload2 add_verify_path]``(
- const std::string & path,
+ boost::system::error_code assign(
+ implementation_type & impl,
+ const protocol_type & protocol,
+ const native_type & native_socket,
       boost::system::error_code & ec);
 
 
-[section:overload1 ssl::basic_context::add_verify_path (1 of 2 overloads)]
 
-Add a directory containing certificate authority files to be used for performing verification.
+[endsect]
 
- void add_verify_path(
- const std::string & path);
 
 
-This function is used to specify the name of a directory containing certification authority certificates. Each file in the directory must contain a single certificate. The files must be named using the subject name's hash and an extension of ".0".
+[section:async_connect stream_socket_service::async_connect]
 
+Start an asynchronous connect.
 
-[heading Parameters]
-
+ template<
+ typename ``[link boost_asio.reference.ConnectHandler ConnectHandler]``>
+ void async_connect(
+ implementation_type & impl,
+ const endpoint_type & peer_endpoint,
+ ConnectHandler handler);
 
-[variablelist
-
-[[path][The name of a directory containing the certificates.]]
 
-]
 
-[heading Exceptions]
-
+[endsect]
 
-[variablelist
-
-[[boost::system::system_error][Thrown on failure. ]]
 
-]
+
+[section:async_receive stream_socket_service::async_receive]
+
+Start an asynchronous receive.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_receive(
+ implementation_type & impl,
+ const MutableBufferSequence & buffers,
+ socket_base::message_flags flags,
+ ReadHandler handler);
 
 
 
@@ -34008,44 +54960,104 @@
 
 
 
-[section:overload2 ssl::basic_context::add_verify_path (2 of 2 overloads)]
+[section:async_send stream_socket_service::async_send]
 
-Add a directory containing certificate authority files to be used for performing verification.
+Start an asynchronous send.
 
- boost::system::error_code add_verify_path(
- const std::string & path,
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_send(
+ implementation_type & impl,
+ const ConstBufferSequence & buffers,
+ socket_base::message_flags flags,
+ WriteHandler handler);
+
+
+
+[endsect]
+
+
+
+[section:at_mark stream_socket_service::at_mark]
+
+Determine whether the socket is at the out-of-band data mark.
+
+ bool at_mark(
+ const implementation_type & impl,
+ boost::system::error_code & ec) const;
+
+
+
+[endsect]
+
+
+
+[section:available stream_socket_service::available]
+
+Determine the number of bytes available for reading.
+
+ std::size_t available(
+ const implementation_type & impl,
+ boost::system::error_code & ec) const;
+
+
+
+[endsect]
+
+
+
+[section:bind stream_socket_service::bind]
+
+Bind the stream socket to the specified local endpoint.
+
+ boost::system::error_code bind(
+ implementation_type & impl,
+ const endpoint_type & endpoint,
       boost::system::error_code & ec);
 
 
-This function is used to specify the name of a directory containing certification authority certificates. Each file in the directory must contain a single certificate. The files must be named using the subject name's hash and an extension of ".0".
 
+[endsect]
 
-[heading Parameters]
-
 
-[variablelist
-
-[[path][The name of a directory containing the certificates.]]
 
-[[ec][Set to indicate what error occurred, if any. ]]
+[section:cancel stream_socket_service::cancel]
 
-]
+Cancel all asynchronous operations associated with the socket.
+
+ boost::system::error_code cancel(
+ implementation_type & impl,
+ boost::system::error_code & ec);
 
 
 
 [endsect]
 
 
+
+[section:close stream_socket_service::close]
+
+Close a stream socket implementation.
+
+ boost::system::error_code close(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
 [endsect]
 
 
-[section:basic_context ssl::basic_context::basic_context]
 
-Constructor.
+[section:connect stream_socket_service::connect]
 
- basic_context(
- boost::asio::io_service & io_service,
- method m);
+Connect the stream socket to the specified endpoint.
+
+ boost::system::error_code connect(
+ implementation_type & impl,
+ const endpoint_type & peer_endpoint,
+ boost::system::error_code & ec);
 
 
 
@@ -34053,14 +55065,12 @@
 
 
 
-[section:default_workarounds ssl::basic_context::default_workarounds]
-
-
-['Inherited from ssl::context_base.]
+[section:construct stream_socket_service::construct]
 
-Implement various bug workarounds.
+Construct a new stream socket implementation.
 
- static const int default_workarounds = implementation_defined;
+ void construct(
+ implementation_type & impl);
 
 
 
@@ -34068,102 +55078,82 @@
 
 
 
-[section:file_format ssl::basic_context::file_format]
-
+[section:destroy stream_socket_service::destroy]
 
-['Inherited from ssl::context_base.]
+Destroy a stream socket implementation.
 
-File format types.
+ void destroy(
+ implementation_type & impl);
 
- enum file_format
 
-[heading Values]
-[variablelist
 
- [
- [asn1]
- [ASN.1 file. ]
- ]
+[endsect]
 
- [
- [pem]
- [PEM file. ]
- ]
 
-]
 
+[section:endpoint_type stream_socket_service::endpoint_type]
 
+The endpoint type.
 
-[endsect]
+ typedef Protocol::endpoint endpoint_type;
 
 
 
-[section:impl ssl::basic_context::impl]
 
-Get the underlying implementation in the native type.
+[endsect]
 
- impl_type impl();
 
 
-This function may be used to obtain the underlying implementation of the context. This is intended to allow access to context functionality that is not otherwise provided.
+[section:get_io_service stream_socket_service::get_io_service]
 
 
-[endsect]
+['Inherited from io_service.]
 
+Get the io_service object that owns the service.
 
+ boost::asio::io_service & get_io_service();
 
-[section:impl_type ssl::basic_context::impl_type]
 
-The native implementation type of the locking dispatcher.
 
- typedef service_type::impl_type impl_type;
+[endsect]
 
 
 
+[section:get_option stream_socket_service::get_option]
 
-[endsect]
+Get a socket option.
 
+ template<
+ typename ``[link boost_asio.reference.GettableSocketOption GettableSocketOption]``>
+ boost::system::error_code get_option(
+ const implementation_type & impl,
+ GettableSocketOption & option,
+ boost::system::error_code & ec) const;
 
-[section:load_verify_file ssl::basic_context::load_verify_file]
 
-Load a certification authority file for performing verification.
 
- void ``[link boost_asio.reference.ssl__basic_context.load_verify_file.overload1 load_verify_file]``(
- const std::string & filename);
+[endsect]
 
- boost::system::error_code ``[link boost_asio.reference.ssl__basic_context.load_verify_file.overload2 load_verify_file]``(
- const std::string & filename,
- boost::system::error_code & ec);
 
 
-[section:overload1 ssl::basic_context::load_verify_file (1 of 2 overloads)]
+[section:id stream_socket_service::id]
 
-Load a certification authority file for performing verification.
+The unique service identifier.
 
- void load_verify_file(
- const std::string & filename);
+ static boost::asio::io_service::id id;
 
 
-This function is used to load one or more trusted certification authorities from a file.
 
+[endsect]
 
-[heading Parameters]
-
 
-[variablelist
-
-[[filename][The name of a file containing certification authority certificates in PEM format.]]
 
-]
+[section:implementation_type stream_socket_service::implementation_type]
 
-[heading Exceptions]
-
+The type of a stream socket implementation.
 
-[variablelist
-
-[[boost::system::system_error][Thrown on failure. ]]
+ typedef implementation_defined implementation_type;
 
-]
 
 
 
@@ -34171,110 +55161,71 @@
 
 
 
-[section:overload2 ssl::basic_context::load_verify_file (2 of 2 overloads)]
+[section:io_control stream_socket_service::io_control]
 
-Load a certification authority file for performing verification.
+Perform an IO control command on the socket.
 
- boost::system::error_code load_verify_file(
- const std::string & filename,
+ template<
+ typename ``[link boost_asio.reference.IoControlCommand IoControlCommand]``>
+ boost::system::error_code io_control(
+ implementation_type & impl,
+ IoControlCommand & command,
       boost::system::error_code & ec);
 
 
-This function is used to load the certificates for one or more trusted certification authorities from a file.
 
+[endsect]
 
-[heading Parameters]
-
 
-[variablelist
-
-[[filename][The name of a file containing certification authority certificates in PEM format.]]
 
-[[ec][Set to indicate what error occurred, if any. ]]
+[section:io_service stream_socket_service::io_service]
 
-]
 
+['Inherited from io_service.]
+
+(Deprecated: use get_io_service().) Get the io_service object that owns the service.
 
+ boost::asio::io_service & io_service();
 
-[endsect]
 
 
 [endsect]
 
 
-[section:method ssl::basic_context::method]
 
+[section:is_open stream_socket_service::is_open]
 
-['Inherited from ssl::context_base.]
+Determine whether the socket is open.
 
-Different methods supported by a context.
+ bool is_open(
+ const implementation_type & impl) const;
 
- enum method
 
-[heading Values]
-[variablelist
 
- [
- [sslv2]
- [Generic SSL version 2. ]
- ]
+[endsect]
 
- [
- [sslv2_client]
- [SSL version 2 client. ]
- ]
 
- [
- [sslv2_server]
- [SSL version 2 server. ]
- ]
 
- [
- [sslv3]
- [Generic SSL version 3. ]
- ]
+[section:local_endpoint stream_socket_service::local_endpoint]
 
- [
- [sslv3_client]
- [SSL version 3 client. ]
- ]
+Get the local endpoint.
 
- [
- [sslv3_server]
- [SSL version 3 server. ]
- ]
+ endpoint_type local_endpoint(
+ const implementation_type & impl,
+ boost::system::error_code & ec) const;
 
- [
- [tlsv1]
- [Generic TLS version 1. ]
- ]
 
- [
- [tlsv1_client]
- [TLS version 1 client. ]
- ]
 
- [
- [tlsv1_server]
- [TLS version 1 server. ]
- ]
+[endsect]
 
- [
- [sslv23]
- [Generic SSL/TLS. ]
- ]
 
- [
- [sslv23_client]
- [SSL/TLS client. ]
- ]
 
- [
- [sslv23_server]
- [SSL/TLS server. ]
- ]
+[section:native stream_socket_service::native]
 
-]
+Get the native socket implementation.
+
+ native_type native(
+ implementation_type & impl);
 
 
 
@@ -34282,14 +55233,12 @@
 
 
 
-[section:no_sslv2 ssl::basic_context::no_sslv2]
-
+[section:native_type stream_socket_service::native_type]
 
-['Inherited from ssl::context_base.]
+The native socket type.
 
-Disable SSL v2.
+ typedef implementation_defined native_type;
 
- static const int no_sslv2 = implementation_defined;
 
 
 
@@ -34297,14 +55246,14 @@
 
 
 
-[section:no_sslv3 ssl::basic_context::no_sslv3]
-
-
-['Inherited from ssl::context_base.]
+[section:open stream_socket_service::open]
 
-Disable SSL v3.
+Open a stream socket.
 
- static const int no_sslv3 = implementation_defined;
+ boost::system::error_code open(
+ implementation_type & impl,
+ const protocol_type & protocol,
+ boost::system::error_code & ec);
 
 
 
@@ -34312,14 +55261,12 @@
 
 
 
-[section:no_tlsv1 ssl::basic_context::no_tlsv1]
-
+[section:protocol_type stream_socket_service::protocol_type]
 
-['Inherited from ssl::context_base.]
+The protocol type.
 
-Disable TLS v1.
+ typedef Protocol protocol_type;
 
- static const int no_tlsv1 = implementation_defined;
 
 
 
@@ -34327,45 +55274,49 @@
 
 
 
-[section:options ssl::basic_context::options]
-
+[section:receive stream_socket_service::receive]
 
-['Inherited from ssl::context_base.]
+Receive some data from the peer.
 
-Bitmask type for SSL options.
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t receive(
+ implementation_type & impl,
+ const MutableBufferSequence & buffers,
+ socket_base::message_flags flags,
+ boost::system::error_code & ec);
 
- typedef int options;
 
 
+[endsect]
 
 
-[endsect]
 
+[section:remote_endpoint stream_socket_service::remote_endpoint]
 
+Get the remote endpoint.
 
-[section:password_purpose ssl::basic_context::password_purpose]
+ endpoint_type remote_endpoint(
+ const implementation_type & impl,
+ boost::system::error_code & ec) const;
 
 
-['Inherited from ssl::context_base.]
 
-Purpose of PEM password.
+[endsect]
 
- enum password_purpose
 
-[heading Values]
-[variablelist
 
- [
- [for_reading]
- [The password is needed for reading/decryption. ]
- ]
+[section:send stream_socket_service::send]
 
- [
- [for_writing]
- [The password is needed for writing/encryption. ]
- ]
+Send the given data to the peer.
 
-]
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t send(
+ implementation_type & impl,
+ const ConstBufferSequence & buffers,
+ socket_base::message_flags flags,
+ boost::system::error_code & ec);
 
 
 
@@ -34373,236 +55324,280 @@
 
 
 
-[section:service_type ssl::basic_context::service_type]
-
-The type of the service that will be used to provide context operations.
+[section:set_option stream_socket_service::set_option]
 
- typedef Service service_type;
+Set a socket option.
 
+ template<
+ typename ``[link boost_asio.reference.SettableSocketOption SettableSocketOption]``>
+ boost::system::error_code set_option(
+ implementation_type & impl,
+ const SettableSocketOption & option,
+ boost::system::error_code & ec);
 
 
 
 [endsect]
 
 
-[section:set_options ssl::basic_context::set_options]
 
-Set options on the context.
+[section:shutdown stream_socket_service::shutdown]
 
- void ``[link boost_asio.reference.ssl__basic_context.set_options.overload1 set_options]``(
- options o);
+Disable sends or receives on the socket.
 
- boost::system::error_code ``[link boost_asio.reference.ssl__basic_context.set_options.overload2 set_options]``(
- options o,
+ boost::system::error_code shutdown(
+ implementation_type & impl,
+ socket_base::shutdown_type what,
       boost::system::error_code & ec);
 
 
-[section:overload1 ssl::basic_context::set_options (1 of 2 overloads)]
 
-Set options on the context.
+[endsect]
 
- void set_options(
- options o);
 
 
-This function may be used to configure the SSL options used by the context.
+[section:shutdown_service stream_socket_service::shutdown_service]
 
+Destroy all user-defined handler objects owned by the service.
 
-[heading Parameters]
-
+ void shutdown_service();
 
-[variablelist
-
-[[o][A bitmask of options. The available option values are defined in the context\_base class. The options are bitwise-ored with any existing value for the options.]]
 
-]
 
-[heading Exceptions]
-
+[endsect]
 
-[variablelist
-
-[[boost::system::system_error][Thrown on failure. ]]
 
-]
 
+[section:stream_socket_service stream_socket_service::stream_socket_service]
 
+Construct a new stream socket service for the specified io_service.
 
-[endsect]
+ stream_socket_service(
+ boost::asio::io_service & io_service);
 
 
 
-[section:overload2 ssl::basic_context::set_options (2 of 2 overloads)]
+[endsect]
 
-Set options on the context.
 
- boost::system::error_code set_options(
- options o,
- boost::system::error_code & ec);
 
+[endsect]
 
-This function may be used to configure the SSL options used by the context.
 
+[section:streambuf streambuf]
 
-[heading Parameters]
-
+Typedef for the typical usage of basic_streambuf.
 
-[variablelist
-
-[[o][A bitmask of options. The available option values are defined in the context\_base class. The options are bitwise-ored with any existing value for the options.]]
+ typedef basic_streambuf streambuf;
 
-[[ec][Set to indicate what error occurred, if any. ]]
 
-]
+[heading Types]
+[table
+ [[Name][Description]]
 
+ [
 
+ [[link boost_asio.reference.basic_streambuf.const_buffers_type [*const_buffers_type]]]
+ [The type used to represent the get area as a list of buffers. ]
+
+ ]
 
-[endsect]
+ [
 
+ [[link boost_asio.reference.basic_streambuf.mutable_buffers_type [*mutable_buffers_type]]]
+ [The type used to represent the put area as a list of buffers. ]
+
+ ]
 
-[endsect]
+]
 
-[section:set_password_callback ssl::basic_context::set_password_callback]
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
-Set the password callback.
+ [
+ [[link boost_asio.reference.basic_streambuf.basic_streambuf [*basic_streambuf]]]
+ [Construct a buffer with a specified maximum size. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_streambuf.commit [*commit]]]
+ [Move the start of the put area by the specified number of characters. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_streambuf.consume [*consume]]]
+ [Move the start of the get area by the specified number of characters. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_streambuf.data [*data]]]
+ [Get a list of buffers that represents the get area. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_streambuf.max_size [*max_size]]]
+ [Return the maximum size of the buffer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_streambuf.prepare [*prepare]]]
+ [Get a list of buffers that represents the put area, with the given size. ]
+ ]
+
+ [
+ [[link boost_asio.reference.basic_streambuf.size [*size]]]
+ [Return the size of the get area in characters. ]
+ ]
+
+]
 
- template<
- typename PasswordCallback>
- void ``[link boost_asio.reference.ssl__basic_context.set_password_callback.overload1 set_password_callback]``(
- PasswordCallback callback);
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
 
- template<
- typename PasswordCallback>
- boost::system::error_code ``[link boost_asio.reference.ssl__basic_context.set_password_callback.overload2 set_password_callback]``(
- PasswordCallback callback,
- boost::system::error_code & ec);
+ [
+ [[link boost_asio.reference.basic_streambuf.overflow [*overflow]]]
+ []
+ ]
+
+ [
+ [[link boost_asio.reference.basic_streambuf.reserve [*reserve]]]
+ []
+ ]
+
+ [
+ [[link boost_asio.reference.basic_streambuf.underflow [*underflow]]]
+ []
+ ]
+
+]
 
 
-[section:overload1 ssl::basic_context::set_password_callback (1 of 2 overloads)]
 
-Set the password callback.
+[endsect]
 
- template<
- typename PasswordCallback>
- void set_password_callback(
- PasswordCallback callback);
 
+[section:time_traits_lt__ptime__gt_ time_traits< boost::posix_time::ptime >]
 
-This function is used to specify a callback function to obtain password information about an encrypted key in PEM format.
+Time traits specialised for posix_time.
 
+ template<>
+ struct time_traits< boost::posix_time::ptime >
 
-[heading Parameters]
-
 
-[variablelist
-
-[[callback][The function object to be used for obtaining the password. The function signature of the handler must be:
-``
- std::string password_callback(
- std::size_t max_length, // The maximum size for a password.
- password_purpose purpose // Whether password is for reading or writing.
- );
+[heading Types]
+[table
+ [[Name][Description]]
 
-``
-The return value of the callback is a string containing the password.]]
+ [
 
-]
+ [[link boost_asio.reference.time_traits_lt__ptime__gt_.duration_type [*duration_type]]]
+ [The duration type. ]
+
+ ]
 
-[heading Exceptions]
-
+ [
 
-[variablelist
+ [[link boost_asio.reference.time_traits_lt__ptime__gt_.time_type [*time_type]]]
+ [The time type. ]
   
-[[boost::system::system_error][Thrown on failure. ]]
+ ]
 
 ]
 
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.time_traits_lt__ptime__gt_.add [*add]]]
+ [Add a duration to a time. ]
+ ]
+
+ [
+ [[link boost_asio.reference.time_traits_lt__ptime__gt_.less_than [*less_than]]]
+ [Test whether one time is less than another. ]
+ ]
+
+ [
+ [[link boost_asio.reference.time_traits_lt__ptime__gt_.now [*now]]]
+ [Get the current time. ]
+ ]
+
+ [
+ [[link boost_asio.reference.time_traits_lt__ptime__gt_.subtract [*subtract]]]
+ [Subtract one time from another. ]
+ ]
+
+ [
+ [[link boost_asio.reference.time_traits_lt__ptime__gt_.to_posix_duration [*to_posix_duration]]]
+ [Convert to POSIX duration type. ]
+ ]
+
+]
 
-[endsect]
-
-
-
-[section:overload2 ssl::basic_context::set_password_callback (2 of 2 overloads)]
-
-Set the password callback.
 
- template<
- typename PasswordCallback>
- boost::system::error_code set_password_callback(
- PasswordCallback callback,
- boost::system::error_code & ec);
+[section:add time_traits< boost::posix_time::ptime >::add]
 
+Add a duration to a time.
 
-This function is used to specify a callback function to obtain password information about an encrypted key in PEM format.
+ static time_type add(
+ const time_type & t,
+ const duration_type & d);
 
 
-[heading Parameters]
-
 
-[variablelist
-
-[[callback][The function object to be used for obtaining the password. The function signature of the handler must be:
-``
- std::string password_callback(
- std::size_t max_length, // The maximum size for a password.
- password_purpose purpose // Whether password is for reading or writing.
- );
+[endsect]
 
-``
-The return value of the callback is a string containing the password.]]
 
-[[ec][Set to indicate what error occurred, if any. ]]
 
-]
+[section:duration_type time_traits< boost::posix_time::ptime >::duration_type]
 
+The duration type.
+
+ typedef boost::posix_time::time_duration duration_type;
 
 
-[endsect]
 
 
 [endsect]
 
-[section:set_verify_mode ssl::basic_context::set_verify_mode]
 
-Set the peer verification mode.
 
- void ``[link boost_asio.reference.ssl__basic_context.set_verify_mode.overload1 set_verify_mode]``(
- verify_mode v);
+[section:less_than time_traits< boost::posix_time::ptime >::less_than]
 
- boost::system::error_code ``[link boost_asio.reference.ssl__basic_context.set_verify_mode.overload2 set_verify_mode]``(
- verify_mode v,
- boost::system::error_code & ec);
+Test whether one time is less than another.
 
+ static bool less_than(
+ const time_type & t1,
+ const time_type & t2);
 
-[section:overload1 ssl::basic_context::set_verify_mode (1 of 2 overloads)]
 
-Set the peer verification mode.
 
- void set_verify_mode(
- verify_mode v);
+[endsect]
 
 
-This function may be used to configure the peer verification mode used by the context.
 
+[section:now time_traits< boost::posix_time::ptime >::now]
 
-[heading Parameters]
-
+Get the current time.
 
-[variablelist
-
-[[v][A bitmask of peer verification modes. The available verify\_mode values are defined in the context\_base class.]]
+ static time_type now();
 
-]
 
-[heading Exceptions]
-
 
-[variablelist
-
-[[boost::system::system_error][Thrown on failure. ]]
+[endsect]
 
-]
+
+
+[section:subtract time_traits< boost::posix_time::ptime >::subtract]
+
+Subtract one time from another.
+
+ static duration_type subtract(
+ const time_type & t1,
+ const time_type & t2);
 
 
 
@@ -34610,91 +55605,103 @@
 
 
 
-[section:overload2 ssl::basic_context::set_verify_mode (2 of 2 overloads)]
+[section:time_type time_traits< boost::posix_time::ptime >::time_type]
 
-Set the peer verification mode.
+The time type.
 
- boost::system::error_code set_verify_mode(
- verify_mode v,
- boost::system::error_code & ec);
+ typedef boost::posix_time::ptime time_type;
 
 
-This function may be used to configure the peer verification mode used by the context.
 
 
-[heading Parameters]
-
+[endsect]
 
-[variablelist
-
-[[v][A bitmask of peer verification modes. The available verify\_mode values are defined in the context\_base class.]]
 
-[[ec][Set to indicate what error occurred, if any. ]]
 
-]
+[section:to_posix_duration time_traits< boost::posix_time::ptime >::to_posix_duration]
+
+Convert to POSIX duration type.
+
+ static boost::posix_time::time_duration to_posix_duration(
+ const duration_type & d);
 
 
 
 [endsect]
 
 
+
 [endsect]
 
 
-[section:single_dh_use ssl::basic_context::single_dh_use]
+[section:transfer_all transfer_all]
 
+Return a completion condition function object that indicates that a read or write operation should continue until all of the data has been transferred, or until an error occurs.
 
-['Inherited from ssl::context_base.]
+ unspecified transfer_all();
 
-Always create a new key when using tmp_dh parameters.
 
- static const int single_dh_use = implementation_defined;
+This function is used to create an object, of unspecified type, that meets CompletionCondition requirements.
 
 
+[heading Example]
+
+Reading until a buffer is full:
 
-[endsect]
+ boost::array<char, 128> buf;
+ boost::system::error_code ec;
+ std::size_t n = boost::asio::read(
+ sock, boost::asio::buffer(buf),
+ boost::asio::transfer_all(), ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
+ else
+ {
+ // n == 128
+ }
 
 
-[section:use_certificate_chain_file ssl::basic_context::use_certificate_chain_file]
 
-Use a certificate chain from a file.
 
- void ``[link boost_asio.reference.ssl__basic_context.use_certificate_chain_file.overload1 use_certificate_chain_file]``(
- const std::string & filename);
 
- boost::system::error_code ``[link boost_asio.reference.ssl__basic_context.use_certificate_chain_file.overload2 use_certificate_chain_file]``(
- const std::string & filename,
- boost::system::error_code & ec);
 
+[endsect]
 
-[section:overload1 ssl::basic_context::use_certificate_chain_file (1 of 2 overloads)]
 
-Use a certificate chain from a file.
 
- void use_certificate_chain_file(
- const std::string & filename);
+[section:transfer_at_least transfer_at_least]
 
+Return a completion condition function object that indicates that a read or write operation should continue until a minimum number of bytes has been transferred, or until an error occurs.
 
-This function is used to load a certificate chain into the context from a file.
+ unspecified transfer_at_least(
+ std::size_t minimum);
 
 
-[heading Parameters]
-
+This function is used to create an object, of unspecified type, that meets CompletionCondition requirements.
 
-[variablelist
+
+[heading Example]
   
-[[filename][The name of the file containing the certificate. The file must use the PEM format.]]
+Reading until a buffer is full or contains at least 64 bytes:
 
-]
+ boost::array<char, 128> buf;
+ boost::system::error_code ec;
+ std::size_t n = boost::asio::read(
+ sock, boost::asio::buffer(buf),
+ boost::asio::transfer_at_least(64), ec);
+ if (ec)
+ {
+ // An error occurred.
+ }
+ else
+ {
+ // n >= 64 && n <= 128
+ }
 
-[heading Exceptions]
-
 
-[variablelist
-
-[[boost::system::system_error][Thrown on failure. ]]
 
-]
 
 
 
@@ -34702,16 +55709,17 @@
 
 
 
-[section:overload2 ssl::basic_context::use_certificate_chain_file (2 of 2 overloads)]
+[section:use_service use_service]
 
-Use a certificate chain from a file.
 
- boost::system::error_code use_certificate_chain_file(
- const std::string & filename,
- boost::system::error_code & ec);
 
+ template<
+ typename ``[link boost_asio.reference.Service Service]``>
+ Service & use_service(
+ io_service & ios);
 
-This function is used to load a certificate chain into the context from a file.
+
+This function is used to locate a service object that corresponds to the given service type. If there is no existing implementation of the service, then the io_service will create a new instance of the service.
 
 
 [heading Parameters]
@@ -34719,147 +55727,220 @@
 
 [variablelist
   
-[[filename][The name of the file containing the certificate. The file must use the PEM format.]]
-
-[[ec][Set to indicate what error occurred, if any. ]]
+[[ios][The io\_service object that owns the service.]]
 
 ]
 
+[heading Return Value]
+
+The service interface implementing the specified service type. Ownership of the service interface is not transferred to the caller.
 
 
-[endsect]
-
 
 [endsect]
 
-[section:use_certificate_file ssl::basic_context::use_certificate_file]
 
-Use a certificate from a file.
+[section:windows__basic_handle windows::basic_handle]
 
- void ``[link boost_asio.reference.ssl__basic_context.use_certificate_file.overload1 use_certificate_file]``(
- const std::string & filename,
- file_format format);
+Provides Windows handle functionality.
 
- boost::system::error_code ``[link boost_asio.reference.ssl__basic_context.use_certificate_file.overload2 use_certificate_file]``(
- const std::string & filename,
- file_format format,
- boost::system::error_code & ec);
+ template<
+ typename ``[link boost_asio.reference.HandleService HandleService]``>
+ class basic_handle :
+ public basic_io_object< HandleService >
 
 
-[section:overload1 ssl::basic_context::use_certificate_file (1 of 2 overloads)]
+[heading Types]
+[table
+ [[Name][Description]]
 
-Use a certificate from a file.
+ [
 
- void use_certificate_file(
- const std::string & filename,
- file_format format);
+ [[link boost_asio.reference.windows__basic_handle.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
 
+ [
 
-This function is used to load a certificate into the context from a file.
+ [[link boost_asio.reference.windows__basic_handle.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_handle is always the lowest layer. ]
+
+ ]
 
+ [
 
-[heading Parameters]
-
+ [[link boost_asio.reference.windows__basic_handle.native_type [*native_type]]]
+ [The native representation of a handle. ]
+
+ ]
 
-[variablelist
+ [
+
+ [[link boost_asio.reference.windows__basic_handle.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
   
-[[filename][The name of the file containing the certificate.]]
+ ]
 
-[[format][The file format (ASN.1 or PEM).]]
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.windows__basic_handle.assign [*assign]]]
+ [Assign an existing native handle to the handle. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_handle.basic_handle [*basic_handle]]]
+ [Construct a basic_handle without opening it. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_handle.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the handle. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_handle.close [*close]]]
+ [Close the handle. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_handle.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_handle.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_handle.is_open [*is_open]]]
+ [Determine whether the handle is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_handle.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_handle.native [*native]]]
+ [Get the native handle representation. ]
+ ]
+
 ]
 
-[heading Exceptions]
-
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
 
-[variablelist
+ [
+ [[link boost_asio.reference.windows__basic_handle._basic_handle [*~basic_handle]]]
+ [Protected destructor to prevent deletion through this type. ]
+ ]
   
-[[boost::system::system_error][Thrown on failure. ]]
+]
+
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.windows__basic_handle.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_handle.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
 
 ]
 
+The windows::basic_handle class template provides the ability to wrap a Windows handle.
 
 
-[endsect]
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
 
 
+[section:assign windows::basic_handle::assign]
 
-[section:overload2 ssl::basic_context::use_certificate_file (2 of 2 overloads)]
+Assign an existing native handle to the handle.
 
-Use a certificate from a file.
+ void ``[link boost_asio.reference.windows__basic_handle.assign.overload1 assign]``(
+ const native_type & native_handle);
 
- boost::system::error_code use_certificate_file(
- const std::string & filename,
- file_format format,
+ boost::system::error_code ``[link boost_asio.reference.windows__basic_handle.assign.overload2 assign]``(
+ const native_type & native_handle,
       boost::system::error_code & ec);
 
 
-This function is used to load a certificate into the context from a file.
+[section:overload1 windows::basic_handle::assign (1 of 2 overloads)]
 
+Assign an existing native handle to the handle.
 
-[heading Parameters]
-
+ void assign(
+ const native_type & native_handle);
 
-[variablelist
-
-[[filename][The name of the file containing the certificate.]]
 
-[[format][The file format (ASN.1 or PEM).]]
 
-[[ec][Set to indicate what error occurred, if any. ]]
+[endsect]
 
-]
 
 
+[section:overload2 windows::basic_handle::assign (2 of 2 overloads)]
 
-[endsect]
+Assign an existing native handle to the handle.
 
+ boost::system::error_code assign(
+ const native_type & native_handle,
+ boost::system::error_code & ec);
 
-[endsect]
 
-[section:use_private_key_file ssl::basic_context::use_private_key_file]
 
-Use a private key from a file.
+[endsect]
 
- void ``[link boost_asio.reference.ssl__basic_context.use_private_key_file.overload1 use_private_key_file]``(
- const std::string & filename,
- file_format format);
 
- boost::system::error_code ``[link boost_asio.reference.ssl__basic_context.use_private_key_file.overload2 use_private_key_file]``(
- const std::string & filename,
- file_format format,
- boost::system::error_code & ec);
+[endsect]
 
+[section:basic_handle windows::basic_handle::basic_handle]
 
-[section:overload1 ssl::basic_context::use_private_key_file (1 of 2 overloads)]
+Construct a basic_handle without opening it.
 
-Use a private key from a file.
+ ``[link boost_asio.reference.windows__basic_handle.basic_handle.overload1 basic_handle]``(
+ boost::asio::io_service & io_service);
 
- void use_private_key_file(
- const std::string & filename,
- file_format format);
+ ``[link boost_asio.reference.windows__basic_handle.basic_handle.overload2 basic_handle]``(
+ boost::asio::io_service & io_service,
+ const native_type & native_handle);
 
 
-This function is used to load a private key into the context from a file.
+[section:overload1 windows::basic_handle::basic_handle (1 of 2 overloads)]
 
+Construct a basic_handle without opening it.
 
-[heading Parameters]
-
+ basic_handle(
+ boost::asio::io_service & io_service);
 
-[variablelist
-
-[[filename][The name of the file containing the private key.]]
 
-[[format][The file format (ASN.1 or PEM).]]
+This constructor creates a handle without opening it.
 
-]
 
-[heading Exceptions]
+[heading Parameters]
     
 
 [variablelist
   
-[[boost::system::system_error][Thrown on failure. ]]
+[[io_service][The io\_service object that the handle will use to dispatch handlers for any asynchronous operations performed on the handle. ]]
 
 ]
 
@@ -34869,17 +55950,16 @@
 
 
 
-[section:overload2 ssl::basic_context::use_private_key_file (2 of 2 overloads)]
+[section:overload2 windows::basic_handle::basic_handle (2 of 2 overloads)]
 
-Use a private key from a file.
+Construct a basic_handle on an existing native handle.
 
- boost::system::error_code use_private_key_file(
- const std::string & filename,
- file_format format,
- boost::system::error_code & ec);
+ basic_handle(
+ boost::asio::io_service & io_service,
+ const native_type & native_handle);
 
 
-This function is used to load a private key into the context from a file.
+This constructor creates a handle object to hold an existing native handle.
 
 
 [heading Parameters]
@@ -34887,11 +55967,18 @@
 
 [variablelist
   
-[[filename][The name of the file containing the private key.]]
+[[io_service][The io\_service object that the handle will use to dispatch handlers for any asynchronous operations performed on the handle.]]
 
-[[format][The file format (ASN.1 or PEM).]]
+[[native_handle][A native handle.]]
 
-[[ec][Set to indicate what error occurred, if any. ]]
+]
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
 
 ]
 
@@ -34902,42 +55989,25 @@
 
 [endsect]
 
-[section:use_rsa_private_key_file ssl::basic_context::use_rsa_private_key_file]
+[section:cancel windows::basic_handle::cancel]
 
-Use an RSA private key from a file.
+Cancel all asynchronous operations associated with the handle.
 
- void ``[link boost_asio.reference.ssl__basic_context.use_rsa_private_key_file.overload1 use_rsa_private_key_file]``(
- const std::string & filename,
- file_format format);
+ void ``[link boost_asio.reference.windows__basic_handle.cancel.overload1 cancel]``();
 
- boost::system::error_code ``[link boost_asio.reference.ssl__basic_context.use_rsa_private_key_file.overload2 use_rsa_private_key_file]``(
- const std::string & filename,
- file_format format,
+ boost::system::error_code ``[link boost_asio.reference.windows__basic_handle.cancel.overload2 cancel]``(
       boost::system::error_code & ec);
 
 
-[section:overload1 ssl::basic_context::use_rsa_private_key_file (1 of 2 overloads)]
-
-Use an RSA private key from a file.
-
- void use_rsa_private_key_file(
- const std::string & filename,
- file_format format);
-
-
-This function is used to load an RSA private key into the context from a file.
+[section:overload1 windows::basic_handle::cancel (1 of 2 overloads)]
 
+Cancel all asynchronous operations associated with the handle.
 
-[heading Parameters]
-
+ void cancel();
 
-[variablelist
-
-[[filename][The name of the file containing the RSA private key.]]
 
-[[format][The file format (ASN.1 or PEM).]]
+This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the boost::asio::error::operation\_aborted error.
 
-]
 
 [heading Exceptions]
     
@@ -34954,17 +56024,15 @@
 
 
 
-[section:overload2 ssl::basic_context::use_rsa_private_key_file (2 of 2 overloads)]
+[section:overload2 windows::basic_handle::cancel (2 of 2 overloads)]
 
-Use an RSA private key from a file.
+Cancel all asynchronous operations associated with the handle.
 
- boost::system::error_code use_rsa_private_key_file(
- const std::string & filename,
- file_format format,
+ boost::system::error_code cancel(
       boost::system::error_code & ec);
 
 
-This function is used to load an RSA private key into the context from a file.
+This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the boost::asio::error::operation\_aborted error.
 
 
 [heading Parameters]
@@ -34972,10 +56040,6 @@
 
 [variablelist
   
-[[filename][The name of the file containing the RSA private key.]]
-
-[[format][The file format (ASN.1 or PEM).]]
-
 [[ec][Set to indicate what error occurred, if any. ]]
 
 ]
@@ -34987,37 +56051,25 @@
 
 [endsect]
 
-[section:use_tmp_dh_file ssl::basic_context::use_tmp_dh_file]
+[section:close windows::basic_handle::close]
 
-Use the specified file to obtain the temporary Diffie-Hellman parameters.
+Close the handle.
 
- void ``[link boost_asio.reference.ssl__basic_context.use_tmp_dh_file.overload1 use_tmp_dh_file]``(
- const std::string & filename);
+ void ``[link boost_asio.reference.windows__basic_handle.close.overload1 close]``();
 
- boost::system::error_code ``[link boost_asio.reference.ssl__basic_context.use_tmp_dh_file.overload2 use_tmp_dh_file]``(
- const std::string & filename,
+ boost::system::error_code ``[link boost_asio.reference.windows__basic_handle.close.overload2 close]``(
       boost::system::error_code & ec);
 
 
-[section:overload1 ssl::basic_context::use_tmp_dh_file (1 of 2 overloads)]
-
-Use the specified file to obtain the temporary Diffie-Hellman parameters.
-
- void use_tmp_dh_file(
- const std::string & filename);
-
+[section:overload1 windows::basic_handle::close (1 of 2 overloads)]
 
-This function is used to load Diffie-Hellman parameters into the context from a file.
+Close the handle.
 
+ void close();
 
-[heading Parameters]
-
 
-[variablelist
-
-[[filename][The name of the file containing the Diffie-Hellman parameters. The file must use the PEM format.]]
+This function is used to close the handle. Any asynchronous read or write operations will be cancelled immediately, and will complete with the boost::asio::error::operation\_aborted error.
 
-]
 
 [heading Exceptions]
     
@@ -35034,16 +56086,15 @@
 
 
 
-[section:overload2 ssl::basic_context::use_tmp_dh_file (2 of 2 overloads)]
+[section:overload2 windows::basic_handle::close (2 of 2 overloads)]
 
-Use the specified file to obtain the temporary Diffie-Hellman parameters.
+Close the handle.
 
- boost::system::error_code use_tmp_dh_file(
- const std::string & filename,
+ boost::system::error_code close(
       boost::system::error_code & ec);
 
 
-This function is used to load Diffie-Hellman parameters into the context from a file.
+This function is used to close the handle. Any asynchronous read or write operations will be cancelled immediately, and will complete with the boost::asio::error::operation\_aborted error.
 
 
 [heading Parameters]
@@ -35051,8 +56102,6 @@
 
 [variablelist
   
-[[filename][The name of the file containing the Diffie-Hellman parameters. The file must use the PEM format.]]
-
 [[ec][Set to indicate what error occurred, if any. ]]
 
 ]
@@ -35065,14 +56114,22 @@
 [endsect]
 
 
-[section:verify_client_once ssl::basic_context::verify_client_once]
+[section:get_io_service windows::basic_handle::get_io_service]
 
 
-['Inherited from ssl::context_base.]
+['Inherited from basic_io_object.]
 
-Do not request client certificate on renegotiation. Ignored unless verify_peer is set.
+Get the io_service associated with the object.
+
+ boost::asio::io_service & get_io_service();
 
- static const int verify_client_once = implementation_defined;
+
+This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
+
+
+[heading Return Value]
+
+A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
 
 
 
@@ -35080,14 +56137,14 @@
 
 
 
-[section:verify_fail_if_no_peer_cert ssl::basic_context::verify_fail_if_no_peer_cert]
+[section:implementation windows::basic_handle::implementation]
 
 
-['Inherited from ssl::context_base.]
+['Inherited from basic_io_object.]
 
-Fail verification if the peer has no certificate. Ignored unless verify_peer is set.
+The underlying implementation of the I/O object.
 
- static const int verify_fail_if_no_peer_cert = implementation_defined;
+ implementation_type implementation;
 
 
 
@@ -35095,14 +56152,14 @@
 
 
 
-[section:verify_mode ssl::basic_context::verify_mode]
+[section:implementation_type windows::basic_handle::implementation_type]
 
 
-['Inherited from ssl::context_base.]
+['Inherited from basic_io_object.]
 
-Bitmask type for peer verification.
+The underlying implementation type of I/O object.
 
- typedef int verify_mode;
+ typedef service_type::implementation_type implementation_type;
 
 
 
@@ -35111,29 +56168,34 @@
 
 
 
-[section:verify_none ssl::basic_context::verify_none]
+[section:io_service windows::basic_handle::io_service]
 
 
-['Inherited from ssl::context_base.]
+['Inherited from basic_io_object.]
 
-No verification.
+(Deprecated: use get_io_service().) Get the io_service associated with the object.
 
- static const int verify_none = implementation_defined;
+ boost::asio::io_service & io_service();
 
 
+This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
 
-[endsect]
 
+[heading Return Value]
+
+A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
 
 
-[section:verify_peer ssl::basic_context::verify_peer]
 
+[endsect]
 
-['Inherited from ssl::context_base.]
 
-Verify the peer.
 
- static const int verify_peer = implementation_defined;
+[section:is_open windows::basic_handle::is_open]
+
+Determine whether the handle is open.
+
+ bool is_open() const;
 
 
 
@@ -35141,26 +56203,31 @@
 
 
 
-[section:_basic_context ssl::basic_context::~basic_context]
+[section:lowest_layer windows::basic_handle::lowest_layer]
 
-Destructor.
+Get a reference to the lowest layer.
 
- ~basic_context();
+ lowest_layer_type & lowest_layer();
 
 
+This function returns a reference to the lowest layer in a stack of layers. Since a basic_handle cannot contain any further layers, it simply returns a reference to itself.
 
-[endsect]
+
+[heading Return Value]
+
+A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
 
 
 
 [endsect]
 
 
-[section:ssl__context ssl::context]
 
-Typedef for the typical usage of context.
+[section:lowest_layer_type windows::basic_handle::lowest_layer_type]
 
- typedef basic_context< context_service > context;
+A basic_handle is always the lowest layer.
+
+ typedef basic_handle< HandleService > lowest_layer_type;
 
 
 [heading Types]
@@ -35169,50 +56236,29 @@
 
   [
 
- [[link boost_asio.reference.ssl__basic_context.file_format [*file_format]]]
- [File format types. ]
-
- ]
-
- [
-
- [[link boost_asio.reference.ssl__basic_context.impl_type [*impl_type]]]
- [The native implementation type of the locking dispatcher. ]
-
- ]
-
- [
-
- [[link boost_asio.reference.ssl__basic_context.method [*method]]]
- [Different methods supported by a context. ]
-
- ]
-
- [
-
- [[link boost_asio.reference.ssl__basic_context.options [*options]]]
- [Bitmask type for SSL options. ]
+ [[link boost_asio.reference.windows__basic_handle.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.ssl__basic_context.password_purpose [*password_purpose]]]
- [Purpose of PEM password. ]
+ [[link boost_asio.reference.windows__basic_handle.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_handle is always the lowest layer. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.ssl__basic_context.service_type [*service_type]]]
- [The type of the service that will be used to provide context operations. ]
+ [[link boost_asio.reference.windows__basic_handle.native_type [*native_type]]]
+ [The native representation of a handle. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.ssl__basic_context.verify_mode [*verify_mode]]]
- [Bitmask type for peer verification. ]
+ [[link boost_asio.reference.windows__basic_handle.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
   
   ]
 
@@ -35223,260 +56269,158 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.ssl__basic_context.add_verify_path [*add_verify_path]]]
- [Add a directory containing certificate authority files to be used for performing verification. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__basic_context.basic_context [*basic_context]]]
- [Constructor. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__basic_context.impl [*impl]]]
- [Get the underlying implementation in the native type. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__basic_context.load_verify_file [*load_verify_file]]]
- [Load a certification authority file for performing verification. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__basic_context.set_options [*set_options]]]
- [Set options on the context. ]
+ [[link boost_asio.reference.windows__basic_handle.assign [*assign]]]
+ [Assign an existing native handle to the handle. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__basic_context.set_password_callback [*set_password_callback]]]
- [Set the password callback. ]
+ [[link boost_asio.reference.windows__basic_handle.basic_handle [*basic_handle]]]
+ [Construct a basic_handle without opening it. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__basic_context.set_verify_mode [*set_verify_mode]]]
- [Set the peer verification mode. ]
+ [[link boost_asio.reference.windows__basic_handle.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the handle. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__basic_context.use_certificate_chain_file [*use_certificate_chain_file]]]
- [Use a certificate chain from a file. ]
+ [[link boost_asio.reference.windows__basic_handle.close [*close]]]
+ [Close the handle. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__basic_context.use_certificate_file [*use_certificate_file]]]
- [Use a certificate from a file. ]
+ [[link boost_asio.reference.windows__basic_handle.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__basic_context.use_private_key_file [*use_private_key_file]]]
- [Use a private key from a file. ]
+ [[link boost_asio.reference.windows__basic_handle.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__basic_context.use_rsa_private_key_file [*use_rsa_private_key_file]]]
- [Use an RSA private key from a file. ]
+ [[link boost_asio.reference.windows__basic_handle.is_open [*is_open]]]
+ [Determine whether the handle is open. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__basic_context.use_tmp_dh_file [*use_tmp_dh_file]]]
- [Use the specified file to obtain the temporary Diffie-Hellman parameters. ]
+ [[link boost_asio.reference.windows__basic_handle.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__basic_context._basic_context [*~basic_context]]]
- [Destructor. ]
+ [[link boost_asio.reference.windows__basic_handle.native [*native]]]
+ [Get the native handle representation. ]
   ]
   
 ]
 
-[heading Data Members]
+[heading Protected Member Functions]
 [table
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.ssl__basic_context.default_workarounds [*default_workarounds]]]
- [Implement various bug workarounds. ]
+ [[link boost_asio.reference.windows__basic_handle._basic_handle [*~basic_handle]]]
+ [Protected destructor to prevent deletion through this type. ]
   ]
+
+]
 
- [
- [[link boost_asio.reference.ssl__basic_context.no_sslv2 [*no_sslv2]]]
- [Disable SSL v2. ]
- ]
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
 
   [
- [[link boost_asio.reference.ssl__basic_context.no_sslv3 [*no_sslv3]]]
- [Disable SSL v3. ]
+ [[link boost_asio.reference.windows__basic_handle.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
   ]
 
   [
- [[link boost_asio.reference.ssl__basic_context.no_tlsv1 [*no_tlsv1]]]
- [Disable TLS v1. ]
+ [[link boost_asio.reference.windows__basic_handle.service [*service]]]
+ [The service associated with the I/O object. ]
   ]
 
- [
- [[link boost_asio.reference.ssl__basic_context.single_dh_use [*single_dh_use]]]
- [Always create a new key when using tmp_dh parameters. ]
- ]
+]
 
- [
- [[link boost_asio.reference.ssl__basic_context.verify_client_once [*verify_client_once]]]
- [Do not request client certificate on renegotiation. Ignored unless verify_peer is set. ]
- ]
+The windows::basic_handle class template provides the ability to wrap a Windows handle.
 
- [
- [[link boost_asio.reference.ssl__basic_context.verify_fail_if_no_peer_cert [*verify_fail_if_no_peer_cert]]]
- [Fail verification if the peer has no certificate. Ignored unless verify_peer is set. ]
- ]
 
- [
- [[link boost_asio.reference.ssl__basic_context.verify_none [*verify_none]]]
- [No verification. ]
- ]
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
- [
- [[link boost_asio.reference.ssl__basic_context.verify_peer [*verify_peer]]]
- [Verify the peer. ]
- ]
+[*Shared] [*objects:] Unsafe.
 
-]
 
 
 
 [endsect]
 
 
-[section:ssl__context_base ssl::context_base]
 
-The context_base class is used as a base for the basic_context class template so that we have a common place to define various enums.
+[section:native windows::basic_handle::native]
 
- class context_base
+Get the native handle representation.
 
+ native_type native();
 
-[heading Types]
-[table
- [[Name][Description]]
 
- [
+This function may be used to obtain the underlying representation of the handle. This is intended to allow access to native handle functionality that is not otherwise provided.
 
- [[link boost_asio.reference.ssl__context_base.file_format [*file_format]]]
- [File format types. ]
-
- ]
 
- [
+[endsect]
 
- [[link boost_asio.reference.ssl__context_base.method [*method]]]
- [Different methods supported by a context. ]
-
- ]
 
- [
 
- [[link boost_asio.reference.ssl__context_base.options [*options]]]
- [Bitmask type for SSL options. ]
-
- ]
+[section:native_type windows::basic_handle::native_type]
 
- [
+The native representation of a handle.
 
- [[link boost_asio.reference.ssl__context_base.password_purpose [*password_purpose]]]
- [Purpose of PEM password. ]
-
- ]
+ typedef HandleService::native_type native_type;
 
- [
 
- [[link boost_asio.reference.ssl__context_base.verify_mode [*verify_mode]]]
- [Bitmask type for peer verification. ]
-
- ]
 
-]
 
-[heading Data Members]
-[table
- [[Name][Description]]
+[endsect]
 
- [
- [[link boost_asio.reference.ssl__context_base.default_workarounds [*default_workarounds]]]
- [Implement various bug workarounds. ]
- ]
 
- [
- [[link boost_asio.reference.ssl__context_base.no_sslv2 [*no_sslv2]]]
- [Disable SSL v2. ]
- ]
 
- [
- [[link boost_asio.reference.ssl__context_base.no_sslv3 [*no_sslv3]]]
- [Disable SSL v3. ]
- ]
+[section:service windows::basic_handle::service]
 
- [
- [[link boost_asio.reference.ssl__context_base.no_tlsv1 [*no_tlsv1]]]
- [Disable TLS v1. ]
- ]
 
- [
- [[link boost_asio.reference.ssl__context_base.single_dh_use [*single_dh_use]]]
- [Always create a new key when using tmp_dh parameters. ]
- ]
+['Inherited from basic_io_object.]
 
- [
- [[link boost_asio.reference.ssl__context_base.verify_client_once [*verify_client_once]]]
- [Do not request client certificate on renegotiation. Ignored unless verify_peer is set. ]
- ]
+The service associated with the I/O object.
 
- [
- [[link boost_asio.reference.ssl__context_base.verify_fail_if_no_peer_cert [*verify_fail_if_no_peer_cert]]]
- [Fail verification if the peer has no certificate. Ignored unless verify_peer is set. ]
- ]
+ service_type & service;
 
- [
- [[link boost_asio.reference.ssl__context_base.verify_none [*verify_none]]]
- [No verification. ]
- ]
 
- [
- [[link boost_asio.reference.ssl__context_base.verify_peer [*verify_peer]]]
- [Verify the peer. ]
- ]
 
-]
+[endsect]
 
 
-[section:default_workarounds ssl::context_base::default_workarounds]
 
-Implement various bug workarounds.
+[section:service_type windows::basic_handle::service_type]
 
- static const int default_workarounds = implementation_defined;
 
+['Inherited from basic_io_object.]
 
+The type of the service that will be used to provide I/O operations.
 
-[endsect]
+ typedef HandleService service_type;
 
 
 
-[section:file_format ssl::context_base::file_format]
 
-File format types.
+[endsect]
 
- enum file_format
 
-[heading Values]
-[variablelist
 
- [
- [asn1]
- [ASN.1 file. ]
- ]
+[section:_basic_handle windows::basic_handle::~basic_handle]
 
- [
- [pem]
- [PEM file. ]
- ]
+Protected destructor to prevent deletion through this type.
 
-]
+ ~basic_handle();
 
 
 
@@ -35484,100 +56428,170 @@
 
 
 
-[section:method ssl::context_base::method]
+[endsect]
 
-Different methods supported by a context.
+[section:windows__basic_random_access_handle windows::basic_random_access_handle]
 
- enum method
+Provides random-access handle functionality.
+
+ template<
+ typename ``[link boost_asio.reference.RandomAccessHandleService RandomAccessHandleService]`` = random_access_handle_service>
+ class basic_random_access_handle :
+ public windows::basic_handle< RandomAccessHandleService >
 
-[heading Values]
-[variablelist
+
+[heading Types]
+[table
+ [[Name][Description]]
 
   [
- [sslv2]
- [Generic SSL version 2. ]
+
+ [[link boost_asio.reference.windows__basic_random_access_handle.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
   ]
 
   [
- [sslv2_client]
- [SSL version 2 client. ]
+
+ [[link boost_asio.reference.windows__basic_random_access_handle.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_handle is always the lowest layer. ]
+
   ]
 
   [
- [sslv2_server]
- [SSL version 2 server. ]
+
+ [[link boost_asio.reference.windows__basic_random_access_handle.native_type [*native_type]]]
+ [The native representation of a handle. ]
+
   ]
 
   [
- [sslv3]
- [Generic SSL version 3. ]
+
+ [[link boost_asio.reference.windows__basic_random_access_handle.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
+
   ]
 
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
   [
- [sslv3_client]
- [SSL version 3 client. ]
+ [[link boost_asio.reference.windows__basic_random_access_handle.assign [*assign]]]
+ [Assign an existing native handle to the handle. ]
   ]
-
+
   [
- [sslv3_server]
- [SSL version 3 server. ]
+ [[link boost_asio.reference.windows__basic_random_access_handle.async_read_some_at [*async_read_some_at]]]
+ [Start an asynchronous read at the specified offset. ]
   ]
-
+
   [
- [tlsv1]
- [Generic TLS version 1. ]
+ [[link boost_asio.reference.windows__basic_random_access_handle.async_write_some_at [*async_write_some_at]]]
+ [Start an asynchronous write at the specified offset. ]
   ]
-
+
   [
- [tlsv1_client]
- [TLS version 1 client. ]
+ [[link boost_asio.reference.windows__basic_random_access_handle.basic_random_access_handle [*basic_random_access_handle]]]
+ [Construct a basic_random_access_handle without opening it. ]
   ]
-
+
   [
- [tlsv1_server]
- [TLS version 1 server. ]
+ [[link boost_asio.reference.windows__basic_random_access_handle.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the handle. ]
   ]
-
+
   [
- [sslv23]
- [Generic SSL/TLS. ]
+ [[link boost_asio.reference.windows__basic_random_access_handle.close [*close]]]
+ [Close the handle. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_random_access_handle.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_random_access_handle.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_random_access_handle.is_open [*is_open]]]
+ [Determine whether the handle is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_random_access_handle.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_random_access_handle.native [*native]]]
+ [Get the native handle representation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_random_access_handle.read_some_at [*read_some_at]]]
+ [Read some data from the handle at the specified offset. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_random_access_handle.write_some_at [*write_some_at]]]
+ [Write some data to the handle at the specified offset. ]
   ]
+
+]
+
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
 
   [
- [sslv23_client]
- [SSL/TLS client. ]
+ [[link boost_asio.reference.windows__basic_random_access_handle.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
   ]
 
   [
- [sslv23_server]
- [SSL/TLS server. ]
+ [[link boost_asio.reference.windows__basic_random_access_handle.service [*service]]]
+ [The service associated with the I/O object. ]
   ]
 
 ]
 
+The windows::basic_random_access_handle class template provides asynchronous and blocking random-access handle functionality.
 
 
-[endsect]
-
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
+[*Shared] [*objects:] Unsafe.
 
-[section:no_sslv2 ssl::context_base::no_sslv2]
 
-Disable SSL v2.
+[section:assign windows::basic_random_access_handle::assign]
 
- static const int no_sslv2 = implementation_defined;
+Assign an existing native handle to the handle.
 
+ void ``[link boost_asio.reference.windows__basic_random_access_handle.assign.overload1 assign]``(
+ const native_type & native_handle);
 
+ boost::system::error_code ``[link boost_asio.reference.windows__basic_random_access_handle.assign.overload2 assign]``(
+ const native_type & native_handle,
+ boost::system::error_code & ec);
 
-[endsect]
 
+[section:overload1 windows::basic_random_access_handle::assign (1 of 2 overloads)]
 
 
-[section:no_sslv3 ssl::context_base::no_sslv3]
+['Inherited from windows::basic_handle.]
 
-Disable SSL v3.
+Assign an existing native handle to the handle.
 
- static const int no_sslv3 = implementation_defined;
+ void assign(
+ const native_type & native_handle);
 
 
 
@@ -35585,63 +56599,77 @@
 
 
 
-[section:no_tlsv1 ssl::context_base::no_tlsv1]
-
-Disable TLS v1.
-
- static const int no_tlsv1 = implementation_defined;
+[section:overload2 windows::basic_random_access_handle::assign (2 of 2 overloads)]
 
 
+['Inherited from windows::basic_handle.]
 
-[endsect]
+Assign an existing native handle to the handle.
 
+ boost::system::error_code assign(
+ const native_type & native_handle,
+ boost::system::error_code & ec);
 
 
-[section:options ssl::context_base::options]
 
-Bitmask type for SSL options.
+[endsect]
 
- typedef int options;
 
+[endsect]
 
 
+[section:async_read_some_at windows::basic_random_access_handle::async_read_some_at]
 
-[endsect]
+Start an asynchronous read at the specified offset.
 
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_read_some_at(
+ boost::uint64_t offset,
+ const MutableBufferSequence & buffers,
+ ReadHandler handler);
 
 
-[section:password_purpose ssl::context_base::password_purpose]
+This function is used to asynchronously read data from the random-access handle. The function call always returns immediately.
 
-Purpose of PEM password.
 
- enum password_purpose
+[heading Parameters]
+
 
-[heading Values]
 [variablelist
+
+[[offset][The offset at which the data will be read.]]
 
- [
- [for_reading]
- [The password is needed for reading/decryption. ]
- ]
-
- [
- [for_writing]
- [The password is needed for writing/encryption. ]
- ]
-
-]
+[[buffers][One or more buffers into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
 
+[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ std::size_t bytes_transferred // Number of bytes read.
+ );
 
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
 
-[endsect]
+]
 
+[heading Remarks]
+
+The read operation may not read all of the requested number of bytes. Consider using the
+[link boost_asio.reference.async_read_at async_read_at] function if you need to ensure that the requested amount of data is read before the asynchronous operation completes.
 
+[heading Example]
+
+To read into a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
 
-[section:single_dh_use ssl::context_base::single_dh_use]
+ handle.async_read_some_at(42, boost::asio::buffer(data, size), handler);
 
-Always create a new key when using tmp_dh parameters.
 
- static const int single_dh_use = implementation_defined;
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
 
 
@@ -35649,241 +56677,172 @@
 
 
 
-[section:verify_client_once ssl::context_base::verify_client_once]
-
-Do not request client certificate on renegotiation. Ignored unless verify_peer is set.
-
- static const int verify_client_once = implementation_defined;
-
+[section:async_write_some_at windows::basic_random_access_handle::async_write_some_at]
 
+Start an asynchronous write at the specified offset.
 
-[endsect]
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_write_some_at(
+ boost::uint64_t offset,
+ const ConstBufferSequence & buffers,
+ WriteHandler handler);
 
 
+This function is used to asynchronously write data to the random-access handle. The function call always returns immediately.
 
-[section:verify_fail_if_no_peer_cert ssl::context_base::verify_fail_if_no_peer_cert]
 
-Fail verification if the peer has no certificate. Ignored unless verify_peer is set.
+[heading Parameters]
+
 
- static const int verify_fail_if_no_peer_cert = implementation_defined;
+[variablelist
+
+[[offset][The offset at which the data will be written.]]
 
+[[buffers][One or more data buffers to be written to the handle. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
 
+[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ std::size_t bytes_transferred // Number of bytes written.
+ );
 
-[endsect]
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
 
+]
 
+[heading Remarks]
+
+The write operation may not transmit all of the data to the peer. Consider using the
+[link boost_asio.reference.async_write_at async_write_at] function if you need to ensure that all data is written before the asynchronous operation completes.
 
-[section:verify_mode ssl::context_base::verify_mode]
+[heading Example]
+
+To write a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
 
-Bitmask type for peer verification.
+ handle.async_write_some_at(42, boost::asio::buffer(data, size), handler);
 
- typedef int verify_mode;
 
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
 
 
 [endsect]
 
 
+[section:basic_random_access_handle windows::basic_random_access_handle::basic_random_access_handle]
 
-[section:verify_none ssl::context_base::verify_none]
-
-No verification.
+Construct a basic_random_access_handle without opening it.
 
- static const int verify_none = implementation_defined;
+ ``[link boost_asio.reference.windows__basic_random_access_handle.basic_random_access_handle.overload1 basic_random_access_handle]``(
+ boost::asio::io_service & io_service);
 
+ ``[link boost_asio.reference.windows__basic_random_access_handle.basic_random_access_handle.overload2 basic_random_access_handle]``(
+ boost::asio::io_service & io_service,
+ const native_type & native_handle);
 
 
-[endsect]
+[section:overload1 windows::basic_random_access_handle::basic_random_access_handle (1 of 2 overloads)]
 
+Construct a basic_random_access_handle without opening it.
 
+ basic_random_access_handle(
+ boost::asio::io_service & io_service);
 
-[section:verify_peer ssl::context_base::verify_peer]
 
-Verify the peer.
+This constructor creates a random-access handle without opening it. The handle needs to be opened before data can be written to or or read from it.
 
- static const int verify_peer = implementation_defined;
 
+[heading Parameters]
+
 
+[variablelist
+
+[[io_service][The io\_service object that the random-access handle will use to dispatch handlers for any asynchronous operations performed on the handle. ]]
 
-[endsect]
+]
 
 
 
 [endsect]
 
-[section:ssl__context_service ssl::context_service]
-
-Default service implementation for a context.
-
- class context_service :
- public io_service::service
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link boost_asio.reference.ssl__context_service.impl_type [*impl_type]]]
- [The type of the context. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
 
- [
- [[link boost_asio.reference.ssl__context_service.add_verify_path [*add_verify_path]]]
- [Add a directory containing certification authority files to be used for performing verification. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__context_service.context_service [*context_service]]]
- [Constructor. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__context_service.create [*create]]]
- [Create a new context implementation. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__context_service.destroy [*destroy]]]
- [Destroy a context implementation. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__context_service.get_io_service [*get_io_service]]]
- [Get the io_service object that owns the service. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__context_service.io_service [*io_service]]]
- [(Deprecated: use get_io_service().) Get the io_service object that owns the service. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__context_service.load_verify_file [*load_verify_file]]]
- [Load a certification authority file for performing verification. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__context_service.null [*null]]]
- [Return a null context implementation. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__context_service.set_options [*set_options]]]
- [Set options on the context. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__context_service.set_password_callback [*set_password_callback]]]
- [Set the password callback. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__context_service.set_verify_mode [*set_verify_mode]]]
- [Set peer verification mode. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__context_service.shutdown_service [*shutdown_service]]]
- [Destroy all user-defined handler objects owned by the service. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__context_service.use_certificate_chain_file [*use_certificate_chain_file]]]
- [Use a certificate chain from a file. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__context_service.use_certificate_file [*use_certificate_file]]]
- [Use a certificate from a file. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__context_service.use_private_key_file [*use_private_key_file]]]
- [Use a private key from a file. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__context_service.use_rsa_private_key_file [*use_rsa_private_key_file]]]
- [Use an RSA private key from a file. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__context_service.use_tmp_dh_file [*use_tmp_dh_file]]]
- [Use the specified file to obtain the temporary Diffie-Hellman parameters. ]
- ]
-
-]
 
-[heading Data Members]
-[table
- [[Name][Description]]
+[section:overload2 windows::basic_random_access_handle::basic_random_access_handle (2 of 2 overloads)]
 
- [
- [[link boost_asio.reference.ssl__context_service.id [*id]]]
- [The unique service identifier. ]
- ]
+Construct a basic_random_access_handle on an existing native handle.
 
-]
+ basic_random_access_handle(
+ boost::asio::io_service & io_service,
+ const native_type & native_handle);
 
 
-[section:add_verify_path ssl::context_service::add_verify_path]
+This constructor creates a random-access handle object to hold an existing native handle.
 
-Add a directory containing certification authority files to be used for performing verification.
 
- boost::system::error_code add_verify_path(
- impl_type & impl,
- const std::string & path,
- boost::system::error_code & ec);
+[heading Parameters]
+
 
+[variablelist
+
+[[io_service][The io\_service object that the random-access handle will use to dispatch handlers for any asynchronous operations performed on the handle.]]
 
+[[native_handle][The new underlying handle implementation.]]
 
-[endsect]
+]
 
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
 
-[section:context_service ssl::context_service::context_service]
+]
 
-Constructor.
 
- context_service(
- boost::asio::io_service & io_service);
 
+[endsect]
 
 
 [endsect]
 
+[section:cancel windows::basic_random_access_handle::cancel]
 
+Cancel all asynchronous operations associated with the handle.
 
-[section:create ssl::context_service::create]
+ void ``[link boost_asio.reference.windows__basic_random_access_handle.cancel.overload1 cancel]``();
 
-Create a new context implementation.
+ boost::system::error_code ``[link boost_asio.reference.windows__basic_random_access_handle.cancel.overload2 cancel]``(
+ boost::system::error_code & ec);
 
- void create(
- impl_type & impl,
- context_base::method m);
 
+[section:overload1 windows::basic_random_access_handle::cancel (1 of 2 overloads)]
 
 
-[endsect]
+['Inherited from windows::basic_handle.]
 
+Cancel all asynchronous operations associated with the handle.
 
+ void cancel();
 
-[section:destroy ssl::context_service::destroy]
 
-Destroy a context implementation.
+This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the boost::asio::error::operation\_aborted error.
 
- void destroy(
- impl_type & impl);
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
+
+]
 
 
 
@@ -35891,54 +56850,67 @@
 
 
 
-[section:get_io_service ssl::context_service::get_io_service]
+[section:overload2 windows::basic_random_access_handle::cancel (2 of 2 overloads)]
 
 
-['Inherited from io_service.]
+['Inherited from windows::basic_handle.]
 
-Get the io_service object that owns the service.
+Cancel all asynchronous operations associated with the handle.
 
- boost::asio::io_service & get_io_service();
+ boost::system::error_code cancel(
+ boost::system::error_code & ec);
 
 
+This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the boost::asio::error::operation\_aborted error.
 
-[endsect]
 
+[heading Parameters]
+
 
+[variablelist
+
+[[ec][Set to indicate what error occurred, if any. ]]
 
-[section:id ssl::context_service::id]
+]
 
-The unique service identifier.
 
- static boost::asio::io_service::id id;
 
+[endsect]
 
 
 [endsect]
 
+[section:close windows::basic_random_access_handle::close]
 
+Close the handle.
 
-[section:impl_type ssl::context_service::impl_type]
+ void ``[link boost_asio.reference.windows__basic_random_access_handle.close.overload1 close]``();
 
-The type of the context.
+ boost::system::error_code ``[link boost_asio.reference.windows__basic_random_access_handle.close.overload2 close]``(
+ boost::system::error_code & ec);
 
- typedef implementation_defined impl_type;
 
+[section:overload1 windows::basic_random_access_handle::close (1 of 2 overloads)]
 
 
+['Inherited from windows::basic_handle.]
 
-[endsect]
+Close the handle.
 
+ void close();
 
 
-[section:io_service ssl::context_service::io_service]
+This function is used to close the handle. Any asynchronous read or write operations will be cancelled immediately, and will complete with the boost::asio::error::operation\_aborted error.
 
 
-['Inherited from io_service.]
+[heading Exceptions]
+
 
-(Deprecated: use get_io_service().) Get the io_service object that owns the service.
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
 
- boost::asio::io_service & io_service();
+]
 
 
 
@@ -35946,58 +56918,53 @@
 
 
 
-[section:load_verify_file ssl::context_service::load_verify_file]
+[section:overload2 windows::basic_random_access_handle::close (2 of 2 overloads)]
 
-Load a certification authority file for performing verification.
 
- boost::system::error_code load_verify_file(
- impl_type & impl,
- const std::string & filename,
- boost::system::error_code & ec);
+['Inherited from windows::basic_handle.]
 
+Close the handle.
 
+ boost::system::error_code close(
+ boost::system::error_code & ec);
 
-[endsect]
 
+This function is used to close the handle. Any asynchronous read or write operations will be cancelled immediately, and will complete with the boost::asio::error::operation\_aborted error.
 
 
-[section:null ssl::context_service::null]
+[heading Parameters]
+
 
-Return a null context implementation.
+[variablelist
+
+[[ec][Set to indicate what error occurred, if any. ]]
 
- impl_type null() const;
+]
 
 
 
 [endsect]
 
 
+[endsect]
 
-[section:set_options ssl::context_service::set_options]
-
-Set options on the context.
 
- boost::system::error_code set_options(
- impl_type & impl,
- context_base::options o,
- boost::system::error_code & ec);
+[section:get_io_service windows::basic_random_access_handle::get_io_service]
 
 
+['Inherited from basic_io_object.]
 
-[endsect]
+Get the io_service associated with the object.
 
+ boost::asio::io_service & get_io_service();
 
 
-[section:set_password_callback ssl::context_service::set_password_callback]
+This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
 
-Set the password callback.
 
- template<
- typename PasswordCallback>
- boost::system::error_code set_password_callback(
- impl_type & impl,
- PasswordCallback callback,
- boost::system::error_code & ec);
+[heading Return Value]
+
+A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
 
 
 
@@ -36005,14 +56972,14 @@
 
 
 
-[section:set_verify_mode ssl::context_service::set_verify_mode]
+[section:implementation windows::basic_random_access_handle::implementation]
 
-Set peer verification mode.
 
- boost::system::error_code set_verify_mode(
- impl_type & impl,
- context_base::verify_mode v,
- boost::system::error_code & ec);
+['Inherited from basic_io_object.]
+
+The underlying implementation of the I/O object.
+
+ implementation_type implementation;
 
 
 
@@ -36020,42 +56987,38 @@
 
 
 
-[section:shutdown_service ssl::context_service::shutdown_service]
+[section:implementation_type windows::basic_random_access_handle::implementation_type]
 
-Destroy all user-defined handler objects owned by the service.
 
- void shutdown_service();
+['Inherited from basic_io_object.]
 
+The underlying implementation type of I/O object.
 
+ typedef service_type::implementation_type implementation_type;
 
-[endsect]
 
 
 
-[section:use_certificate_chain_file ssl::context_service::use_certificate_chain_file]
+[endsect]
 
-Use a certificate chain from a file.
 
- boost::system::error_code use_certificate_chain_file(
- impl_type & impl,
- const std::string & filename,
- boost::system::error_code & ec);
 
+[section:io_service windows::basic_random_access_handle::io_service]
 
 
-[endsect]
+['Inherited from basic_io_object.]
 
+(Deprecated: use get_io_service().) Get the io_service associated with the object.
 
+ boost::asio::io_service & io_service();
 
-[section:use_certificate_file ssl::context_service::use_certificate_file]
 
-Use a certificate from a file.
+This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
 
- boost::system::error_code use_certificate_file(
- impl_type & impl,
- const std::string & filename,
- context_base::file_format format,
- boost::system::error_code & ec);
+
+[heading Return Value]
+
+A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
 
 
 
@@ -36063,46 +57026,37 @@
 
 
 
-[section:use_private_key_file ssl::context_service::use_private_key_file]
+[section:is_open windows::basic_random_access_handle::is_open]
 
-Use a private key from a file.
 
- boost::system::error_code use_private_key_file(
- impl_type & impl,
- const std::string & filename,
- context_base::file_format format,
- boost::system::error_code & ec);
+['Inherited from windows::basic_handle.]
 
+Determine whether the handle is open.
 
+ bool is_open() const;
 
-[endsect]
 
 
+[endsect]
 
-[section:use_rsa_private_key_file ssl::context_service::use_rsa_private_key_file]
 
-Use an RSA private key from a file.
 
- boost::system::error_code use_rsa_private_key_file(
- impl_type & impl,
- const std::string & filename,
- context_base::file_format format,
- boost::system::error_code & ec);
+[section:lowest_layer windows::basic_random_access_handle::lowest_layer]
 
 
+['Inherited from windows::basic_handle.]
 
-[endsect]
+Get a reference to the lowest layer.
 
+ lowest_layer_type & lowest_layer();
 
 
-[section:use_tmp_dh_file ssl::context_service::use_tmp_dh_file]
+This function returns a reference to the lowest layer in a stack of layers. Since a basic_handle cannot contain any further layers, it simply returns a reference to itself.
 
-Use the specified file to obtain the temporary Diffie-Hellman parameters.
 
- boost::system::error_code use_tmp_dh_file(
- impl_type & impl,
- const std::string & filename,
- boost::system::error_code & ec);
+[heading Return Value]
+
+A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
 
 
 
@@ -36110,17 +57064,14 @@
 
 
 
-[endsect]
+[section:lowest_layer_type windows::basic_random_access_handle::lowest_layer_type]
 
-[section:ssl__stream ssl::stream]
 
-Provides stream-oriented functionality using SSL.
+['Inherited from windows::basic_handle.]
 
- template<
- typename Stream,
- typename ``[link boost_asio.reference.Service Service]`` = stream_service>
- class stream :
- public ssl::stream_base
+A basic_handle is always the lowest layer.
+
+ typedef basic_handle< RandomAccessHandleService > lowest_layer_type;
 
 
 [heading Types]
@@ -36129,36 +57080,29 @@
 
   [
 
- [[link boost_asio.reference.ssl__stream.handshake_type [*handshake_type]]]
- [Different handshake types. ]
-
- ]
-
- [
-
- [[link boost_asio.reference.ssl__stream.impl_type [*impl_type]]]
- [The native implementation type of the stream. ]
+ [[link boost_asio.reference.windows__basic_handle.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.ssl__stream.lowest_layer_type [*lowest_layer_type]]]
- [The type of the lowest layer. ]
+ [[link boost_asio.reference.windows__basic_handle.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_handle is always the lowest layer. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.ssl__stream.next_layer_type [*next_layer_type]]]
- [The type of the next layer. ]
+ [[link boost_asio.reference.windows__basic_handle.native_type [*native_type]]]
+ [The native representation of a handle. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.ssl__stream.service_type [*service_type]]]
- [The type of the service that will be used to provide stream operations. ]
+ [[link boost_asio.reference.windows__basic_handle.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
   
   ]
 
@@ -36169,208 +57113,154 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.ssl__stream.async_handshake [*async_handshake]]]
- [Start an asynchronous SSL handshake. ]
+ [[link boost_asio.reference.windows__basic_handle.assign [*assign]]]
+ [Assign an existing native handle to the handle. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__stream.async_read_some [*async_read_some]]]
- [Start an asynchronous read. ]
+ [[link boost_asio.reference.windows__basic_handle.basic_handle [*basic_handle]]]
+ [Construct a basic_handle without opening it. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__stream.async_shutdown [*async_shutdown]]]
- [Asynchronously shut down SSL on the stream. ]
+ [[link boost_asio.reference.windows__basic_handle.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the handle. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__stream.async_write_some [*async_write_some]]]
- [Start an asynchronous write. ]
+ [[link boost_asio.reference.windows__basic_handle.close [*close]]]
+ [Close the handle. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__stream.get_io_service [*get_io_service]]]
+ [[link boost_asio.reference.windows__basic_handle.get_io_service [*get_io_service]]]
     [Get the io_service associated with the object. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__stream.handshake [*handshake]]]
- [Perform SSL handshaking. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__stream.impl [*impl]]]
- [Get the underlying implementation in the native type. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__stream.in_avail [*in_avail]]]
- [Determine the amount of data that may be read without blocking. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__stream.io_service [*io_service]]]
+ [[link boost_asio.reference.windows__basic_handle.io_service [*io_service]]]
     [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__stream.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__stream.next_layer [*next_layer]]]
- [Get a reference to the next layer. ]
- ]
-
- [
- [[link boost_asio.reference.ssl__stream.peek [*peek]]]
- [Peek at the incoming data on the stream. ]
+ [[link boost_asio.reference.windows__basic_handle.is_open [*is_open]]]
+ [Determine whether the handle is open. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__stream.read_some [*read_some]]]
- [Read some data from the stream. ]
+ [[link boost_asio.reference.windows__basic_handle.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__stream.shutdown [*shutdown]]]
- [Shut down SSL on the stream. ]
+ [[link boost_asio.reference.windows__basic_handle.native [*native]]]
+ [Get the native handle representation. ]
   ]
   
+]
+
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
   [
- [[link boost_asio.reference.ssl__stream.stream [*stream]]]
- [Construct a stream. ]
+ [[link boost_asio.reference.windows__basic_handle._basic_handle [*~basic_handle]]]
+ [Protected destructor to prevent deletion through this type. ]
   ]
   
+]
+
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
   [
- [[link boost_asio.reference.ssl__stream.write_some [*write_some]]]
- [Write some data to the stream. ]
+ [[link boost_asio.reference.windows__basic_handle.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
   ]
-
+
   [
- [[link boost_asio.reference.ssl__stream._stream [*~stream]]]
- [Destructor. ]
+ [[link boost_asio.reference.windows__basic_handle.service [*service]]]
+ [The service associated with the I/O object. ]
   ]
-
+
 ]
 
-The stream class template provides asynchronous and blocking stream-oriented functionality using SSL.
+The windows::basic_handle class template provides the ability to wrap a Windows handle.
 
 
 [heading Thread Safety]
   
 [*Distinct] [*objects:] Safe.
 
-[*Shared] [*objects:] Unsafe.
-
-[heading Example]
-
-To use the SSL stream template with an ip::tcp::socket, you would write:
-
- boost::asio::io_service io_service;
- boost::asio::ssl::context context(io_service, boost::asio::ssl::context::sslv23);
- boost::asio::ssl::stream<boost::asio::ip::tcp::socket> sock(io_service, context);
-
-
-
-
+[*Shared] [*objects:] Unsafe.
 
 
-[section:async_handshake ssl::stream::async_handshake]
 
-Start an asynchronous SSL handshake.
 
- template<
- typename HandshakeHandler>
- void async_handshake(
- handshake_type type,
- HandshakeHandler handler);
+[endsect]
 
 
-This function is used to asynchronously perform an SSL handshake on the stream. This function call always returns immediately.
 
+[section:native windows::basic_random_access_handle::native]
 
-[heading Parameters]
-
 
-[variablelist
-
-[[type][The type of handshaking to be performed, i.e. as a client or as a server.]]
+['Inherited from windows::basic_handle.]
 
-[[handler][The handler to be called when the handshake operation completes. Copies will be made of the handler as required. The equivalent function signature of the handler must be:
-``
- void handler(
- const boost::system::error_code& error // Result of operation.
- );
+Get the native handle representation.
 
-``
-]]
+ native_type native();
 
-]
 
+This function may be used to obtain the underlying representation of the handle. This is intended to allow access to native handle functionality that is not otherwise provided.
 
 
 [endsect]
 
 
 
-[section:async_read_some ssl::stream::async_read_some]
-
-Start an asynchronous read.
-
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
- void async_read_some(
- const MutableBufferSequence & buffers,
- ReadHandler handler);
-
-
-This function is used to asynchronously read one or more bytes of data from the stream. The function call always returns immediately.
+[section:native_type windows::basic_random_access_handle::native_type]
 
+The native representation of a handle.
 
-[heading Parameters]
-
+ typedef RandomAccessHandleService::native_type native_type;
 
-[variablelist
-
-[[buffers][The buffers into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying buffers is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
 
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The equivalent function signature of the handler must be:
-``
- void handler(
- const boost::system::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes read.
- );
 
-``
-]]
 
-]
+[endsect]
 
-[heading Remarks]
-
-The async\_read\_some operation may not read all of the requested number of bytes. Consider using the
-[link boost_asio.reference.async_read async_read] function if you need to ensure that the requested amount of data is read before the asynchronous operation completes.
 
+[section:read_some_at windows::basic_random_access_handle::read_some_at]
 
+Read some data from the handle at the specified offset.
 
-[endsect]
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.windows__basic_random_access_handle.read_some_at.overload1 read_some_at]``(
+ boost::uint64_t offset,
+ const MutableBufferSequence & buffers);
 
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.windows__basic_random_access_handle.read_some_at.overload2 read_some_at]``(
+ boost::uint64_t offset,
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
 
 
-[section:async_shutdown ssl::stream::async_shutdown]
+[section:overload1 windows::basic_random_access_handle::read_some_at (1 of 2 overloads)]
 
-Asynchronously shut down SSL on the stream.
+Read some data from the handle at the specified offset.
 
   template<
- typename ShutdownHandler>
- void async_shutdown(
- ShutdownHandler handler);
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t read_some_at(
+ boost::uint64_t offset,
+ const MutableBufferSequence & buffers);
 
 
-This function is used to asynchronously shut down SSL on the stream. This function call always returns immediately.
+This function is used to read data from the random-access handle. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
 
 
 [heading Parameters]
@@ -36378,108 +57268,60 @@
 
 [variablelist
   
-[[handler][The handler to be called when the handshake operation completes. Copies will be made of the handler as required. The equivalent function signature of the handler must be:
-``
- void handler(
- const boost::system::error_code& error // Result of operation.
- );
+[[offset][The offset at which the data will be read.]]
 
-``
-]]
+[[buffers][One or more buffers into which the data will be read.]]
 
 ]
 
+[heading Return Value]
+
+The number of bytes read.
 
-
-[endsect]
-
-
-
-[section:async_write_some ssl::stream::async_write_some]
-
-Start an asynchronous write.
-
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
- void async_write_some(
- const ConstBufferSequence & buffers,
- WriteHandler handler);
-
-
-This function is used to asynchronously write one or more bytes of data to the stream. The function call always returns immediately.
-
-
-[heading Parameters]
+[heading Exceptions]
     
 
 [variablelist
   
-[[buffers][The data to be written to the stream. Although the buffers object may be copied as necessary, ownership of the underlying buffers is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The equivalent function signature of the handler must be:
-``
- void handler(
- const boost::system::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes written.
- );
-
-``
-]]
+[[boost::system::system_error][Thrown on failure. An error code of boost::asio::error::eof indicates that the connection was closed by the peer.]]
 
 ]
 
 [heading Remarks]
       
-The async\_write\_some operation may not transmit all of the data to the peer. Consider using the
-[link boost_asio.reference.async_write async_write] function if you need to ensure that all data is written before the blocking operation completes.
-
-
-
-[endsect]
-
-
-
-[section:get_io_service ssl::stream::get_io_service]
-
-Get the io_service associated with the object.
-
- boost::asio::io_service & get_io_service();
+The read\_some operation may not read all of the requested number of bytes. Consider using the
+[link boost_asio.reference.read_at read_at] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
 
+[heading Example]
+
+To read into a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
 
-This function may be used to obtain the io_service object that the stream uses to dispatch handlers for asynchronous operations.
+ handle.read_some_at(42, boost::asio::buffer(data, size));
 
 
-[heading Return Value]
-
-A reference to the io_service object that stream will use to dispatch handlers. Ownership is not transferred to the caller.
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
 
 
 [endsect]
 
 
-[section:handshake ssl::stream::handshake]
 
-Perform SSL handshaking.
+[section:overload2 windows::basic_random_access_handle::read_some_at (2 of 2 overloads)]
 
- void ``[link boost_asio.reference.ssl__stream.handshake.overload1 handshake]``(
- handshake_type type);
+Read some data from the handle at the specified offset.
 
- boost::system::error_code ``[link boost_asio.reference.ssl__stream.handshake.overload2 handshake]``(
- handshake_type type,
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t read_some_at(
+ boost::uint64_t offset,
+ const MutableBufferSequence & buffers,
       boost::system::error_code & ec);
 
 
-[section:overload1 ssl::stream::handshake (1 of 2 overloads)]
-
-Perform SSL handshaking.
-
- void handshake(
- handshake_type type);
-
-
-This function is used to perform SSL handshaking on the stream. The function call will block until handshaking is complete or an error occurs.
+This function is used to read data from the random-access handle. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
 
 
 [heading Parameters]
@@ -36487,47 +57329,22 @@
 
 [variablelist
   
-[[type][The type of handshaking to be performed, i.e. as a client or as a server.]]
-
-]
+[[offset][The offset at which the data will be read.]]
 
-[heading Exceptions]
-
+[[buffers][One or more buffers into which the data will be read.]]
 
-[variablelist
-
-[[boost::system::system_error][Thrown on failure. ]]
+[[ec][Set to indicate what error occurred, if any.]]
 
 ]
 
+[heading Return Value]
+
+The number of bytes read. Returns 0 if an error occurred.
 
-
-[endsect]
-
-
-
-[section:overload2 ssl::stream::handshake (2 of 2 overloads)]
-
-Perform SSL handshaking.
-
- boost::system::error_code handshake(
- handshake_type type,
- boost::system::error_code & ec);
-
-
-This function is used to perform SSL handshaking on the stream. The function call will block until handshaking is complete or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[type][The type of handshaking to be performed, i.e. as a client or as a server.]]
-
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
+[heading Remarks]
+
+The read\_some operation may not read all of the requested number of bytes. Consider using the
+[link boost_asio.reference.read_at read_at] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
 
 
 
@@ -36537,26 +57354,14 @@
 [endsect]
 
 
-[section:handshake_type ssl::stream::handshake_type]
-
-Different handshake types.
-
- enum handshake_type
+[section:service windows::basic_random_access_handle::service]
 
-[heading Values]
-[variablelist
 
- [
- [client]
- [Perform handshaking as a client. ]
- ]
+['Inherited from basic_io_object.]
 
- [
- [server]
- [Perform handshaking as a server. ]
- ]
+The service associated with the I/O object.
 
-]
+ service_type & service;
 
 
 
@@ -36564,25 +57369,14 @@
 
 
 
-[section:impl ssl::stream::impl]
-
-Get the underlying implementation in the native type.
-
- impl_type impl();
-
-
-This function may be used to obtain the underlying implementation of the context. This is intended to allow access to stream functionality that is not otherwise provided.
-
-
-[endsect]
-
+[section:service_type windows::basic_random_access_handle::service_type]
 
 
-[section:impl_type ssl::stream::impl_type]
+['Inherited from basic_io_object.]
 
-The native implementation type of the stream.
+The type of the service that will be used to provide I/O operations.
 
- typedef service_type::impl_type impl_type;
+ typedef RandomAccessHandleService service_type;
 
 
 
@@ -36590,54 +57384,97 @@
 [endsect]
 
 
-[section:in_avail ssl::stream::in_avail]
+[section:write_some_at windows::basic_random_access_handle::write_some_at]
 
-Determine the amount of data that may be read without blocking.
+Write some data to the handle at the specified offset.
 
- std::size_t ``[link boost_asio.reference.ssl__stream.in_avail.overload1 in_avail]``();
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.windows__basic_random_access_handle.write_some_at.overload1 write_some_at]``(
+ boost::uint64_t offset,
+ const ConstBufferSequence & buffers);
 
- std::size_t ``[link boost_asio.reference.ssl__stream.in_avail.overload2 in_avail]``(
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.windows__basic_random_access_handle.write_some_at.overload2 write_some_at]``(
+ boost::uint64_t offset,
+ const ConstBufferSequence & buffers,
       boost::system::error_code & ec);
 
 
-[section:overload1 ssl::stream::in_avail (1 of 2 overloads)]
+[section:overload1 windows::basic_random_access_handle::write_some_at (1 of 2 overloads)]
 
-Determine the amount of data that may be read without blocking.
+Write some data to the handle at the specified offset.
 
- std::size_t in_avail();
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t write_some_at(
+ boost::uint64_t offset,
+ const ConstBufferSequence & buffers);
 
 
-This function is used to determine the amount of data, in bytes, that may be read from the stream without blocking.
+This function is used to write data to the random-access handle. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[offset][The offset at which the data will be written.]]
+
+[[buffers][One or more data buffers to be written to the handle.]]
 
+]
 
 [heading Return Value]
       
-The number of bytes of data that can be read without blocking.
+The number of bytes written.
 
 [heading Exceptions]
     
 
 [variablelist
   
-[[boost::system::system_error][Thrown on failure. ]]
+[[boost::system::system_error][Thrown on failure. An error code of boost::asio::error::eof indicates that the connection was closed by the peer.]]
 
 ]
 
+[heading Remarks]
+
+The write\_some\_at operation may not write all of the data. Consider using the
+[link boost_asio.reference.write_at write_at] function if you need to ensure that all data is written before the blocking operation completes.
+
+[heading Example]
+
+To write a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ handle.write_some_at(42, boost::asio::buffer(data, size));
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+
 
 
 [endsect]
 
 
 
-[section:overload2 ssl::stream::in_avail (2 of 2 overloads)]
+[section:overload2 windows::basic_random_access_handle::write_some_at (2 of 2 overloads)]
 
-Determine the amount of data that may be read without blocking.
+Write some data to the handle at the specified offset.
 
- std::size_t in_avail(
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t write_some_at(
+ boost::uint64_t offset,
+ const ConstBufferSequence & buffers,
       boost::system::error_code & ec);
 
 
-This function is used to determine the amount of data, in bytes, that may be read from the stream without blocking.
+This function is used to write data to the random-access handle. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
 
 
 [heading Parameters]
@@ -36645,13 +57482,22 @@
 
 [variablelist
   
+[[offset][The offset at which the data will be written.]]
+
+[[buffers][One or more data buffers to be written to the handle.]]
+
 [[ec][Set to indicate what error occurred, if any.]]
 
 ]
 
 [heading Return Value]
       
-The number of bytes of data that can be read without blocking.
+The number of bytes written. Returns 0 if an error occurred.
+
+[heading Remarks]
+
+The write\_some operation may not transmit all of the data to the peer. Consider using the
+[link boost_asio.reference.write_at write_at] function if you need to ensure that all data is written before the blocking operation completes.
 
 
 
@@ -36661,118 +57507,209 @@
 [endsect]
 
 
-[section:io_service ssl::stream::io_service]
-
-(Deprecated: use get_io_service().) Get the io_service associated with the object.
+[endsect]
 
- boost::asio::io_service & io_service();
+[section:windows__basic_stream_handle windows::basic_stream_handle]
 
+Provides stream-oriented handle functionality.
 
-This function may be used to obtain the io_service object that the stream uses to dispatch handlers for asynchronous operations.
+ template<
+ typename ``[link boost_asio.reference.StreamHandleService StreamHandleService]`` = stream_handle_service>
+ class basic_stream_handle :
+ public windows::basic_handle< StreamHandleService >
 
 
-[heading Return Value]
-
-A reference to the io_service object that stream will use to dispatch handlers. Ownership is not transferred to the caller.
+[heading Types]
+[table
+ [[Name][Description]]
 
+ [
 
+ [[link boost_asio.reference.windows__basic_stream_handle.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
 
-[endsect]
+ [
 
+ [[link boost_asio.reference.windows__basic_stream_handle.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_handle is always the lowest layer. ]
+
+ ]
 
+ [
 
-[section:lowest_layer ssl::stream::lowest_layer]
+ [[link boost_asio.reference.windows__basic_stream_handle.native_type [*native_type]]]
+ [The native representation of a handle. ]
+
+ ]
 
-Get a reference to the lowest layer.
+ [
 
- lowest_layer_type & lowest_layer();
+ [[link boost_asio.reference.windows__basic_stream_handle.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
+
+ ]
 
+]
 
-This function returns a reference to the lowest layer in a stack of stream layers.
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.assign [*assign]]]
+ [Assign an existing native handle to the handle. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.async_read_some [*async_read_some]]]
+ [Start an asynchronous read. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.async_write_some [*async_write_some]]]
+ [Start an asynchronous write. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.basic_stream_handle [*basic_stream_handle]]]
+ [Construct a basic_stream_handle without opening it. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the handle. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.close [*close]]]
+ [Close the handle. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.is_open [*is_open]]]
+ [Determine whether the handle is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.native [*native]]]
+ [Get the native handle representation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.read_some [*read_some]]]
+ [Read some data from the handle. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.write_some [*write_some]]]
+ [Write some data to the handle. ]
+ ]
+
+]
 
-[heading Return Value]
-
-A reference to the lowest layer in the stack of stream layers. Ownership is not transferred to the caller.
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
 
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
 
-[endsect]
+]
 
+The windows::basic_stream_handle class template provides asynchronous and blocking stream-oriented handle functionality.
 
 
-[section:lowest_layer_type ssl::stream::lowest_layer_type]
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
-The type of the lowest layer.
+[*Shared] [*objects:] Unsafe.
 
- typedef next_layer_type::lowest_layer_type lowest_layer_type;
 
+[section:assign windows::basic_stream_handle::assign]
 
+Assign an existing native handle to the handle.
 
+ void ``[link boost_asio.reference.windows__basic_stream_handle.assign.overload1 assign]``(
+ const native_type & native_handle);
 
-[endsect]
+ boost::system::error_code ``[link boost_asio.reference.windows__basic_stream_handle.assign.overload2 assign]``(
+ const native_type & native_handle,
+ boost::system::error_code & ec);
 
 
+[section:overload1 windows::basic_stream_handle::assign (1 of 2 overloads)]
 
-[section:next_layer ssl::stream::next_layer]
 
-Get a reference to the next layer.
+['Inherited from windows::basic_handle.]
 
- next_layer_type & next_layer();
+Assign an existing native handle to the handle.
 
+ void assign(
+ const native_type & native_handle);
 
-This function returns a reference to the next layer in a stack of stream layers.
 
 
-[heading Return Value]
-
-A reference to the next layer in the stack of stream layers. Ownership is not transferred to the caller.
+[endsect]
 
 
 
-[endsect]
+[section:overload2 windows::basic_stream_handle::assign (2 of 2 overloads)]
 
 
+['Inherited from windows::basic_handle.]
 
-[section:next_layer_type ssl::stream::next_layer_type]
+Assign an existing native handle to the handle.
 
-The type of the next layer.
+ boost::system::error_code assign(
+ const native_type & native_handle,
+ boost::system::error_code & ec);
 
- typedef boost::remove_reference< Stream >::type next_layer_type;
 
 
+[endsect]
 
 
 [endsect]
 
 
-[section:peek ssl::stream::peek]
-
-Peek at the incoming data on the stream.
+[section:async_read_some windows::basic_stream_handle::async_read_some]
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link boost_asio.reference.ssl__stream.peek.overload1 peek]``(
- const MutableBufferSequence & buffers);
+Start an asynchronous read.
 
   template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link boost_asio.reference.ssl__stream.peek.overload2 peek]``(
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_read_some(
       const MutableBufferSequence & buffers,
- boost::system::error_code & ec);
-
-
-[section:overload1 ssl::stream::peek (1 of 2 overloads)]
-
-Peek at the incoming data on the stream.
-
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t peek(
- const MutableBufferSequence & buffers);
+ ReadHandler handler);
 
 
-This function is used to peek at the incoming data on the stream, without removing it from the input queue. The function call will block until data has been read successfully or an error occurs.
+This function is used to asynchronously read data from the stream handle. The function call always returns immediately.
 
 
 [heading Parameters]
@@ -36780,22 +57717,35 @@
 
 [variablelist
   
-[[buffers][The buffers into which the data will be read.]]
+[[buffers][One or more buffers into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
+
+[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ std::size_t bytes_transferred // Number of bytes read.
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
 
 ]
 
-[heading Return Value]
+[heading Remarks]
       
-The number of bytes read.
-
-[heading Exceptions]
-
+The read operation may not read all of the requested number of bytes. Consider using the
+[link boost_asio.reference.async_read async_read] function if you need to ensure that the requested amount of data is read before the asynchronous operation completes.
 
-[variablelist
+[heading Example]
   
-[[boost::system::system_error][Thrown on failure. ]]
+To read into a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
 
-]
+ handle.async_read_some(boost::asio::buffer(data, size), handler);
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
 
 
@@ -36803,18 +57753,19 @@
 
 
 
-[section:overload2 ssl::stream::peek (2 of 2 overloads)]
+[section:async_write_some windows::basic_stream_handle::async_write_some]
 
-Peek at the incoming data on the stream.
+Start an asynchronous write.
 
   template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t peek(
- const MutableBufferSequence & buffers,
- boost::system::error_code & ec);
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_write_some(
+ const ConstBufferSequence & buffers,
+ WriteHandler handler);
 
 
-This function is used to peek at the incoming data on the stream, withoutxi removing it from the input queue. The function call will block until data has been read successfully or an error occurs.
+This function is used to asynchronously write data to the stream handle. The function call always returns immediately.
 
 
 [heading Parameters]
@@ -36822,97 +57773,89 @@
 
 [variablelist
   
-[[buffers][The buffers into which the data will be read.]]
+[[buffers][One or more data buffers to be written to the handle. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
 
-[[ec][Set to indicate what error occurred, if any.]]
+[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
+``
+ void handler(
+ const boost::system::error_code& error, // Result of operation.
+ std::size_t bytes_transferred // Number of bytes written.
+ );
+
+``
+Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using boost::asio::io\_service::post().]]
 
 ]
 
-[heading Return Value]
+[heading Remarks]
       
-The number of bytes read. Returns 0 if an error occurred.
-
+The write operation may not transmit all of the data to the peer. Consider using the
+[link boost_asio.reference.async_write async_write] function if you need to ensure that all data is written before the asynchronous operation completes.
 
+[heading Example]
+
+To write a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
 
-[endsect]
+ handle.async_write_some(boost::asio::buffer(data, size), handler);
 
 
-[endsect]
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
-[section:read_some ssl::stream::read_some]
 
-Read some data from the stream.
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link boost_asio.reference.ssl__stream.read_some.overload1 read_some]``(
- const MutableBufferSequence & buffers);
+[endsect]
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link boost_asio.reference.ssl__stream.read_some.overload2 read_some]``(
- const MutableBufferSequence & buffers,
- boost::system::error_code & ec);
 
+[section:basic_stream_handle windows::basic_stream_handle::basic_stream_handle]
 
-[section:overload1 ssl::stream::read_some (1 of 2 overloads)]
+Construct a basic_stream_handle without opening it.
 
-Read some data from the stream.
+ ``[link boost_asio.reference.windows__basic_stream_handle.basic_stream_handle.overload1 basic_stream_handle]``(
+ boost::asio::io_service & io_service);
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers);
+ ``[link boost_asio.reference.windows__basic_stream_handle.basic_stream_handle.overload2 basic_stream_handle]``(
+ boost::asio::io_service & io_service,
+ const native_type & native_handle);
 
 
-This function is used to read data from the stream. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
+[section:overload1 windows::basic_stream_handle::basic_stream_handle (1 of 2 overloads)]
 
+Construct a basic_stream_handle without opening it.
 
-[heading Parameters]
-
+ basic_stream_handle(
+ boost::asio::io_service & io_service);
 
-[variablelist
-
-[[buffers][The buffers into which the data will be read.]]
 
-]
+This constructor creates a stream handle without opening it. The handle needs to be opened and then connected or accepted before data can be sent or received on it.
 
-[heading Return Value]
-
-The number of bytes read.
 
-[heading Exceptions]
+[heading Parameters]
     
 
 [variablelist
   
-[[boost::system::system_error][Thrown on failure.]]
+[[io_service][The io\_service object that the stream handle will use to dispatch handlers for any asynchronous operations performed on the handle. ]]
 
 ]
 
-[heading Remarks]
-
-The read\_some operation may not read all of the requested number of bytes. Consider using the
-[link boost_asio.reference.read read] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
-
 
 
 [endsect]
 
 
 
-[section:overload2 ssl::stream::read_some (2 of 2 overloads)]
+[section:overload2 windows::basic_stream_handle::basic_stream_handle (2 of 2 overloads)]
 
-Read some data from the stream.
+Construct a basic_stream_handle on an existing native handle.
 
- template<
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers,
- boost::system::error_code & ec);
+ basic_stream_handle(
+ boost::asio::io_service & io_service,
+ const native_type & native_handle);
 
 
-This function is used to read data from the stream. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
+This constructor creates a stream handle object to hold an existing native handle.
 
 
 [heading Parameters]
@@ -36920,59 +57863,49 @@
 
 [variablelist
   
-[[buffers][The buffers into which the data will be read.]]
+[[io_service][The io\_service object that the stream handle will use to dispatch handlers for any asynchronous operations performed on the handle.]]
 
-[[ec][Set to indicate what error occurred, if any.]]
+[[native_handle][The new underlying handle implementation.]]
 
 ]
 
-[heading Return Value]
-
-The number of bytes read. Returns 0 if an error occurred.
-
-[heading Remarks]
-
-The read\_some operation may not read all of the requested number of bytes. Consider using the
-[link boost_asio.reference.read read] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
 
+]
 
-[endsect]
 
 
 [endsect]
 
 
-[section:service_type ssl::stream::service_type]
-
-The type of the service that will be used to provide stream operations.
-
- typedef Service service_type;
-
-
-
-
 [endsect]
 
+[section:cancel windows::basic_stream_handle::cancel]
 
-[section:shutdown ssl::stream::shutdown]
-
-Shut down SSL on the stream.
+Cancel all asynchronous operations associated with the handle.
 
- void ``[link boost_asio.reference.ssl__stream.shutdown.overload1 shutdown]``();
+ void ``[link boost_asio.reference.windows__basic_stream_handle.cancel.overload1 cancel]``();
 
- boost::system::error_code ``[link boost_asio.reference.ssl__stream.shutdown.overload2 shutdown]``(
+ boost::system::error_code ``[link boost_asio.reference.windows__basic_stream_handle.cancel.overload2 cancel]``(
       boost::system::error_code & ec);
 
 
-[section:overload1 ssl::stream::shutdown (1 of 2 overloads)]
+[section:overload1 windows::basic_stream_handle::cancel (1 of 2 overloads)]
 
-Shut down SSL on the stream.
 
- void shutdown();
+['Inherited from windows::basic_handle.]
 
+Cancel all asynchronous operations associated with the handle.
 
-This function is used to shut down SSL on the stream. The function call will block until SSL has been shut down or an error occurs.
+ void cancel();
+
+
+This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the boost::asio::error::operation\_aborted error.
 
 
 [heading Exceptions]
@@ -36990,15 +57923,18 @@
 
 
 
-[section:overload2 ssl::stream::shutdown (2 of 2 overloads)]
+[section:overload2 windows::basic_stream_handle::cancel (2 of 2 overloads)]
 
-Shut down SSL on the stream.
 
- boost::system::error_code shutdown(
+['Inherited from windows::basic_handle.]
+
+Cancel all asynchronous operations associated with the handle.
+
+ boost::system::error_code cancel(
       boost::system::error_code & ec);
 
 
-This function is used to shut down SSL on the stream. The function call will block until SSL has been shut down or an error occurs.
+This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the boost::asio::error::operation\_aborted error.
 
 
 [heading Parameters]
@@ -37017,30 +57953,35 @@
 
 [endsect]
 
+[section:close windows::basic_stream_handle::close]
 
-[section:stream ssl::stream::stream]
+Close the handle.
 
-Construct a stream.
+ void ``[link boost_asio.reference.windows__basic_stream_handle.close.overload1 close]``();
 
- template<
- typename Arg,
- typename Context_Service>
- stream(
- Arg & arg,
- basic_context< Context_Service > & context);
+ boost::system::error_code ``[link boost_asio.reference.windows__basic_stream_handle.close.overload2 close]``(
+ boost::system::error_code & ec);
 
 
-This constructor creates a stream and initialises the underlying stream object.
+[section:overload1 windows::basic_stream_handle::close (1 of 2 overloads)]
 
 
-[heading Parameters]
+['Inherited from windows::basic_handle.]
+
+Close the handle.
+
+ void close();
+
+
+This function is used to close the handle. Any asynchronous read or write operations will be cancelled immediately, and will complete with the boost::asio::error::operation\_aborted error.
+
+
+[heading Exceptions]
     
 
 [variablelist
   
-[[arg][The argument to be passed to initialise the underlying stream.]]
-
-[[context][The SSL context to be used for the stream. ]]
+[[boost::system::system_error][Thrown on failure. ]]
 
 ]
 
@@ -37049,33 +57990,19 @@
 [endsect]
 
 
-[section:write_some ssl::stream::write_some]
-
-Write some data to the stream.
-
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link boost_asio.reference.ssl__stream.write_some.overload1 write_some]``(
- const ConstBufferSequence & buffers);
 
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link boost_asio.reference.ssl__stream.write_some.overload2 write_some]``(
- const ConstBufferSequence & buffers,
- boost::system::error_code & ec);
+[section:overload2 windows::basic_stream_handle::close (2 of 2 overloads)]
 
 
-[section:overload1 ssl::stream::write_some (1 of 2 overloads)]
+['Inherited from windows::basic_handle.]
 
-Write some data to the stream.
+Close the handle.
 
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers);
+ boost::system::error_code close(
+ boost::system::error_code & ec);
 
 
-This function is used to write data on the stream. The function call will block until one or more bytes of data has been written successfully, or until an error occurs.
+This function is used to close the handle. Any asynchronous read or write operations will be cancelled immediately, and will complete with the boost::asio::error::operation\_aborted error.
 
 
 [heading Parameters]
@@ -37083,27 +58010,34 @@
 
 [variablelist
   
-[[buffers][The data to be written.]]
+[[ec][Set to indicate what error occurred, if any. ]]
 
 ]
 
-[heading Return Value]
-
-The number of bytes written.
 
-[heading Exceptions]
-
 
-[variablelist
-
-[[boost::system::system_error][Thrown on failure.]]
+[endsect]
 
-]
 
-[heading Remarks]
+[endsect]
+
+
+[section:get_io_service windows::basic_stream_handle::get_io_service]
+
+
+['Inherited from basic_io_object.]
+
+Get the io_service associated with the object.
+
+ boost::asio::io_service & get_io_service();
+
+
+This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
+
+
+[heading Return Value]
       
-The write\_some operation may not transmit all of the data to the peer. Consider using the
-[link boost_asio.reference.write write] function if you need to ensure that all data is written before the blocking operation completes.
+A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
 
 
 
@@ -37111,373 +58045,331 @@
 
 
 
-[section:overload2 ssl::stream::write_some (2 of 2 overloads)]
+[section:implementation windows::basic_stream_handle::implementation]
 
-Write some data to the stream.
 
- template<
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers,
- boost::system::error_code & ec);
+['Inherited from basic_io_object.]
 
+The underlying implementation of the I/O object.
 
-This function is used to write data on the stream. The function call will block until one or more bytes of data has been written successfully, or until an error occurs.
+ implementation_type implementation;
 
 
-[heading Parameters]
-
 
-[variablelist
-
-[[buffers][The data to be written to the stream.]]
+[endsect]
 
-[[ec][Set to indicate what error occurred, if any.]]
 
-]
 
-[heading Return Value]
-
-The number of bytes written. Returns 0 if an error occurred.
+[section:implementation_type windows::basic_stream_handle::implementation_type]
 
-[heading Remarks]
-
-The write\_some operation may not transmit all of the data to the peer. Consider using the
-[link boost_asio.reference.write write] function if you need to ensure that all data is written before the blocking operation completes.
 
+['Inherited from basic_io_object.]
+
+The underlying implementation type of I/O object.
+
+ typedef service_type::implementation_type implementation_type;
 
 
-[endsect]
 
 
 [endsect]
 
 
-[section:_stream ssl::stream::~stream]
 
-Destructor.
+[section:io_service windows::basic_stream_handle::io_service]
 
- ~stream();
 
+['Inherited from basic_io_object.]
 
+(Deprecated: use get_io_service().) Get the io_service associated with the object.
 
-[endsect]
+ boost::asio::io_service & io_service();
+
+
+This function may be used to obtain the io_service object that the I/O object uses to dispatch handlers for asynchronous operations.
+
+
+[heading Return Value]
+
+A reference to the io_service object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
 
 
 
 [endsect]
 
-[section:ssl__stream_base ssl::stream_base]
 
-The stream_base class is used as a base for the boost::asio::ssl::stream class template so that we have a common place to define various enums.
 
- class stream_base
+[section:is_open windows::basic_stream_handle::is_open]
 
 
-[heading Types]
-[table
- [[Name][Description]]
+['Inherited from windows::basic_handle.]
 
- [
+Determine whether the handle is open.
 
- [[link boost_asio.reference.ssl__stream_base.handshake_type [*handshake_type]]]
- [Different handshake types. ]
-
- ]
+ bool is_open() const;
 
-]
 
 
-[section:handshake_type ssl::stream_base::handshake_type]
+[endsect]
 
-Different handshake types.
 
- enum handshake_type
 
-[heading Values]
-[variablelist
+[section:lowest_layer windows::basic_stream_handle::lowest_layer]
 
- [
- [client]
- [Perform handshaking as a client. ]
- ]
 
- [
- [server]
- [Perform handshaking as a server. ]
- ]
+['Inherited from windows::basic_handle.]
 
-]
+Get a reference to the lowest layer.
 
+ lowest_layer_type & lowest_layer();
 
 
-[endsect]
+This function returns a reference to the lowest layer in a stack of layers. Since a basic_handle cannot contain any further layers, it simply returns a reference to itself.
+
+
+[heading Return Value]
+
+A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
 
 
 
 [endsect]
 
-[section:ssl__stream_service ssl::stream_service]
 
-Default service implementation for an SSL stream.
 
- class stream_service :
- public io_service::service
+[section:lowest_layer_type windows::basic_stream_handle::lowest_layer_type]
 
 
-[heading Types]
-[table
- [[Name][Description]]
+['Inherited from windows::basic_handle.]
 
- [
+A basic_handle is always the lowest layer.
 
- [[link boost_asio.reference.ssl__stream_service.impl_type [*impl_type]]]
- [The type of a stream implementation. ]
-
- ]
+ typedef basic_handle< StreamHandleService > lowest_layer_type;
 
-]
 
-[heading Member Functions]
+[heading Types]
 [table
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.ssl__stream_service.async_handshake [*async_handshake]]]
- [Start an asynchronous SSL handshake. ]
- ]
+
+ [[link boost_asio.reference.windows__basic_handle.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
   
- [
- [[link boost_asio.reference.ssl__stream_service.async_read_some [*async_read_some]]]
- [Start an asynchronous read. ]
   ]
-
+
   [
- [[link boost_asio.reference.ssl__stream_service.async_shutdown [*async_shutdown]]]
- [Asynchronously shut down SSL on the stream. ]
- ]
+
+ [[link boost_asio.reference.windows__basic_handle.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_handle is always the lowest layer. ]
   
- [
- [[link boost_asio.reference.ssl__stream_service.async_write_some [*async_write_some]]]
- [Start an asynchronous write. ]
   ]
-
+
   [
- [[link boost_asio.reference.ssl__stream_service.create [*create]]]
- [Create a new stream implementation. ]
- ]
+
+ [[link boost_asio.reference.windows__basic_handle.native_type [*native_type]]]
+ [The native representation of a handle. ]
   
- [
- [[link boost_asio.reference.ssl__stream_service.destroy [*destroy]]]
- [Destroy a stream implementation. ]
   ]
-
+
   [
- [[link boost_asio.reference.ssl__stream_service.get_io_service [*get_io_service]]]
- [Get the io_service object that owns the service. ]
- ]
+
+ [[link boost_asio.reference.windows__basic_handle.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
   
- [
- [[link boost_asio.reference.ssl__stream_service.handshake [*handshake]]]
- [Perform SSL handshaking. ]
   ]
-
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
   [
- [[link boost_asio.reference.ssl__stream_service.in_avail [*in_avail]]]
- [Determine the amount of data that may be read without blocking. ]
+ [[link boost_asio.reference.windows__basic_handle.assign [*assign]]]
+ [Assign an existing native handle to the handle. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__stream_service.io_service [*io_service]]]
- [(Deprecated: use get_io_service().) Get the io_service object that owns the service. ]
+ [[link boost_asio.reference.windows__basic_handle.basic_handle [*basic_handle]]]
+ [Construct a basic_handle without opening it. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__stream_service.null [*null]]]
- [Return a null stream implementation. ]
+ [[link boost_asio.reference.windows__basic_handle.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the handle. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__stream_service.peek [*peek]]]
- [Peek at the incoming data on the stream. ]
+ [[link boost_asio.reference.windows__basic_handle.close [*close]]]
+ [Close the handle. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__stream_service.read_some [*read_some]]]
- [Read some data from the stream. ]
+ [[link boost_asio.reference.windows__basic_handle.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__stream_service.shutdown [*shutdown]]]
- [Shut down SSL on the stream. ]
+ [[link boost_asio.reference.windows__basic_handle.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__stream_service.shutdown_service [*shutdown_service]]]
- [Destroy all user-defined handler objects owned by the service. ]
+ [[link boost_asio.reference.windows__basic_handle.is_open [*is_open]]]
+ [Determine whether the handle is open. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__stream_service.stream_service [*stream_service]]]
- [Construct a new stream service for the specified io_service. ]
+ [[link boost_asio.reference.windows__basic_handle.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
   ]
   
   [
- [[link boost_asio.reference.ssl__stream_service.write_some [*write_some]]]
- [Write some data to the stream. ]
+ [[link boost_asio.reference.windows__basic_handle.native [*native]]]
+ [Get the native handle representation. ]
   ]
   
 ]
 
-[heading Data Members]
+[heading Protected Member Functions]
 [table
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.ssl__stream_service.id [*id]]]
- [The unique service identifier. ]
+ [[link boost_asio.reference.windows__basic_handle._basic_handle [*~basic_handle]]]
+ [Protected destructor to prevent deletion through this type. ]
   ]
-
+
 ]
 
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
 
-[section:async_handshake ssl::stream_service::async_handshake]
+ [
+ [[link boost_asio.reference.windows__basic_handle.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
 
-Start an asynchronous SSL handshake.
+ [
+ [[link boost_asio.reference.windows__basic_handle.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
 
- template<
- typename Stream,
- typename HandshakeHandler>
- void async_handshake(
- impl_type & impl,
- Stream & next_layer,
- stream_base::handshake_type type,
- HandshakeHandler handler);
+]
 
+The windows::basic_handle class template provides the ability to wrap a Windows handle.
 
 
-[endsect]
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
+[*Shared] [*objects:] Unsafe.
 
 
-[section:async_read_some ssl::stream_service::async_read_some]
 
-Start an asynchronous read.
 
- template<
- typename Stream,
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
- void async_read_some(
- impl_type & impl,
- Stream & next_layer,
- const MutableBufferSequence & buffers,
- ReadHandler handler);
+[endsect]
 
 
 
-[endsect]
+[section:native windows::basic_stream_handle::native]
 
 
+['Inherited from windows::basic_handle.]
 
-[section:async_shutdown ssl::stream_service::async_shutdown]
+Get the native handle representation.
 
-Asynchronously shut down SSL on the stream.
+ native_type native();
 
- template<
- typename Stream,
- typename ShutdownHandler>
- void async_shutdown(
- impl_type & impl,
- Stream & next_layer,
- ShutdownHandler handler);
 
+This function may be used to obtain the underlying representation of the handle. This is intended to allow access to native handle functionality that is not otherwise provided.
 
 
 [endsect]
 
 
 
-[section:async_write_some ssl::stream_service::async_write_some]
+[section:native_type windows::basic_stream_handle::native_type]
 
-Start an asynchronous write.
+The native representation of a handle.
 
- template<
- typename Stream,
- typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
- void async_write_some(
- impl_type & impl,
- Stream & next_layer,
- const ConstBufferSequence & buffers,
- WriteHandler handler);
+ typedef StreamHandleService::native_type native_type;
 
 
 
-[endsect]
 
+[endsect]
 
 
-[section:create ssl::stream_service::create]
+[section:read_some windows::basic_stream_handle::read_some]
 
-Create a new stream implementation.
+Read some data from the handle.
 
   template<
- typename Stream,
- typename Context_Service>
- void create(
- impl_type & impl,
- Stream & next_layer,
- basic_context< Context_Service > & context);
-
-
-
-[endsect]
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.windows__basic_stream_handle.read_some.overload1 read_some]``(
+ const MutableBufferSequence & buffers);
 
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.windows__basic_stream_handle.read_some.overload2 read_some]``(
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
 
 
-[section:destroy ssl::stream_service::destroy]
+[section:overload1 windows::basic_stream_handle::read_some (1 of 2 overloads)]
 
-Destroy a stream implementation.
+Read some data from the handle.
 
   template<
- typename Stream>
- void destroy(
- impl_type & impl,
- Stream & next_layer);
-
-
-
-[endsect]
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t read_some(
+ const MutableBufferSequence & buffers);
 
 
+This function is used to read data from the stream handle. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
 
-[section:get_io_service ssl::stream_service::get_io_service]
 
+[heading Parameters]
+
 
-['Inherited from io_service.]
+[variablelist
+
+[[buffers][One or more buffers into which the data will be read.]]
 
-Get the io_service object that owns the service.
+]
 
- boost::asio::io_service & get_io_service();
+[heading Return Value]
+
+The number of bytes read.
 
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. An error code of boost::asio::error::eof indicates that the connection was closed by the peer.]]
 
-[endsect]
+]
 
+[heading Remarks]
+
+The read\_some operation may not read all of the requested number of bytes. Consider using the
+[link boost_asio.reference.read read] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
 
+[heading Example]
+
+To read into a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
 
-[section:handshake ssl::stream_service::handshake]
+ handle.read_some(boost::asio::buffer(data, size));
 
-Perform SSL handshaking.
 
- template<
- typename Stream>
- boost::system::error_code handshake(
- impl_type & impl,
- Stream & next_layer,
- stream_base::handshake_type type,
- boost::system::error_code & ec);
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
 
 
@@ -37485,56 +58377,56 @@
 
 
 
-[section:id ssl::stream_service::id]
+[section:overload2 windows::basic_stream_handle::read_some (2 of 2 overloads)]
 
-The unique service identifier.
+Read some data from the handle.
 
- static boost::asio::io_service::id id;
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t read_some(
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
 
 
+This function is used to read data from the stream handle. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
 
-[endsect]
 
+[heading Parameters]
+
 
+[variablelist
+
+[[buffers][One or more buffers into which the data will be read.]]
 
-[section:impl_type ssl::stream_service::impl_type]
+[[ec][Set to indicate what error occurred, if any.]]
 
-The type of a stream implementation.
+]
 
- typedef implementation_defined impl_type;
+[heading Return Value]
+
+The number of bytes read. Returns 0 if an error occurred.
 
+[heading Remarks]
+
+The read\_some operation may not read all of the requested number of bytes. Consider using the
+[link boost_asio.reference.read read] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
 
 
 
 [endsect]
 
 
-
-[section:in_avail ssl::stream_service::in_avail]
-
-Determine the amount of data that may be read without blocking.
-
- template<
- typename Stream>
- std::size_t in_avail(
- impl_type & impl,
- Stream & next_layer,
- boost::system::error_code & ec);
-
-
-
 [endsect]
 
 
-
-[section:io_service ssl::stream_service::io_service]
+[section:service windows::basic_stream_handle::service]
 
 
-['Inherited from io_service.]
+['Inherited from basic_io_object.]
 
-(Deprecated: use get_io_service().) Get the io_service object that owns the service.
+The service associated with the I/O object.
 
- boost::asio::io_service & io_service();
+ service_type & service;
 
 
 
@@ -37542,91 +58434,87 @@
 
 
 
-[section:null ssl::stream_service::null]
-
-Return a null stream implementation.
-
- impl_type null() const;
-
-
-
-[endsect]
+[section:service_type windows::basic_stream_handle::service_type]
 
 
+['Inherited from basic_io_object.]
 
-[section:peek ssl::stream_service::peek]
+The type of the service that will be used to provide I/O operations.
 
-Peek at the incoming data on the stream.
+ typedef StreamHandleService service_type;
 
- template<
- typename Stream,
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t peek(
- impl_type & impl,
- Stream & next_layer,
- const MutableBufferSequence & buffers,
- boost::system::error_code & ec);
 
 
 
 [endsect]
 
 
+[section:write_some windows::basic_stream_handle::write_some]
 
-[section:read_some ssl::stream_service::read_some]
+Write some data to the handle.
 
-Read some data from the stream.
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.windows__basic_stream_handle.write_some.overload1 write_some]``(
+ const ConstBufferSequence & buffers);
 
   template<
- typename Stream,
- typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- impl_type & impl,
- Stream & next_layer,
- const MutableBufferSequence & buffers,
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.windows__basic_stream_handle.write_some.overload2 write_some]``(
+ const ConstBufferSequence & buffers,
       boost::system::error_code & ec);
 
 
+[section:overload1 windows::basic_stream_handle::write_some (1 of 2 overloads)]
 
-[endsect]
-
-
-
-[section:shutdown ssl::stream_service::shutdown]
-
-Shut down SSL on the stream.
+Write some data to the handle.
 
   template<
- typename Stream>
- boost::system::error_code shutdown(
- impl_type & impl,
- Stream & next_layer,
- boost::system::error_code & ec);
-
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t write_some(
+ const ConstBufferSequence & buffers);
 
 
-[endsect]
+This function is used to write data to the stream handle. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
 
 
+[heading Parameters]
+
 
-[section:shutdown_service ssl::stream_service::shutdown_service]
+[variablelist
+
+[[buffers][One or more data buffers to be written to the handle.]]
 
-Destroy all user-defined handler objects owned by the service.
+]
 
- void shutdown_service();
+[heading Return Value]
+
+The number of bytes written.
 
+[heading Exceptions]
+
 
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. An error code of boost::asio::error::eof indicates that the connection was closed by the peer.]]
 
-[endsect]
+]
 
+[heading Remarks]
+
+The write\_some operation may not transmit all of the data to the peer. Consider using the
+[link boost_asio.reference.write write] function if you need to ensure that all data is written before the blocking operation completes.
 
+[heading Example]
+
+To write a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
 
-[section:stream_service ssl::stream_service::stream_service]
+ handle.write_some(boost::asio::buffer(data, size));
 
-Construct a new stream service for the specified io_service.
 
- stream_service(
- boost::asio::io_service & io_service);
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
 
 
 
@@ -37634,99 +58522,56 @@
 
 
 
-[section:write_some ssl::stream_service::write_some]
+[section:overload2 windows::basic_stream_handle::write_some (2 of 2 overloads)]
 
-Write some data to the stream.
+Write some data to the handle.
 
   template<
- typename Stream,
       typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
   std::size_t write_some(
- impl_type & impl,
- Stream & next_layer,
       const ConstBufferSequence & buffers,
       boost::system::error_code & ec);
 
 
+This function is used to write data to the stream handle. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
 
-[endsect]
-
-
-
-[endsect]
-
-
-[section:strand strand]
-
-Typedef for backwards compatibility.
 
- typedef boost::asio::io_service::strand strand;
+[heading Parameters]
+
 
+[variablelist
+
+[[buffers][One or more data buffers to be written to the handle.]]
 
-[heading Member Functions]
-[table
- [[Name][Description]]
+[[ec][Set to indicate what error occurred, if any.]]
 
- [
- [[link boost_asio.reference.io_service__strand.dispatch [*dispatch]]]
- [Request the strand to invoke the given handler. ]
- ]
-
- [
- [[link boost_asio.reference.io_service__strand.get_io_service [*get_io_service]]]
- [Get the io_service associated with the strand. ]
- ]
-
- [
- [[link boost_asio.reference.io_service__strand.io_service [*io_service]]]
- [(Deprecated: use get_io_service().) Get the io_service associated with the strand. ]
- ]
-
- [
- [[link boost_asio.reference.io_service__strand.post [*post]]]
- [Request the strand to invoke the given handler and return immediately. ]
- ]
-
- [
- [[link boost_asio.reference.io_service__strand.strand [*strand]]]
- [Constructor. ]
- ]
-
- [
- [[link boost_asio.reference.io_service__strand.wrap [*wrap]]]
- [Create a new handler that automatically dispatches the wrapped handler on the strand. ]
- ]
-
- [
- [[link boost_asio.reference.io_service__strand._strand [*~strand]]]
- [Destructor. ]
- ]
-
 ]
 
-The io_service::strand class provides the ability to post and dispatch handlers with the guarantee that none of those handlers will execute concurrently.
+[heading Return Value]
+
+The number of bytes written. Returns 0 if an error occurred.
 
+[heading Remarks]
+
+The write\_some operation may not transmit all of the data to the peer. Consider using the
+[link boost_asio.reference.write write] function if you need to ensure that all data is written before the blocking operation completes.
 
-[heading Thread Safety]
-
-[*Distinct] [*objects:] Safe.
 
-[*Shared] [*objects:] Safe.
+
+[endsect]
 
 
+[endsect]
 
 
 [endsect]
 
 
-[section:stream_socket_service stream_socket_service]
+[section:windows__random_access_handle windows::random_access_handle]
 
-Default service implementation for a stream socket.
+Typedef for the typical usage of a random-access handle.
 
- template<
- typename ``[link boost_asio.reference.Protocol Protocol]``>
- class stream_socket_service :
- public io_service::service
+ typedef basic_random_access_handle random_access_handle;
 
 
 [heading Types]
@@ -37735,29 +58580,29 @@
 
   [
 
- [[link boost_asio.reference.stream_socket_service.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
+ [[link boost_asio.reference.windows__basic_random_access_handle.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.stream_socket_service.implementation_type [*implementation_type]]]
- [The type of a stream socket implementation. ]
+ [[link boost_asio.reference.windows__basic_random_access_handle.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_handle is always the lowest layer. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.stream_socket_service.native_type [*native_type]]]
- [The native socket type. ]
+ [[link boost_asio.reference.windows__basic_random_access_handle.native_type [*native_type]]]
+ [The native representation of a handle. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.stream_socket_service.protocol_type [*protocol_type]]]
- [The protocol type. ]
+ [[link boost_asio.reference.windows__basic_random_access_handle.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
   
   ]
 
@@ -37768,138 +58613,208 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.stream_socket_service.assign [*assign]]]
- [Assign an existing native socket to a stream socket. ]
+ [[link boost_asio.reference.windows__basic_random_access_handle.assign [*assign]]]
+ [Assign an existing native handle to the handle. ]
   ]
   
   [
- [[link boost_asio.reference.stream_socket_service.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
+ [[link boost_asio.reference.windows__basic_random_access_handle.async_read_some_at [*async_read_some_at]]]
+ [Start an asynchronous read at the specified offset. ]
   ]
   
   [
- [[link boost_asio.reference.stream_socket_service.async_receive [*async_receive]]]
- [Start an asynchronous receive. ]
+ [[link boost_asio.reference.windows__basic_random_access_handle.async_write_some_at [*async_write_some_at]]]
+ [Start an asynchronous write at the specified offset. ]
   ]
   
   [
- [[link boost_asio.reference.stream_socket_service.async_send [*async_send]]]
- [Start an asynchronous send. ]
+ [[link boost_asio.reference.windows__basic_random_access_handle.basic_random_access_handle [*basic_random_access_handle]]]
+ [Construct a basic_random_access_handle without opening it. ]
   ]
   
   [
- [[link boost_asio.reference.stream_socket_service.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
+ [[link boost_asio.reference.windows__basic_random_access_handle.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the handle. ]
   ]
   
   [
- [[link boost_asio.reference.stream_socket_service.available [*available]]]
- [Determine the number of bytes available for reading. ]
+ [[link boost_asio.reference.windows__basic_random_access_handle.close [*close]]]
+ [Close the handle. ]
   ]
   
   [
- [[link boost_asio.reference.stream_socket_service.bind [*bind]]]
- [Bind the stream socket to the specified local endpoint. ]
+ [[link boost_asio.reference.windows__basic_random_access_handle.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
   ]
   
   [
- [[link boost_asio.reference.stream_socket_service.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
+ [[link boost_asio.reference.windows__basic_random_access_handle.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_random_access_handle.is_open [*is_open]]]
+ [Determine whether the handle is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_random_access_handle.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_random_access_handle.native [*native]]]
+ [Get the native handle representation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_random_access_handle.read_some_at [*read_some_at]]]
+ [Read some data from the handle at the specified offset. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_random_access_handle.write_some_at [*write_some_at]]]
+ [Write some data to the handle at the specified offset. ]
+ ]
+
+]
+
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link boost_asio.reference.windows__basic_random_access_handle.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_random_access_handle.service [*service]]]
+ [The service associated with the I/O object. ]
   ]
+
+]
+
+The windows::basic_random_access_handle class template provides asynchronous and blocking random-access handle functionality.
+
+
+[heading Thread Safety]
   
+[*Distinct] [*objects:] Safe.
+
+[*Shared] [*objects:] Unsafe.
+
+
+
+
+[endsect]
+
+
+[section:windows__random_access_handle_service windows::random_access_handle_service]
+
+Default service implementation for a random-access handle.
+
+ class random_access_handle_service :
+ public io_service::service
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
   [
- [[link boost_asio.reference.stream_socket_service.close [*close]]]
- [Close a stream socket implementation. ]
- ]
+
+ [[link boost_asio.reference.windows__random_access_handle_service.implementation_type [*implementation_type]]]
+ [The type of a random-access handle implementation. ]
   
- [
- [[link boost_asio.reference.stream_socket_service.connect [*connect]]]
- [Connect the stream socket to the specified endpoint. ]
   ]
-
+
   [
- [[link boost_asio.reference.stream_socket_service.construct [*construct]]]
- [Construct a new stream socket implementation. ]
- ]
+
+ [[link boost_asio.reference.windows__random_access_handle_service.native_type [*native_type]]]
+ [The native handle type. ]
   
- [
- [[link boost_asio.reference.stream_socket_service.destroy [*destroy]]]
- [Destroy a stream socket implementation. ]
   ]
-
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
   [
- [[link boost_asio.reference.stream_socket_service.get_io_service [*get_io_service]]]
- [Get the io_service object that owns the service. ]
+ [[link boost_asio.reference.windows__random_access_handle_service.assign [*assign]]]
+ [Assign an existing native handle to a random-access handle. ]
   ]
   
   [
- [[link boost_asio.reference.stream_socket_service.get_option [*get_option]]]
- [Get a socket option. ]
+ [[link boost_asio.reference.windows__random_access_handle_service.async_read_some_at [*async_read_some_at]]]
+ [Start an asynchronous read at the specified offset. ]
   ]
   
   [
- [[link boost_asio.reference.stream_socket_service.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
+ [[link boost_asio.reference.windows__random_access_handle_service.async_write_some_at [*async_write_some_at]]]
+ [Start an asynchronous write at the specified offset. ]
   ]
   
   [
- [[link boost_asio.reference.stream_socket_service.io_service [*io_service]]]
- [(Deprecated: use get_io_service().) Get the io_service object that owns the service. ]
+ [[link boost_asio.reference.windows__random_access_handle_service.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the handle. ]
   ]
   
   [
- [[link boost_asio.reference.stream_socket_service.is_open [*is_open]]]
- [Determine whether the socket is open. ]
+ [[link boost_asio.reference.windows__random_access_handle_service.close [*close]]]
+ [Close a random-access handle implementation. ]
   ]
   
   [
- [[link boost_asio.reference.stream_socket_service.local_endpoint [*local_endpoint]]]
- [Get the local endpoint. ]
+ [[link boost_asio.reference.windows__random_access_handle_service.construct [*construct]]]
+ [Construct a new random-access handle implementation. ]
   ]
   
   [
- [[link boost_asio.reference.stream_socket_service.native [*native]]]
- [Get the native socket implementation. ]
+ [[link boost_asio.reference.windows__random_access_handle_service.destroy [*destroy]]]
+ [Destroy a random-access handle implementation. ]
   ]
   
   [
- [[link boost_asio.reference.stream_socket_service.open [*open]]]
- [Open a stream socket. ]
+ [[link boost_asio.reference.windows__random_access_handle_service.get_io_service [*get_io_service]]]
+ [Get the io_service object that owns the service. ]
   ]
   
   [
- [[link boost_asio.reference.stream_socket_service.receive [*receive]]]
- [Receive some data from the peer. ]
+ [[link boost_asio.reference.windows__random_access_handle_service.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service object that owns the service. ]
   ]
   
   [
- [[link boost_asio.reference.stream_socket_service.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint. ]
+ [[link boost_asio.reference.windows__random_access_handle_service.is_open [*is_open]]]
+ [Determine whether the handle is open. ]
   ]
   
   [
- [[link boost_asio.reference.stream_socket_service.send [*send]]]
- [Send the given data to the peer. ]
+ [[link boost_asio.reference.windows__random_access_handle_service.native [*native]]]
+ [Get the native handle implementation. ]
   ]
   
   [
- [[link boost_asio.reference.stream_socket_service.set_option [*set_option]]]
- [Set a socket option. ]
+ [[link boost_asio.reference.windows__random_access_handle_service.random_access_handle_service [*random_access_handle_service]]]
+ [Construct a new random-access handle service for the specified io_service. ]
   ]
   
   [
- [[link boost_asio.reference.stream_socket_service.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
+ [[link boost_asio.reference.windows__random_access_handle_service.read_some_at [*read_some_at]]]
+ [Read some data from the specified offset. ]
   ]
   
   [
- [[link boost_asio.reference.stream_socket_service.shutdown_service [*shutdown_service]]]
+ [[link boost_asio.reference.windows__random_access_handle_service.shutdown_service [*shutdown_service]]]
     [Destroy all user-defined handler objects owned by the service. ]
   ]
   
   [
- [[link boost_asio.reference.stream_socket_service.stream_socket_service [*stream_socket_service]]]
- [Construct a new stream socket service for the specified io_service. ]
+ [[link boost_asio.reference.windows__random_access_handle_service.write_some_at [*write_some_at]]]
+ [Write the given data at the specified offset. ]
   ]
   
 ]
@@ -37909,21 +58824,20 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.stream_socket_service.id [*id]]]
+ [[link boost_asio.reference.windows__random_access_handle_service.id [*id]]]
     [The unique service identifier. ]
   ]
 
 ]
 
 
-[section:assign stream_socket_service::assign]
+[section:assign windows::random_access_handle_service::assign]
 
-Assign an existing native socket to a stream socket.
+Assign an existing native handle to a random-access handle.
 
   boost::system::error_code assign(
       implementation_type & impl,
- const protocol_type & protocol,
- const native_type & native_socket,
+ const native_type & native_handle,
       boost::system::error_code & ec);
 
 
@@ -37932,34 +58846,17 @@
 
 
 
-[section:async_connect stream_socket_service::async_connect]
-
-Start an asynchronous connect.
-
- template<
- typename ``[link boost_asio.reference.ConnectHandler ConnectHandler]``>
- void async_connect(
- implementation_type & impl,
- const endpoint_type & peer_endpoint,
- ConnectHandler handler);
-
-
-
-[endsect]
-
-
-
-[section:async_receive stream_socket_service::async_receive]
+[section:async_read_some_at windows::random_access_handle_service::async_read_some_at]
 
-Start an asynchronous receive.
+Start an asynchronous read at the specified offset.
 
   template<
       typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
       typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
- void async_receive(
+ void async_read_some_at(
       implementation_type & impl,
+ boost::uint64_t offset,
       const MutableBufferSequence & buffers,
- socket_base::message_flags flags,
       ReadHandler handler);
 
 
@@ -37968,17 +58865,17 @@
 
 
 
-[section:async_send stream_socket_service::async_send]
+[section:async_write_some_at windows::random_access_handle_service::async_write_some_at]
 
-Start an asynchronous send.
+Start an asynchronous write at the specified offset.
 
   template<
       typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
       typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
- void async_send(
+ void async_write_some_at(
       implementation_type & impl,
+ boost::uint64_t offset,
       const ConstBufferSequence & buffers,
- socket_base::message_flags flags,
       WriteHandler handler);
 
 
@@ -37987,52 +58884,9 @@
 
 
 
-[section:at_mark stream_socket_service::at_mark]
-
-Determine whether the socket is at the out-of-band data mark.
-
- bool at_mark(
- const implementation_type & impl,
- boost::system::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:available stream_socket_service::available]
-
-Determine the number of bytes available for reading.
-
- std::size_t available(
- const implementation_type & impl,
- boost::system::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:bind stream_socket_service::bind]
-
-Bind the stream socket to the specified local endpoint.
-
- boost::system::error_code bind(
- implementation_type & impl,
- const endpoint_type & endpoint,
- boost::system::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:cancel stream_socket_service::cancel]
+[section:cancel windows::random_access_handle_service::cancel]
 
-Cancel all asynchronous operations associated with the socket.
+Cancel all asynchronous operations associated with the handle.
 
   boost::system::error_code cancel(
       implementation_type & impl,
@@ -38044,9 +58898,9 @@
 
 
 
-[section:close stream_socket_service::close]
+[section:close windows::random_access_handle_service::close]
 
-Close a stream socket implementation.
+Close a random-access handle implementation.
 
   boost::system::error_code close(
       implementation_type & impl,
@@ -38058,24 +58912,9 @@
 
 
 
-[section:connect stream_socket_service::connect]
-
-Connect the stream socket to the specified endpoint.
-
- boost::system::error_code connect(
- implementation_type & impl,
- const endpoint_type & peer_endpoint,
- boost::system::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:construct stream_socket_service::construct]
+[section:construct windows::random_access_handle_service::construct]
 
-Construct a new stream socket implementation.
+Construct a new random-access handle implementation.
 
   void construct(
       implementation_type & impl);
@@ -38086,9 +58925,9 @@
 
 
 
-[section:destroy stream_socket_service::destroy]
+[section:destroy windows::random_access_handle_service::destroy]
 
-Destroy a stream socket implementation.
+Destroy a random-access handle implementation.
 
   void destroy(
       implementation_type & impl);
@@ -38099,20 +58938,7 @@
 
 
 
-[section:endpoint_type stream_socket_service::endpoint_type]
-
-The endpoint type.
-
- typedef Protocol::endpoint endpoint_type;
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service stream_socket_service::get_io_service]
+[section:get_io_service windows::random_access_handle_service::get_io_service]
 
 
 ['Inherited from io_service.]
@@ -38127,24 +58953,7 @@
 
 
 
-[section:get_option stream_socket_service::get_option]
-
-Get a socket option.
-
- template<
- typename ``[link boost_asio.reference.GettableSocketOption GettableSocketOption]``>
- boost::system::error_code get_option(
- const implementation_type & impl,
- GettableSocketOption & option,
- boost::system::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:id stream_socket_service::id]
+[section:id windows::random_access_handle_service::id]
 
 The unique service identifier.
 
@@ -38156,9 +58965,9 @@
 
 
 
-[section:implementation_type stream_socket_service::implementation_type]
+[section:implementation_type windows::random_access_handle_service::implementation_type]
 
-The type of a stream socket implementation.
+The type of a random-access handle implementation.
 
   typedef implementation_defined implementation_type;
 
@@ -38169,24 +58978,7 @@
 
 
 
-[section:io_control stream_socket_service::io_control]
-
-Perform an IO control command on the socket.
-
- template<
- typename ``[link boost_asio.reference.IoControlCommand IoControlCommand]``>
- boost::system::error_code io_control(
- implementation_type & impl,
- IoControlCommand & command,
- boost::system::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:io_service stream_socket_service::io_service]
+[section:io_service windows::random_access_handle_service::io_service]
 
 
 ['Inherited from io_service.]
@@ -38201,9 +58993,9 @@
 
 
 
-[section:is_open stream_socket_service::is_open]
+[section:is_open windows::random_access_handle_service::is_open]
 
-Determine whether the socket is open.
+Determine whether the handle is open.
 
   bool is_open(
       const implementation_type & impl) const;
@@ -38214,23 +59006,9 @@
 
 
 
-[section:local_endpoint stream_socket_service::local_endpoint]
-
-Get the local endpoint.
-
- endpoint_type local_endpoint(
- const implementation_type & impl,
- boost::system::error_code & ec) const;
-
+[section:native windows::random_access_handle_service::native]
 
-
-[endsect]
-
-
-
-[section:native stream_socket_service::native]
-
-Get the native socket implementation.
+Get the native handle implementation.
 
   native_type native(
       implementation_type & impl);
@@ -38241,9 +59019,9 @@
 
 
 
-[section:native_type stream_socket_service::native_type]
+[section:native_type windows::random_access_handle_service::native_type]
 
-The native socket type.
+The native handle type.
 
   typedef implementation_defined native_type;
 
@@ -38254,27 +59032,12 @@
 
 
 
-[section:open stream_socket_service::open]
-
-Open a stream socket.
-
- boost::system::error_code open(
- implementation_type & impl,
- const protocol_type & protocol,
- boost::system::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:protocol_type stream_socket_service::protocol_type]
-
-The protocol type.
+[section:random_access_handle_service windows::random_access_handle_service::random_access_handle_service]
 
- typedef Protocol protocol_type;
+Construct a new random-access handle service for the specified io_service.
 
+ random_access_handle_service(
+ boost::asio::io_service & io_service);
 
 
 
@@ -38282,16 +59045,16 @@
 
 
 
-[section:receive stream_socket_service::receive]
+[section:read_some_at windows::random_access_handle_service::read_some_at]
 
-Receive some data from the peer.
+Read some data from the specified offset.
 
   template<
       typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t receive(
+ std::size_t read_some_at(
       implementation_type & impl,
+ boost::uint64_t offset,
       const MutableBufferSequence & buffers,
- socket_base::message_flags flags,
       boost::system::error_code & ec);
 
 
@@ -38300,13 +59063,11 @@
 
 
 
-[section:remote_endpoint stream_socket_service::remote_endpoint]
+[section:shutdown_service windows::random_access_handle_service::shutdown_service]
 
-Get the remote endpoint.
+Destroy all user-defined handler objects owned by the service.
 
- endpoint_type remote_endpoint(
- const implementation_type & impl,
- boost::system::error_code & ec) const;
+ void shutdown_service();
 
 
 
@@ -38314,16 +59075,16 @@
 
 
 
-[section:send stream_socket_service::send]
+[section:write_some_at windows::random_access_handle_service::write_some_at]
 
-Send the given data to the peer.
+Write the given data at the specified offset.
 
   template<
       typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t send(
+ std::size_t write_some_at(
       implementation_type & impl,
+ boost::uint64_t offset,
       const ConstBufferSequence & buffers,
- socket_base::message_flags flags,
       boost::system::error_code & ec);
 
 
@@ -38332,71 +59093,158 @@
 
 
 
-[section:set_option stream_socket_service::set_option]
-
-Set a socket option.
-
- template<
- typename ``[link boost_asio.reference.SettableSocketOption SettableSocketOption]``>
- boost::system::error_code set_option(
- implementation_type & impl,
- const SettableSocketOption & option,
- boost::system::error_code & ec);
-
+[endsect]
 
 
-[endsect]
+[section:windows__stream_handle windows::stream_handle]
 
+Typedef for the typical usage of a stream-oriented handle.
 
+ typedef basic_stream_handle stream_handle;
 
-[section:shutdown stream_socket_service::shutdown]
 
-Disable sends or receives on the socket.
+[heading Types]
+[table
+ [[Name][Description]]
 
- boost::system::error_code shutdown(
- implementation_type & impl,
- socket_base::shutdown_type what,
- boost::system::error_code & ec);
+ [
 
+ [[link boost_asio.reference.windows__basic_stream_handle.implementation_type [*implementation_type]]]
+ [The underlying implementation type of I/O object. ]
+
+ ]
 
+ [
 
-[endsect]
+ [[link boost_asio.reference.windows__basic_stream_handle.lowest_layer_type [*lowest_layer_type]]]
+ [A basic_handle is always the lowest layer. ]
+
+ ]
 
+ [
 
+ [[link boost_asio.reference.windows__basic_stream_handle.native_type [*native_type]]]
+ [The native representation of a handle. ]
+
+ ]
 
-[section:shutdown_service stream_socket_service::shutdown_service]
+ [
 
-Destroy all user-defined handler objects owned by the service.
+ [[link boost_asio.reference.windows__basic_stream_handle.service_type [*service_type]]]
+ [The type of the service that will be used to provide I/O operations. ]
+
+ ]
 
- void shutdown_service();
+]
 
+[heading Member Functions]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.assign [*assign]]]
+ [Assign an existing native handle to the handle. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.async_read_some [*async_read_some]]]
+ [Start an asynchronous read. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.async_write_some [*async_write_some]]]
+ [Start an asynchronous write. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.basic_stream_handle [*basic_stream_handle]]]
+ [Construct a basic_stream_handle without opening it. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the handle. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.close [*close]]]
+ [Close the handle. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.get_io_service [*get_io_service]]]
+ [Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service associated with the object. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.is_open [*is_open]]]
+ [Determine whether the handle is open. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.lowest_layer [*lowest_layer]]]
+ [Get a reference to the lowest layer. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.native [*native]]]
+ [Get the native handle representation. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.read_some [*read_some]]]
+ [Read some data from the handle. ]
+ ]
+
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.write_some [*write_some]]]
+ [Write some data to the handle. ]
+ ]
+
+]
 
-[endsect]
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
 
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.implementation [*implementation]]]
+ [The underlying implementation of the I/O object. ]
+ ]
 
+ [
+ [[link boost_asio.reference.windows__basic_stream_handle.service [*service]]]
+ [The service associated with the I/O object. ]
+ ]
 
-[section:stream_socket_service stream_socket_service::stream_socket_service]
+]
 
-Construct a new stream socket service for the specified io_service.
+The windows::basic_stream_handle class template provides asynchronous and blocking stream-oriented handle functionality.
 
- stream_socket_service(
- boost::asio::io_service & io_service);
 
+[heading Thread Safety]
+
+[*Distinct] [*objects:] Safe.
 
+[*Shared] [*objects:] Unsafe.
 
-[endsect]
 
 
 
 [endsect]
 
 
-[section:streambuf streambuf]
+[section:windows__stream_handle_service windows::stream_handle_service]
 
-Typedef for the typical usage of basic_streambuf.
+Default service implementation for a stream handle.
 
- typedef basic_streambuf streambuf;
+ class stream_handle_service :
+ public io_service::service
 
 
 [heading Types]
@@ -38405,15 +59253,15 @@
 
   [
 
- [[link boost_asio.reference.basic_streambuf.const_buffers_type [*const_buffers_type]]]
- [The type used to represent the get area as a list of buffers. ]
+ [[link boost_asio.reference.windows__stream_handle_service.implementation_type [*implementation_type]]]
+ [The type of a stream handle implementation. ]
   
   ]
 
   [
 
- [[link boost_asio.reference.basic_streambuf.mutable_buffers_type [*mutable_buffers_type]]]
- [The type used to represent the put area as a list of buffers. ]
+ [[link boost_asio.reference.windows__stream_handle_service.native_type [*native_type]]]
+ [The native handle type. ]
   
   ]
 
@@ -38424,114 +59272,166 @@
   [[Name][Description]]
 
   [
- [[link boost_asio.reference.basic_streambuf.basic_streambuf [*basic_streambuf]]]
- [Construct a buffer with a specified maximum size. ]
+ [[link boost_asio.reference.windows__stream_handle_service.assign [*assign]]]
+ [Assign an existing native handle to a stream handle. ]
   ]
   
   [
- [[link boost_asio.reference.basic_streambuf.commit [*commit]]]
- [Move the start of the put area by the specified number of characters. ]
+ [[link boost_asio.reference.windows__stream_handle_service.async_read_some [*async_read_some]]]
+ [Start an asynchronous read. ]
   ]
   
   [
- [[link boost_asio.reference.basic_streambuf.consume [*consume]]]
- [Move the start of the get area by the specified number of characters. ]
+ [[link boost_asio.reference.windows__stream_handle_service.async_write_some [*async_write_some]]]
+ [Start an asynchronous write. ]
   ]
   
   [
- [[link boost_asio.reference.basic_streambuf.data [*data]]]
- [Get a list of buffers that represents the get area. ]
+ [[link boost_asio.reference.windows__stream_handle_service.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the handle. ]
   ]
   
   [
- [[link boost_asio.reference.basic_streambuf.max_size [*max_size]]]
- [Return the maximum size of the buffer. ]
+ [[link boost_asio.reference.windows__stream_handle_service.close [*close]]]
+ [Close a stream handle implementation. ]
   ]
   
   [
- [[link boost_asio.reference.basic_streambuf.prepare [*prepare]]]
- [Get a list of buffers that represents the put area, with the given size. ]
+ [[link boost_asio.reference.windows__stream_handle_service.construct [*construct]]]
+ [Construct a new stream handle implementation. ]
   ]
   
   [
- [[link boost_asio.reference.basic_streambuf.size [*size]]]
- [Return the size of the get area in characters. ]
+ [[link boost_asio.reference.windows__stream_handle_service.destroy [*destroy]]]
+ [Destroy a stream handle implementation. ]
   ]
   
-]
-
-
-
-[endsect]
-
-
-[section:time_traits_lt__ptime__gt_ time_traits< boost::posix_time::ptime >]
-
-Time traits specialised for posix_time.
-
- template<>
- struct time_traits< boost::posix_time::ptime >
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
   [
-
- [[link boost_asio.reference.time_traits_lt__ptime__gt_.duration_type [*duration_type]]]
- [The duration type. ]
-
+ [[link boost_asio.reference.windows__stream_handle_service.get_io_service [*get_io_service]]]
+ [Get the io_service object that owns the service. ]
   ]
-
+
   [
-
- [[link boost_asio.reference.time_traits_lt__ptime__gt_.time_type [*time_type]]]
- [The time type. ]
+ [[link boost_asio.reference.windows__stream_handle_service.io_service [*io_service]]]
+ [(Deprecated: use get_io_service().) Get the io_service object that owns the service. ]
+ ]
   
+ [
+ [[link boost_asio.reference.windows__stream_handle_service.is_open [*is_open]]]
+ [Determine whether the handle is open. ]
   ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
+
   [
- [[link boost_asio.reference.time_traits_lt__ptime__gt_.add [*add]]]
- [Add a duration to a time. ]
+ [[link boost_asio.reference.windows__stream_handle_service.native [*native]]]
+ [Get the native handle implementation. ]
   ]
   
   [
- [[link boost_asio.reference.time_traits_lt__ptime__gt_.less_than [*less_than]]]
- [Test whether one time is less than another. ]
+ [[link boost_asio.reference.windows__stream_handle_service.read_some [*read_some]]]
+ [Read some data from the stream. ]
   ]
   
   [
- [[link boost_asio.reference.time_traits_lt__ptime__gt_.now [*now]]]
- [Get the current time. ]
+ [[link boost_asio.reference.windows__stream_handle_service.shutdown_service [*shutdown_service]]]
+ [Destroy all user-defined handler objects owned by the service. ]
   ]
   
   [
- [[link boost_asio.reference.time_traits_lt__ptime__gt_.subtract [*subtract]]]
- [Subtract one time from another. ]
+ [[link boost_asio.reference.windows__stream_handle_service.stream_handle_service [*stream_handle_service]]]
+ [Construct a new stream handle service for the specified io_service. ]
   ]
   
   [
- [[link boost_asio.reference.time_traits_lt__ptime__gt_.to_posix_duration [*to_posix_duration]]]
- [Convert to POSIX duration type. ]
+ [[link boost_asio.reference.windows__stream_handle_service.write_some [*write_some]]]
+ [Write the given data to the stream. ]
   ]
   
 ]
 
+[heading Data Members]
+[table
+ [[Name][Description]]
 
-[section:add time_traits< boost::posix_time::ptime >::add]
+ [
+ [[link boost_asio.reference.windows__stream_handle_service.id [*id]]]
+ [The unique service identifier. ]
+ ]
+
+]
+
+
+[section:assign windows::stream_handle_service::assign]
+
+Assign an existing native handle to a stream handle.
+
+ boost::system::error_code assign(
+ implementation_type & impl,
+ const native_type & native_handle,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:async_read_some windows::stream_handle_service::async_read_some]
+
+Start an asynchronous read.
+
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``,
+ typename ``[link boost_asio.reference.ReadHandler ReadHandler]``>
+ void async_read_some(
+ implementation_type & impl,
+ const MutableBufferSequence & buffers,
+ ReadHandler handler);
+
+
+
+[endsect]
+
+
+
+[section:async_write_some windows::stream_handle_service::async_write_some]
+
+Start an asynchronous write.
+
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename ``[link boost_asio.reference.WriteHandler WriteHandler]``>
+ void async_write_some(
+ implementation_type & impl,
+ const ConstBufferSequence & buffers,
+ WriteHandler handler);
+
+
+
+[endsect]
+
+
+
+[section:cancel windows::stream_handle_service::cancel]
+
+Cancel all asynchronous operations associated with the handle.
+
+ boost::system::error_code cancel(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:close windows::stream_handle_service::close]
 
-Add a duration to a time.
+Close a stream handle implementation.
 
- static time_type add(
- const time_type & t,
- const duration_type & d);
+ boost::system::error_code close(
+ implementation_type & impl,
+ boost::system::error_code & ec);
 
 
 
@@ -38539,12 +59439,12 @@
 
 
 
-[section:duration_type time_traits< boost::posix_time::ptime >::duration_type]
-
-The duration type.
+[section:construct windows::stream_handle_service::construct]
 
- typedef boost::posix_time::time_duration duration_type;
+Construct a new stream handle implementation.
 
+ void construct(
+ implementation_type & impl);
 
 
 
@@ -38552,13 +59452,12 @@
 
 
 
-[section:less_than time_traits< boost::posix_time::ptime >::less_than]
+[section:destroy windows::stream_handle_service::destroy]
 
-Test whether one time is less than another.
+Destroy a stream handle implementation.
 
- static bool less_than(
- const time_type & t1,
- const time_type & t2);
+ void destroy(
+ implementation_type & impl);
 
 
 
@@ -38566,11 +59465,14 @@
 
 
 
-[section:now time_traits< boost::posix_time::ptime >::now]
+[section:get_io_service windows::stream_handle_service::get_io_service]
 
-Get the current time.
 
- static time_type now();
+['Inherited from io_service.]
+
+Get the io_service object that owns the service.
+
+ boost::asio::io_service & get_io_service();
 
 
 
@@ -38578,13 +59480,11 @@
 
 
 
-[section:subtract time_traits< boost::posix_time::ptime >::subtract]
+[section:id windows::stream_handle_service::id]
 
-Subtract one time from another.
+The unique service identifier.
 
- static duration_type subtract(
- const time_type & t1,
- const time_type & t2);
+ static boost::asio::io_service::id id;
 
 
 
@@ -38592,11 +59492,11 @@
 
 
 
-[section:time_type time_traits< boost::posix_time::ptime >::time_type]
+[section:implementation_type windows::stream_handle_service::implementation_type]
 
-The time type.
+The type of a stream handle implementation.
 
- typedef boost::posix_time::ptime time_type;
+ typedef implementation_defined implementation_type;
 
 
 
@@ -38605,12 +59505,14 @@
 
 
 
-[section:to_posix_duration time_traits< boost::posix_time::ptime >::to_posix_duration]
+[section:io_service windows::stream_handle_service::io_service]
 
-Convert to POSIX duration type.
 
- static boost::posix_time::time_duration to_posix_duration(
- const duration_type & d);
+['Inherited from io_service.]
+
+(Deprecated: use get_io_service().) Get the io_service object that owns the service.
+
+ boost::asio::io_service & io_service();
 
 
 
@@ -38618,38 +59520,37 @@
 
 
 
+[section:is_open windows::stream_handle_service::is_open]
+
+Determine whether the handle is open.
+
+ bool is_open(
+ const implementation_type & impl) const;
+
+
+
 [endsect]
 
 
-[section:transfer_all transfer_all]
 
-Return a completion condition function object that indicates that a read or write operation should continue until all of the data has been transferred, or until an error occurs.
+[section:native windows::stream_handle_service::native]
 
- unspecified transfer_all();
+Get the native handle implementation.
 
+ native_type native(
+ implementation_type & impl);
 
-This function is used to create an object, of unspecified type, that meets CompletionCondition requirements.
 
 
-[heading Example]
-
-Reading until a buffer is full:
+[endsect]
 
- boost::array<char, 128> buf;
- boost::system::error_code ec;
- std::size_t n = boost::asio::read(
- sock, boost::asio::buffer(buf),
- boost::asio::transfer_all(), ec);
- if (ec)
- {
- // An error occurred.
- }
- else
- {
- // n == 128
- }
 
 
+[section:native_type windows::stream_handle_service::native_type]
+
+The native handle type.
+
+ typedef implementation_defined native_type;
 
 
 
@@ -38658,37 +59559,28 @@
 
 
 
-[section:transfer_at_least transfer_at_least]
+[section:read_some windows::stream_handle_service::read_some]
 
-Return a completion condition function object that indicates that a read or write operation should continue until a minimum number of bytes has been transferred, or until an error occurs.
+Read some data from the stream.
 
- unspecified transfer_at_least(
- std::size_t minimum);
+ template<
+ typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``>
+ std::size_t read_some(
+ implementation_type & impl,
+ const MutableBufferSequence & buffers,
+ boost::system::error_code & ec);
 
 
-This function is used to create an object, of unspecified type, that meets CompletionCondition requirements.
 
+[endsect]
 
-[heading Example]
-
-Reading until a buffer is full or contains at least 64 bytes:
 
- boost::array<char, 128> buf;
- boost::system::error_code ec;
- std::size_t n = boost::asio::read(
- sock, boost::asio::buffer(buf),
- boost::asio::transfer_at_least(64), ec);
- if (ec)
- {
- // An error occurred.
- }
- else
- {
- // n >= 64 && n <= 128
- }
 
+[section:shutdown_service windows::stream_handle_service::shutdown_service]
 
+Destroy all user-defined handler objects owned by the service.
 
+ void shutdown_service();
 
 
 
@@ -38696,37 +59588,38 @@
 
 
 
-[section:use_service use_service]
+[section:stream_handle_service windows::stream_handle_service::stream_handle_service]
 
+Construct a new stream handle service for the specified io_service.
 
+ stream_handle_service(
+ boost::asio::io_service & io_service);
 
- template<
- typename ``[link boost_asio.reference.Service Service]``>
- Service & use_service(
- io_service & ios);
 
 
-This function is used to locate a service object that corresponds to the given service type. If there is no existing implementation of the service, then the io_service will create a new instance of the service.
+[endsect]
 
 
-[heading Parameters]
-
 
-[variablelist
-
-[[ios][The io\_service object that owns the service.]]
+[section:write_some windows::stream_handle_service::write_some]
 
-]
+Write the given data to the stream.
 
-[heading Return Value]
-
-The service interface implementing the specified service type. Ownership of the service interface is not transferred to the caller.
+ template<
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t write_some(
+ implementation_type & impl,
+ const ConstBufferSequence & buffers,
+ boost::system::error_code & ec);
 
 
 
 [endsect]
 
 
+
+[endsect]
+
 [section:write write]
 
 Write all of the supplied data to a stream before returning.
@@ -39000,7 +59893,7 @@
 
 [section:overload4 write (4 of 6 overloads)]
 
-Write a certain amount of data to a stream before returning.
+Write all of the supplied data to a stream before returning.
 
   template<
       typename ``[link boost_asio.reference.SyncWriteStream SyncWriteStream]``,
@@ -39190,6 +60083,493 @@
 
 [endsect]
 
+[section:write_at write_at]
+
+Write all of the supplied data at the specified offset before returning.
+
+ template<
+ typename ``[link boost_asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t ``[link boost_asio.reference.write_at.overload1 write_at]``(
+ SyncRandomAccessWriteDevice & d,
+ boost::uint64_t offset,
+ const ConstBufferSequence & buffers);
+
+ template<
+ typename ``[link boost_asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename CompletionCondition>
+ std::size_t ``[link boost_asio.reference.write_at.overload2 write_at]``(
+ SyncRandomAccessWriteDevice & d,
+ boost::uint64_t offset,
+ const ConstBufferSequence & buffers,
+ CompletionCondition completion_condition);
+
+ template<
+ typename ``[link boost_asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename CompletionCondition>
+ std::size_t ``[link boost_asio.reference.write_at.overload3 write_at]``(
+ SyncRandomAccessWriteDevice & d,
+ boost::uint64_t offset,
+ const ConstBufferSequence & buffers,
+ CompletionCondition completion_condition,
+ boost::system::error_code & ec);
+
+ template<
+ typename ``[link boost_asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
+ typename Allocator>
+ std::size_t ``[link boost_asio.reference.write_at.overload4 write_at]``(
+ SyncRandomAccessWriteDevice & d,
+ boost::uint64_t offset,
+ basic_streambuf< Allocator > & b);
+
+ template<
+ typename ``[link boost_asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
+ typename Allocator,
+ typename CompletionCondition>
+ std::size_t ``[link boost_asio.reference.write_at.overload5 write_at]``(
+ SyncRandomAccessWriteDevice & d,
+ boost::uint64_t offset,
+ basic_streambuf< Allocator > & b,
+ CompletionCondition completion_condition);
+
+ template<
+ typename ``[link boost_asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
+ typename Allocator,
+ typename CompletionCondition>
+ std::size_t ``[link boost_asio.reference.write_at.overload6 write_at]``(
+ SyncRandomAccessWriteDevice & d,
+ boost::uint64_t offset,
+ basic_streambuf< Allocator > & b,
+ CompletionCondition completion_condition,
+ boost::system::error_code & ec);
+
+
+[section:overload1 write_at (1 of 6 overloads)]
+
+Write all of the supplied data at the specified offset before returning.
+
+ template<
+ typename ``[link boost_asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``>
+ std::size_t write_at(
+ SyncRandomAccessWriteDevice & d,
+ boost::uint64_t offset,
+ const ConstBufferSequence & buffers);
+
+
+This function is used to write a certain number of bytes of data to a random access device at a specified offset. The call will block until one of the following conditions is true:
+
+
+* All of the data in the supplied buffers has been written. That is, the bytes transferred is equal to the sum of the buffer sizes.
+
+* An error occurred.
+
+This operation is implemented in terms of one or more calls to the device's write\_some\_at function.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[d][The device to which the data is to be written. The type must support the SyncRandomAccessWriteDevice concept.]]
+
+[[offset][The offset at which the data will be written.]]
+
+[[buffers][One or more buffers containing the data to be written. The sum of the buffer sizes indicates the maximum number of bytes to write to the device.]]
+
+]
+
+[heading Return Value]
+
+The number of bytes transferred.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Example]
+
+To write a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ boost::asio::write_at(d, 42, boost::asio::buffer(data, size));
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+
+[heading Remarks]
+
+This overload is equivalent to calling:
+
+ boost::asio::write_at(
+ d, offset, buffers,
+ boost::asio::transfer_all());
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:overload2 write_at (2 of 6 overloads)]
+
+Write a certain amount of data at a specified offset before returning.
+
+ template<
+ typename ``[link boost_asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename CompletionCondition>
+ std::size_t write_at(
+ SyncRandomAccessWriteDevice & d,
+ boost::uint64_t offset,
+ const ConstBufferSequence & buffers,
+ CompletionCondition completion_condition);
+
+
+This function is used to write a certain number of bytes of data to a random access device at a specified offset. The call will block until one of the following conditions is true:
+
+
+* All of the data in the supplied buffers has been written. That is, the bytes transferred is equal to the sum of the buffer sizes.
+
+* The completion_condition function object returns true.
+
+This operation is implemented in terms of one or more calls to the device's write\_some\_at function.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[d][The device to which the data is to be written. The type must support the SyncRandomAccessWriteDevice concept.]]
+
+[[offset][The offset at which the data will be written.]]
+
+[[buffers][One or more buffers containing the data to be written. The sum of the buffer sizes indicates the maximum number of bytes to write to the device.]]
+
+[[completion_condition][The function object to be called to determine whether the write operation is complete. The signature of the function object must be:
+``
+ bool completion_condition(
+ // Result of latest write_some_at operation.
+ const boost::system::error_code& error,
+
+ // Number of bytes transferred so far.
+ std::size_t bytes_transferred
+ );
+
+``
+A return value of true indicates that the write operation is complete. False indicates that further calls to the device's write\_some\_at function are required.]]
+
+]
+
+[heading Return Value]
+
+The number of bytes transferred.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Example]
+
+To write a single data buffer use the
+[link boost_asio.reference.buffer buffer] function as follows:
+
+ boost::asio::write_at(d, 42, boost::asio::buffer(data, size),
+ boost::asio::transfer_at_least(32));
+
+
+See the
+[link boost_asio.reference.buffer buffer] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
+
+
+
+[endsect]
+
+
+
+[section:overload3 write_at (3 of 6 overloads)]
+
+Write a certain amount of data at a specified offset before returning.
+
+ template<
+ typename ``[link boost_asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
+ typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``,
+ typename CompletionCondition>
+ std::size_t write_at(
+ SyncRandomAccessWriteDevice & d,
+ boost::uint64_t offset,
+ const ConstBufferSequence & buffers,
+ CompletionCondition completion_condition,
+ boost::system::error_code & ec);
+
+
+This function is used to write a certain number of bytes of data to a random access device at a specified offset. The call will block until one of the following conditions is true:
+
+
+* All of the data in the supplied buffers has been written. That is, the bytes transferred is equal to the sum of the buffer sizes.
+
+* The completion_condition function object returns true.
+
+This operation is implemented in terms of one or more calls to the device's write\_some\_at function.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[d][The device to which the data is to be written. The type must support the SyncRandomAccessWriteDevice concept.]]
+
+[[offset][The offset at which the data will be written.]]
+
+[[buffers][One or more buffers containing the data to be written. The sum of the buffer sizes indicates the maximum number of bytes to write to the device.]]
+
+[[completion_condition][The function object to be called to determine whether the write operation is complete. The signature of the function object must be:
+``
+ bool completion_condition(
+ // Result of latest write_some_at operation.
+ const boost::system::error_code& error,
+
+ // Number of bytes transferred so far.
+ std::size_t bytes_transferred
+ );
+
+``
+A return value of true indicates that the write operation is complete. False indicates that further calls to the device's write\_some\_at function are required.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Return Value]
+
+The number of bytes written. If an error occurs, returns the total number of bytes successfully transferred prior to the error.
+
+
+
+[endsect]
+
+
+
+[section:overload4 write_at (4 of 6 overloads)]
+
+Write all of the supplied data at the specified offset before returning.
+
+ template<
+ typename ``[link boost_asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
+ typename Allocator>
+ std::size_t write_at(
+ SyncRandomAccessWriteDevice & d,
+ boost::uint64_t offset,
+ basic_streambuf< Allocator > & b);
+
+
+This function is used to write a certain number of bytes of data to a random access device at a specified offset. The call will block until one of the following conditions is true:
+
+
+* All of the data in the supplied basic_streambuf has been written.
+
+* An error occurred.
+
+This operation is implemented in terms of one or more calls to the device's write\_some\_at function.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[d][The device to which the data is to be written. The type must support the SyncRandomAccessWriteDevice concept.]]
+
+[[offset][The offset at which the data will be written.]]
+
+[[b][The basic\_streambuf object from which data will be written.]]
+
+]
+
+[heading Return Value]
+
+The number of bytes transferred.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure.]]
+
+]
+
+[heading Remarks]
+
+This overload is equivalent to calling:
+
+ boost::asio::write_at(
+ d, 42, b,
+ boost::asio::transfer_all());
+
+
+
+
+
+
+[endsect]
+
+
+
+[section:overload5 write_at (5 of 6 overloads)]
+
+Write a certain amount of data at a specified offset before returning.
+
+ template<
+ typename ``[link boost_asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
+ typename Allocator,
+ typename CompletionCondition>
+ std::size_t write_at(
+ SyncRandomAccessWriteDevice & d,
+ boost::uint64_t offset,
+ basic_streambuf< Allocator > & b,
+ CompletionCondition completion_condition);
+
+
+This function is used to write a certain number of bytes of data to a random access device at a specified offset. The call will block until one of the following conditions is true:
+
+
+* All of the data in the supplied basic_streambuf has been written.
+
+* The completion_condition function object returns true.
+
+This operation is implemented in terms of one or more calls to the device's write\_some\_at function.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[d][The device to which the data is to be written. The type must support the SyncRandomAccessWriteDevice concept.]]
+
+[[offset][The offset at which the data will be written.]]
+
+[[b][The basic\_streambuf object from which data will be written.]]
+
+[[completion_condition][The function object to be called to determine whether the write operation is complete. The signature of the function object must be:
+``
+ bool completion_condition(
+ // Result of latest write_some_at operation.
+ const boost::system::error_code& error,
+
+ // Number of bytes transferred so far.
+ std::size_t bytes_transferred
+ );
+
+``
+A return value of true indicates that the write operation is complete. False indicates that further calls to the device's write\_some\_at function are required.]]
+
+]
+
+[heading Return Value]
+
+The number of bytes transferred.
+
+[heading Exceptions]
+
+
+[variablelist
+
+[[boost::system::system_error][Thrown on failure. ]]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:overload6 write_at (6 of 6 overloads)]
+
+Write a certain amount of data at a specified offset before returning.
+
+ template<
+ typename ``[link boost_asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
+ typename Allocator,
+ typename CompletionCondition>
+ std::size_t write_at(
+ SyncRandomAccessWriteDevice & d,
+ boost::uint64_t offset,
+ basic_streambuf< Allocator > & b,
+ CompletionCondition completion_condition,
+ boost::system::error_code & ec);
+
+
+This function is used to write a certain number of bytes of data to a random access device at a specified offset. The call will block until one of the following conditions is true:
+
+
+* All of the data in the supplied basic_streambuf has been written.
+
+* The completion_condition function object returns true.
+
+This operation is implemented in terms of one or more calls to the device's write\_some\_at function.
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[d][The device to which the data is to be written. The type must support the SyncRandomAccessWriteDevice concept.]]
+
+[[offset][The offset at which the data will be written.]]
+
+[[b][The basic\_streambuf object from which data will be written.]]
+
+[[completion_condition][The function object to be called to determine whether the write operation is complete. The signature of the function object must be:
+``
+ bool completion_condition(
+ // Result of latest write_some_at operation.
+ const boost::system::error_code& error,
+
+ // Number of bytes transferred so far.
+ std::size_t bytes_transferred
+ );
+
+``
+A return value of true indicates that the write operation is complete. False indicates that further calls to the device's write\_some\_at function are required.]]
+
+[[ec][Set to indicate what error occurred, if any.]]
+
+]
+
+[heading Return Value]
+
+The number of bytes written. If an error occurs, returns the total number of bytes successfully transferred prior to the error.
+
+
+
+[endsect]
+
+
+[endsect]
+
 [section:is_error_code_enum_lt__addrinfo_errors__gt_ boost::system::is_error_code_enum< boost::asio::error::addrinfo_errors >]
 
 

Modified: branches/release/libs/asio/doc/reference.xsl
==============================================================================
--- branches/release/libs/asio/doc/reference.xsl (original)
+++ branches/release/libs/asio/doc/reference.xsl 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -45,9 +45,11 @@
 [include requirements/ConvertibleToConstBuffer.qbk]
 [include requirements/ConvertibleToMutableBuffer.qbk]
 [include requirements/DatagramSocketService.qbk]
+[include requirements/DescriptorService.qbk]
 [include requirements/Endpoint.qbk]
 [include requirements/GettableSocketOption.qbk]
 [include requirements/Handler.qbk]
+[include requirements/HandleService.qbk]
 [include requirements/InternetProtocol.qbk]
 [include requirements/IoControlCommand.qbk]
 [include requirements/IoObjectService.qbk]
@@ -60,6 +62,8 @@
 [include requirements/SettableSocketOption.qbk]
 [include requirements/SocketAcceptorService.qbk]
 [include requirements/SocketService.qbk]
+[include requirements/StreamDescriptorService.qbk]
+[include requirements/StreamHandleService.qbk]
 [include requirements/StreamSocketService.qbk]
 [include requirements/SyncReadStream.qbk]
 [include requirements/SyncWriteStream.qbk]
@@ -85,7 +89,9 @@
         </xsl:if>
       </xsl:when>
       <xsl:otherwise>
- <xsl:if test="not(contains(ancestor::*/compoundname, '::detail'))">
+ <xsl:if test="
+ not(contains(ancestor::*/compoundname, '::detail')) and
+ not(contains(ancestor::*/compoundname, '_helper'))">
           <xsl:call-template name="namespace-memberdef"/>
         </xsl:if>
       </xsl:otherwise>
@@ -191,6 +197,12 @@
          select="concat(substring-before($name, '&gt;'), '_gt_', substring-after($name, '&gt;'))"/>
       </xsl:call-template>
     </xsl:when>
+ <xsl:when test="contains($name, '+')">
+ <xsl:call-template name="make-id">
+ <xsl:with-param name="name"
+ select="concat(substring-before($name, '+'), '_plus_', substring-after($name, '+'))"/>
+ </xsl:call-template>
+ </xsl:when>
     <xsl:when test="contains($name, '~')">
       <xsl:call-template name="make-id">
         <xsl:with-param name="name"
@@ -616,11 +628,11 @@
 ]
 </xsl:if>
 
-<xsl:if test="count(sectiondef[@kind='friend']/memberdef[not(type = 'friend class')]) &gt; 0">
-[heading Friends]
+<xsl:if test="count(sectiondef[@kind='protected-func' or @kind='protected-static-func']) > 0">
+[heading Protected Member Functions]
 [table
   [[Name][Description]]
-<xsl:for-each select="sectiondef[@kind='friend']/memberdef[not(type = 'friend class')]" mode="class-table">
+<xsl:for-each select="sectiondef[@kind='protected-func' or @kind='protected-static-func']/memberdef" mode="class-table">
   <xsl:sort select="name"/>
   <xsl:variable name="name">
     <xsl:value-of select="name"/>
@@ -665,13 +677,99 @@
 </xsl:for-each>
 ]
 </xsl:if>
+
+<xsl:if test="count(sectiondef[@kind='protected-attrib' or @kind='protected-static-attrib']) > 0">
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+<xsl:for-each select="sectiondef[@kind='protected-attrib' or @kind='protected-static-attrib']/memberdef" mode="class-table">
+ <xsl:sort select="name"/>
+ [
+ [[link boost_asio.reference.<xsl:value-of select="$class-id"/>.<xsl:value-of select="name"/>
+ <xsl:text> </xsl:text>[*<xsl:value-of select="name"/>]]]
+ [<xsl:value-of select="briefdescription"/>]
+ ]
+</xsl:for-each>
+]
+</xsl:if>
+
+<xsl:if test="count(sectiondef[@kind='friend']/memberdef[not(type = 'friend class') and not(contains(name, '_helper'))]) &gt; 0">
+[heading Friends]
+[table
+ [[Name][Description]]
+<xsl:for-each select="sectiondef[@kind='friend']/memberdef[not(type = 'friend class') and not(contains(name, '_helper'))]" mode="class-table">
+ <xsl:sort select="name"/>
+ <xsl:variable name="name">
+ <xsl:value-of select="name"/>
+ </xsl:variable>
+ <xsl:variable name="id">
+ <xsl:call-template name="make-id">
+ <xsl:with-param name="name" select="$name"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="doxygen-id">
+ <xsl:value-of select="@id"/>
+ </xsl:variable>
+ <xsl:variable name="overload-position">
+ <xsl:for-each select="../memberdef[name = $name]">
+ <xsl:if test="@id = $doxygen-id">
+ <xsl:value-of select="position()"/>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:if test="$overload-position = 1">
+ [
+ [[link boost_asio.reference.<xsl:value-of select="$class-id"/>.<xsl:value-of select="$id"/>
+ <xsl:text> </xsl:text>[*<xsl:value-of select="$name"/>]]]
+ [<xsl:value-of select="briefdescription"/>]
+ ]
+ </xsl:if>
+</xsl:for-each>
+]
+</xsl:if>
+
+<xsl:if test="count(sectiondef[@kind='related']/memberdef) &gt; 0">
+[heading Related Functions]
+[table
+ [[Name][Description]]
+<xsl:for-each select="sectiondef[@kind='related']/memberdef" mode="class-table">
+ <xsl:sort select="name"/>
+ <xsl:variable name="name">
+ <xsl:value-of select="name"/>
+ </xsl:variable>
+ <xsl:variable name="id">
+ <xsl:call-template name="make-id">
+ <xsl:with-param name="name" select="$name"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="doxygen-id">
+ <xsl:value-of select="@id"/>
+ </xsl:variable>
+ <xsl:variable name="overload-position">
+ <xsl:for-each select="../memberdef[name = $name]">
+ <xsl:if test="@id = $doxygen-id">
+ <xsl:value-of select="position()"/>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:if test="$overload-position = 1">
+ [
+ [[link boost_asio.reference.<xsl:value-of select="$class-id"/>.<xsl:value-of select="$id"/>
+ <xsl:text> </xsl:text>[*<xsl:value-of select="$name"/>]]]
+ [<xsl:value-of select="briefdescription"/>]
+ ]
+ </xsl:if>
+</xsl:for-each>
+]
+</xsl:if>
+
 </xsl:template>
 
 
 <xsl:template name="class-members">
 <xsl:param name="class-name"/>
 <xsl:param name="class-id"/>
-<xsl:apply-templates select="sectiondef[@kind='public-type' or @kind='public-func' or @kind='public-static-func' or @kind='public-attrib' or @kind='public-static-attrib' or @kind='friend']/memberdef[not(type = 'friend class')]" mode="class-detail">
+<xsl:apply-templates select="sectiondef[@kind='public-type' or @kind='public-func' or @kind='public-static-func' or @kind='public-attrib' or @kind='public-static-attrib' or @kind='protected-func' or @kind='protected-static-func' or @kind='protected-attrib' or @kind='protected-static-attrib' or @kind='friend' or @kind='related']/memberdef[not(type = 'friend class') and not(contains(name, '_helper'))]" mode="class-detail">
   <xsl:sort select="name"/>
   <xsl:with-param name="class-name" select="$class-name"/>
   <xsl:with-param name="class-id" select="$class-id"/>
@@ -818,8 +916,8 @@
 
 
 <xsl:template name="enum">
- enum <xsl:value-of select="name"/>
-
+ enum <xsl:value-of select="name"/><xsl:text>
+</xsl:text><xsl:if test="count(enumvalue) &gt; 0">
 [heading Values]
 [variablelist
 <xsl:for-each select="enumvalue">
@@ -829,6 +927,7 @@
   ]
 </xsl:for-each>
 ]
+</xsl:if>
 </xsl:template>
 
 

Modified: branches/release/libs/asio/doc/using.qbk
==============================================================================
--- branches/release/libs/asio/doc/using.qbk (original)
+++ branches/release/libs/asio/doc/using.qbk 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -255,6 +255,13 @@
         cancel the outstanding operations and close the socket.
     ]
   ]
+ [
+ [`BOOST_ASIO_NO_TYPEID`]
+ [
+ Disables uses of the `typeid` operator in Boost.Asio. Defined
+ automatically if `BOOST_NO_TYPEID` is defined.
+ ]
+ ]
 ]
 
 [endsect]

Modified: branches/release/libs/asio/example/invocation/prioritised_handlers.cpp
==============================================================================
--- branches/release/libs/asio/example/invocation/prioritised_handlers.cpp (original)
+++ branches/release/libs/asio/example/invocation/prioritised_handlers.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -13,6 +13,8 @@
 #include <iostream>
 #include <queue>
 
+using boost::asio::ip::tcp;
+
 class handler_priority_queue
 {
 public:
@@ -108,12 +110,12 @@
 
 //----------------------------------------------------------------------
 
-void high_priority_handler()
+void high_priority_handler(const boost::system::error_code& /*ec*/)
 {
   std::cout << "High priority handler\n";
 }
 
-void middle_priority_handler()
+void middle_priority_handler(const boost::system::error_code& /*ec*/)
 {
   std::cout << "Middle priority handler\n";
 }
@@ -129,9 +131,22 @@
 
   handler_priority_queue pri_queue;
 
+ // Post a completion handler to be run immediately.
   io_service.post(pri_queue.wrap(0, low_priority_handler));
- io_service.post(pri_queue.wrap(100, high_priority_handler));
- io_service.post(pri_queue.wrap(42, middle_priority_handler));
+
+ // Start an asynchronous accept that will complete immediately.
+ tcp::endpoint endpoint(boost::asio::ip::address_v4::loopback(), 0);
+ tcp::acceptor acceptor(io_service, endpoint);
+ tcp::socket server_socket(io_service);
+ acceptor.async_accept(server_socket,
+ pri_queue.wrap(100, high_priority_handler));
+ tcp::socket client_socket(io_service);
+ client_socket.connect(acceptor.local_endpoint());
+
+ // Set a deadline timer to expire immediately.
+ boost::asio::deadline_timer timer(io_service);
+ timer.expires_at(boost::posix_time::neg_infin);
+ timer.async_wait(pri_queue.wrap(42, middle_priority_handler));
 
   while (io_service.run_one())
   {

Modified: branches/release/libs/asio/test/Jamfile
==============================================================================
--- branches/release/libs/asio/test/Jamfile (original)
+++ branches/release/libs/asio/test/Jamfile 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -45,6 +45,7 @@
   [ run buffered_read_stream.cpp <template>asio_unit_test ]
   [ run buffered_stream.cpp <template>asio_unit_test ]
   [ run buffered_write_stream.cpp <template>asio_unit_test ]
+ [ run buffers_iterator.cpp <template>asio_unit_test ]
   [ run completion_condition.cpp <template>asio_unit_test ]
   [ run datagram_socket_service.cpp <template>asio_unit_test ]
   [ run deadline_timer_service.cpp <template>asio_unit_test ]
@@ -69,7 +70,16 @@
   [ run ip/v6_only.cpp <template>asio_unit_test ]
   [ run is_read_buffered.cpp <template>asio_unit_test ]
   [ run is_write_buffered.cpp <template>asio_unit_test ]
+ [ run local/basic_endpoint.cpp <template>asio_unit_test ]
+ [ run local/connect_pair.cpp <template>asio_unit_test ]
+ [ run local/datagram_protocol.cpp <template>asio_unit_test ]
+ [ run local/stream_protocol.cpp <template>asio_unit_test ]
   [ run placeholders.cpp <template>asio_unit_test ]
+ [ run posix/basic_descriptor.cpp <template>asio_unit_test ]
+ [ run posix/basic_stream_descriptor.cpp <template>asio_unit_test ]
+ [ run posix/descriptor_base.cpp <template>asio_unit_test ]
+ [ run posix/stream_descriptor.cpp <template>asio_unit_test ]
+ [ run posix/stream_descriptor_service.cpp <template>asio_unit_test ]
   [ run read.cpp <template>asio_unit_test ]
   [ run read_until.cpp <template>asio_unit_test ]
   [ run socket_acceptor_service.cpp <template>asio_unit_test ]
@@ -77,5 +87,12 @@
   [ run strand.cpp <template>asio_unit_test ]
   [ run stream_socket_service.cpp <template>asio_unit_test ]
   [ run time_traits.cpp <template>asio_unit_test ]
+ [ run windows/basic_handle.cpp <template>asio_unit_test ]
+ [ run windows/basic_random_access_handle.cpp <template>asio_unit_test ]
+ [ run windows/basic_stream_handle.cpp <template>asio_unit_test ]
+ [ run windows/random_access_handle.cpp <template>asio_unit_test ]
+ [ run windows/random_access_handle_service.cpp <template>asio_unit_test ]
+ [ run windows/stream_handle.cpp <template>asio_unit_test ]
+ [ run windows/stream_handle_service.cpp <template>asio_unit_test ]
   [ run write.cpp <template>asio_unit_test ]
   ;

Modified: branches/release/libs/asio/test/Jamfile.v2
==============================================================================
--- branches/release/libs/asio/test/Jamfile.v2 (original)
+++ branches/release/libs/asio/test/Jamfile.v2 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -68,6 +68,8 @@
   [ run buffered_stream.cpp : : : $(USE_SELECT) : buffered_stream_select ]
   [ run buffered_write_stream.cpp ]
   [ run buffered_write_stream.cpp : : : $(USE_SELECT) : buffered_write_stream_select ]
+ [ run buffers_iterator.cpp ]
+ [ run buffers_iterator.cpp : : : $(USE_SELECT) : buffers_iterator_select ]
   [ link completion_condition.cpp ]
   [ link completion_condition.cpp : $(USE_SELECT) : completion_condition_select ]
   [ link datagram_socket_service.cpp ]
@@ -116,8 +118,26 @@
   [ run is_read_buffered.cpp : : : $(USE_SELECT) : is_read_buffered_select ]
   [ run is_write_buffered.cpp ]
   [ run is_write_buffered.cpp : : : $(USE_SELECT) : is_write_buffered_select ]
+ [ link local/basic_endpoint.cpp : : local_basic_endpoint ]
+ [ link local/basic_endpoint.cpp : $(USE_SELECT) : local_basic_endpoint_select ]
+ [ link local/connect_pair.cpp : : local_connect_pair ]
+ [ link local/connect_pair.cpp : $(USE_SELECT) : local_connect_pair_select ]
+ [ link local/datagram_protocol.cpp : : local_datagram_protocol ]
+ [ link local/datagram_protocol.cpp : $(USE_SELECT) : local_datagram_protocol_select ]
+ [ link local/stream_protocol.cpp : : local_stream_protocol ]
+ [ link local/stream_protocol.cpp : $(USE_SELECT) : local_stream_protocol_select ]
   [ link placeholders.cpp ]
   [ link placeholders.cpp : $(USE_SELECT) : placeholders_select ]
+ [ link posix/basic_descriptor.cpp : : posix_basic_descriptor ]
+ [ link posix/basic_descriptor.cpp : $(USE_SELECT) : posix_basic_descriptor_select ]
+ [ link posix/basic_stream_descriptor.cpp : : posix_basic_stream_descriptor ]
+ [ link posix/basic_stream_descriptor.cpp : $(USE_SELECT) : posix_basic_stream_descriptor_select ]
+ [ link posix/descriptor_base.cpp : : posix_descriptor_base ]
+ [ link posix/descriptor_base.cpp : $(USE_SELECT) : posix_descriptor_base_select ]
+ [ link posix/stream_descriptor.cpp : : posix_stream_descriptor ]
+ [ link posix/stream_descriptor.cpp : $(USE_SELECT) : posix_stream_descriptor_select ]
+ [ link posix/stream_descriptor_service.cpp : : posix_stream_descriptor_service ]
+ [ link posix/stream_descriptor_service.cpp : $(USE_SELECT) : posix_stream_descriptor_service_select ]
   [ run read.cpp ]
   [ run read.cpp : : : $(USE_SELECT) : read_select ]
   [ run read_until.cpp ]
@@ -132,6 +152,20 @@
   [ link stream_socket_service.cpp : $(USE_SELECT) : stream_socket_service_select ]
   [ link time_traits.cpp ]
   [ link time_traits.cpp : $(USE_SELECT) : time_traits_select ]
+ [ link windows/basic_handle.cpp : : windows_basic_handle ]
+ [ link windows/basic_handle.cpp : $(USE_SELECT) : windows_basic_handle_select ]
+ [ link windows/basic_random_access_handle.cpp : : windows_basic_random_access_handle ]
+ [ link windows/basic_random_access_handle.cpp : $(USE_SELECT) : windows_basic_random_access_handle_select ]
+ [ link windows/basic_stream_handle.cpp : : windows_basic_stream_handle ]
+ [ link windows/basic_stream_handle.cpp : $(USE_SELECT) : windows_basic_stream_handle_select ]
+ [ link windows/random_access_handle.cpp : : windows_random_access_handle ]
+ [ link windows/random_access_handle.cpp : $(USE_SELECT) : windows_random_access_handle_select ]
+ [ link windows/random_access_handle_service.cpp : : windows_random_access_handle_service ]
+ [ link windows/random_access_handle_service.cpp : $(USE_SELECT) : windows_random_access_handle_service_select ]
+ [ link windows/stream_handle.cpp : : windows_stream_handle ]
+ [ link windows/stream_handle.cpp : $(USE_SELECT) : windows_stream_handle_select ]
+ [ link windows/stream_handle_service.cpp : : windows_stream_handle_service ]
+ [ link windows/stream_handle_service.cpp : $(USE_SELECT) : windows_stream_handle_service_select ]
   [ run write.cpp ]
   [ run write.cpp : : : $(USE_SELECT) : write_select ]
   ;

Modified: branches/release/libs/asio/test/basic_datagram_socket.cpp
==============================================================================
--- branches/release/libs/asio/test/basic_datagram_socket.cpp (original)
+++ branches/release/libs/asio/test/basic_datagram_socket.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("basic_datagram_socket");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/basic_deadline_timer.cpp
==============================================================================
--- branches/release/libs/asio/test/basic_deadline_timer.cpp (original)
+++ branches/release/libs/asio/test/basic_deadline_timer.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("basic_deadline_timer");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/basic_socket_acceptor.cpp
==============================================================================
--- branches/release/libs/asio/test/basic_socket_acceptor.cpp (original)
+++ branches/release/libs/asio/test/basic_socket_acceptor.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("basic_socket_acceptor");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/basic_stream_socket.cpp
==============================================================================
--- branches/release/libs/asio/test/basic_stream_socket.cpp (original)
+++ branches/release/libs/asio/test/basic_stream_socket.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("basic_stream_socket");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/buffer.cpp
==============================================================================
--- branches/release/libs/asio/test/buffer.cpp (original)
+++ branches/release/libs/asio/test/buffer.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -139,7 +139,7 @@
 
 //------------------------------------------------------------------------------
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("buffer");
   test->add(BOOST_TEST_CASE(&buffer_compile::test));

Modified: branches/release/libs/asio/test/buffered_read_stream.cpp
==============================================================================
--- branches/release/libs/asio/test/buffered_read_stream.cpp (original)
+++ branches/release/libs/asio/test/buffered_read_stream.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -209,7 +209,7 @@
   client_socket.async_read_some(boost::asio::buffer(read_buf), handle_read_eof);
 }
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("buffered_read_stream");
   test->add(BOOST_TEST_CASE(&test_sync_operations));

Modified: branches/release/libs/asio/test/buffered_stream.cpp
==============================================================================
--- branches/release/libs/asio/test/buffered_stream.cpp (original)
+++ branches/release/libs/asio/test/buffered_stream.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -224,7 +224,7 @@
   client_socket.async_read_some(boost::asio::buffer(read_buf), handle_read_eof);
 }
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("buffered_stream");
   test->add(BOOST_TEST_CASE(&test_sync_operations));

Modified: branches/release/libs/asio/test/buffered_write_stream.cpp
==============================================================================
--- branches/release/libs/asio/test/buffered_write_stream.cpp (original)
+++ branches/release/libs/asio/test/buffered_write_stream.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -224,7 +224,7 @@
   client_socket.async_read_some(boost::asio::buffer(read_buf), handle_read_eof);
 }
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("buffered_write_stream");
   test->add(BOOST_TEST_CASE(&test_sync_operations));

Modified: branches/release/libs/asio/test/completion_condition.cpp
==============================================================================
--- branches/release/libs/asio/test/completion_condition.cpp (original)
+++ branches/release/libs/asio/test/completion_condition.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("completion_condition");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/datagram_socket_service.cpp
==============================================================================
--- branches/release/libs/asio/test/datagram_socket_service.cpp (original)
+++ branches/release/libs/asio/test/datagram_socket_service.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("datagram_socket_service");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/deadline_timer.cpp
==============================================================================
--- branches/release/libs/asio/test/deadline_timer.cpp (original)
+++ branches/release/libs/asio/test/deadline_timer.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -179,7 +179,7 @@
   BOOST_CHECK(expected_end < end || expected_end == end);
 }
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("deadline_timer");
   test->add(BOOST_TEST_CASE(&deadline_timer_test));

Modified: branches/release/libs/asio/test/deadline_timer_service.cpp
==============================================================================
--- branches/release/libs/asio/test/deadline_timer_service.cpp (original)
+++ branches/release/libs/asio/test/deadline_timer_service.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("deadline_timer_service");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/error.cpp
==============================================================================
--- branches/release/libs/asio/test/error.cpp (original)
+++ branches/release/libs/asio/test/error.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -82,7 +82,7 @@
   test_error_code(boost::asio::error::would_block);
 }
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("error");
   test->add(BOOST_TEST_CASE(&error_test));

Modified: branches/release/libs/asio/test/io_service.cpp
==============================================================================
--- branches/release/libs/asio/test/io_service.cpp (original)
+++ branches/release/libs/asio/test/io_service.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -234,7 +234,7 @@
   BOOST_CHECK(exception_count == 2);
 }
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("io_service");
   test->add(BOOST_TEST_CASE(&io_service_test));

Modified: branches/release/libs/asio/test/ip/address.cpp
==============================================================================
--- branches/release/libs/asio/test/ip/address.cpp (original)
+++ branches/release/libs/asio/test/ip/address.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "../unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("ip/address");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/ip/address_v4.cpp
==============================================================================
--- branches/release/libs/asio/test/ip/address_v4.cpp (original)
+++ branches/release/libs/asio/test/ip/address_v4.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -124,7 +124,7 @@
 
 //------------------------------------------------------------------------------
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("ip/address_v4");
   test->add(BOOST_TEST_CASE(&ip_address_v4_compile::test));

Modified: branches/release/libs/asio/test/ip/address_v6.cpp
==============================================================================
--- branches/release/libs/asio/test/ip/address_v6.cpp (original)
+++ branches/release/libs/asio/test/ip/address_v6.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -145,7 +145,7 @@
 
 //------------------------------------------------------------------------------
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("ip/address_v6");
   test->add(BOOST_TEST_CASE(&ip_address_v6_compile::test));

Modified: branches/release/libs/asio/test/ip/basic_endpoint.cpp
==============================================================================
--- branches/release/libs/asio/test/ip/basic_endpoint.cpp (original)
+++ branches/release/libs/asio/test/ip/basic_endpoint.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "../unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("ip/basic_endpoint");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/ip/basic_resolver.cpp
==============================================================================
--- branches/release/libs/asio/test/ip/basic_resolver.cpp (original)
+++ branches/release/libs/asio/test/ip/basic_resolver.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "../unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("ip/basic_resolver");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/ip/basic_resolver_entry.cpp
==============================================================================
--- branches/release/libs/asio/test/ip/basic_resolver_entry.cpp (original)
+++ branches/release/libs/asio/test/ip/basic_resolver_entry.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "../unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("ip/basic_resolver_entry");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/ip/basic_resolver_iterator.cpp
==============================================================================
--- branches/release/libs/asio/test/ip/basic_resolver_iterator.cpp (original)
+++ branches/release/libs/asio/test/ip/basic_resolver_iterator.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "../unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("ip/basic_resolver_iterator");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/ip/basic_resolver_query.cpp
==============================================================================
--- branches/release/libs/asio/test/ip/basic_resolver_query.cpp (original)
+++ branches/release/libs/asio/test/ip/basic_resolver_query.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "../unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("ip/basic_resolver_query");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/ip/host_name.cpp
==============================================================================
--- branches/release/libs/asio/test/ip/host_name.cpp (original)
+++ branches/release/libs/asio/test/ip/host_name.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -49,7 +49,7 @@
 
 //------------------------------------------------------------------------------
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("ip/host_name");
   test->add(BOOST_TEST_CASE(&ip_host_name_compile::test));

Modified: branches/release/libs/asio/test/ip/multicast.cpp
==============================================================================
--- branches/release/libs/asio/test/ip/multicast.cpp (original)
+++ branches/release/libs/asio/test/ip/multicast.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -340,7 +340,7 @@
 
 //------------------------------------------------------------------------------
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("ip/multicast");
   test->add(BOOST_TEST_CASE(&ip_multicast_compile::test));

Modified: branches/release/libs/asio/test/ip/resolver_query_base.cpp
==============================================================================
--- branches/release/libs/asio/test/ip/resolver_query_base.cpp (original)
+++ branches/release/libs/asio/test/ip/resolver_query_base.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "../unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("ip/resolver_query_base");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/ip/resolver_service.cpp
==============================================================================
--- branches/release/libs/asio/test/ip/resolver_service.cpp (original)
+++ branches/release/libs/asio/test/ip/resolver_service.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "../unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("ip/resolver_service");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/ip/tcp.cpp
==============================================================================
--- branches/release/libs/asio/test/ip/tcp.cpp (original)
+++ branches/release/libs/asio/test/ip/tcp.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -239,36 +239,51 @@
 
     socket1.send(buffer(mutable_char_buffer));
     socket1.send(buffer(const_char_buffer));
+ socket1.send(null_buffers());
     socket1.send(buffer(mutable_char_buffer), in_flags);
     socket1.send(buffer(const_char_buffer), in_flags);
+ socket1.send(null_buffers(), in_flags);
     socket1.send(buffer(mutable_char_buffer), in_flags, ec);
     socket1.send(buffer(const_char_buffer), in_flags, ec);
+ socket1.send(null_buffers(), in_flags, ec);
 
     socket1.async_send(buffer(mutable_char_buffer), send_handler);
     socket1.async_send(buffer(const_char_buffer), send_handler);
+ socket1.async_send(null_buffers(), send_handler);
     socket1.async_send(buffer(mutable_char_buffer), in_flags, send_handler);
     socket1.async_send(buffer(const_char_buffer), in_flags, send_handler);
+ socket1.async_send(null_buffers(), in_flags, send_handler);
 
     socket1.receive(buffer(mutable_char_buffer));
+ socket1.receive(null_buffers());
     socket1.receive(buffer(mutable_char_buffer), in_flags);
+ socket1.receive(null_buffers(), in_flags);
     socket1.receive(buffer(mutable_char_buffer), in_flags, ec);
+ socket1.receive(null_buffers(), in_flags, ec);
 
     socket1.async_receive(buffer(mutable_char_buffer), receive_handler);
+ socket1.async_receive(null_buffers(), receive_handler);
     socket1.async_receive(buffer(mutable_char_buffer), in_flags,
         receive_handler);
+ socket1.async_receive(null_buffers(), in_flags, receive_handler);
 
     socket1.write_some(buffer(mutable_char_buffer));
     socket1.write_some(buffer(const_char_buffer));
+ socket1.write_some(null_buffers());
     socket1.write_some(buffer(mutable_char_buffer), ec);
     socket1.write_some(buffer(const_char_buffer), ec);
+ socket1.write_some(null_buffers(), ec);
 
     socket1.async_write_some(buffer(mutable_char_buffer), write_some_handler);
     socket1.async_write_some(buffer(const_char_buffer), write_some_handler);
+ socket1.async_write_some(null_buffers(), write_some_handler);
 
     socket1.read_some(buffer(mutable_char_buffer));
     socket1.read_some(buffer(mutable_char_buffer), ec);
+ socket1.read_some(null_buffers(), ec);
 
     socket1.async_read_some(buffer(mutable_char_buffer), read_some_handler);
+ socket1.async_read_some(null_buffers(), read_some_handler);
   }
   catch (std::exception&)
   {
@@ -356,7 +371,7 @@
 
 //------------------------------------------------------------------------------
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("ip/tcp");
   test->add(BOOST_TEST_CASE(&ip_tcp_compile::test));

Modified: branches/release/libs/asio/test/ip/udp.cpp
==============================================================================
--- branches/release/libs/asio/test/ip/udp.cpp (original)
+++ branches/release/libs/asio/test/ip/udp.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -144,15 +144,20 @@
 
     socket1.send(buffer(mutable_char_buffer));
     socket1.send(buffer(const_char_buffer));
+ socket1.send(null_buffers());
     socket1.send(buffer(mutable_char_buffer), in_flags);
     socket1.send(buffer(const_char_buffer), in_flags);
+ socket1.send(null_buffers(), in_flags);
     socket1.send(buffer(mutable_char_buffer), in_flags, ec);
     socket1.send(buffer(const_char_buffer), in_flags, ec);
+ socket1.send(null_buffers(), in_flags, ec);
 
     socket1.async_send(buffer(mutable_char_buffer), send_handler);
     socket1.async_send(buffer(const_char_buffer), send_handler);
+ socket1.async_send(null_buffers(), send_handler);
     socket1.async_send(buffer(mutable_char_buffer), in_flags, send_handler);
     socket1.async_send(buffer(const_char_buffer), in_flags, send_handler);
+ socket1.async_send(null_buffers(), in_flags, send_handler);
 
     socket1.send_to(buffer(mutable_char_buffer),
         ip::udp::endpoint(ip::udp::v4(), 0));
@@ -162,6 +167,10 @@
         ip::udp::endpoint(ip::udp::v4(), 0));
     socket1.send_to(buffer(const_char_buffer),
         ip::udp::endpoint(ip::udp::v6(), 0));
+ socket1.send_to(null_buffers(),
+ ip::udp::endpoint(ip::udp::v4(), 0));
+ socket1.send_to(null_buffers(),
+ ip::udp::endpoint(ip::udp::v6(), 0));
     socket1.send_to(buffer(mutable_char_buffer),
         ip::udp::endpoint(ip::udp::v4(), 0), in_flags);
     socket1.send_to(buffer(mutable_char_buffer),
@@ -170,6 +179,10 @@
         ip::udp::endpoint(ip::udp::v4(), 0), in_flags);
     socket1.send_to(buffer(const_char_buffer),
         ip::udp::endpoint(ip::udp::v6(), 0), in_flags);
+ socket1.send_to(null_buffers(),
+ ip::udp::endpoint(ip::udp::v4(), 0), in_flags);
+ socket1.send_to(null_buffers(),
+ ip::udp::endpoint(ip::udp::v6(), 0), in_flags);
     socket1.send_to(buffer(mutable_char_buffer),
         ip::udp::endpoint(ip::udp::v4(), 0), in_flags, ec);
     socket1.send_to(buffer(mutable_char_buffer),
@@ -178,6 +191,10 @@
         ip::udp::endpoint(ip::udp::v4(), 0), in_flags, ec);
     socket1.send_to(buffer(const_char_buffer),
         ip::udp::endpoint(ip::udp::v6(), 0), in_flags, ec);
+ socket1.send_to(null_buffers(),
+ ip::udp::endpoint(ip::udp::v4(), 0), in_flags, ec);
+ socket1.send_to(null_buffers(),
+ ip::udp::endpoint(ip::udp::v6(), 0), in_flags, ec);
 
     socket1.async_send_to(buffer(mutable_char_buffer),
         ip::udp::endpoint(ip::udp::v4(), 0), send_handler);
@@ -187,6 +204,10 @@
         ip::udp::endpoint(ip::udp::v4(), 0), send_handler);
     socket1.async_send_to(buffer(const_char_buffer),
         ip::udp::endpoint(ip::udp::v6(), 0), send_handler);
+ socket1.async_send_to(null_buffers(),
+ ip::udp::endpoint(ip::udp::v4(), 0), send_handler);
+ socket1.async_send_to(null_buffers(),
+ ip::udp::endpoint(ip::udp::v6(), 0), send_handler);
     socket1.async_send_to(buffer(mutable_char_buffer),
         ip::udp::endpoint(ip::udp::v4(), 0), in_flags, send_handler);
     socket1.async_send_to(buffer(mutable_char_buffer),
@@ -195,24 +216,40 @@
         ip::udp::endpoint(ip::udp::v4(), 0), in_flags, send_handler);
     socket1.async_send_to(buffer(const_char_buffer),
         ip::udp::endpoint(ip::udp::v6(), 0), in_flags, send_handler);
+ socket1.async_send_to(null_buffers(),
+ ip::udp::endpoint(ip::udp::v4(), 0), in_flags, send_handler);
+ socket1.async_send_to(null_buffers(),
+ ip::udp::endpoint(ip::udp::v6(), 0), in_flags, send_handler);
 
     socket1.receive(buffer(mutable_char_buffer));
+ socket1.receive(null_buffers());
     socket1.receive(buffer(mutable_char_buffer), in_flags);
+ socket1.receive(null_buffers(), in_flags);
     socket1.receive(buffer(mutable_char_buffer), in_flags, ec);
+ socket1.receive(null_buffers(), in_flags, ec);
 
     socket1.async_receive(buffer(mutable_char_buffer), receive_handler);
+ socket1.async_receive(null_buffers(), receive_handler);
     socket1.async_receive(buffer(mutable_char_buffer), in_flags,
         receive_handler);
+ socket1.async_receive(null_buffers(), in_flags, receive_handler);
 
     ip::udp::endpoint endpoint;
     socket1.receive_from(buffer(mutable_char_buffer), endpoint);
+ socket1.receive_from(null_buffers(), endpoint);
     socket1.receive_from(buffer(mutable_char_buffer), endpoint, in_flags);
+ socket1.receive_from(null_buffers(), endpoint, in_flags);
     socket1.receive_from(buffer(mutable_char_buffer), endpoint, in_flags, ec);
+ socket1.receive_from(null_buffers(), endpoint, in_flags, ec);
 
     socket1.async_receive_from(buffer(mutable_char_buffer),
         endpoint, receive_handler);
+ socket1.async_receive_from(null_buffers(),
+ endpoint, receive_handler);
     socket1.async_receive_from(buffer(mutable_char_buffer),
         endpoint, in_flags, receive_handler);
+ socket1.async_receive_from(null_buffers(),
+ endpoint, in_flags, receive_handler);
   }
   catch (std::exception&)
   {
@@ -274,10 +311,12 @@
   target_endpoint = sender_endpoint;
   s1.async_send_to(buffer(send_msg, sizeof(send_msg)), target_endpoint,
       boost::bind(handle_send, sizeof(send_msg),
- placeholders::error, placeholders::bytes_transferred));
+ boost::asio::placeholders::error,
+ boost::asio::placeholders::bytes_transferred));
   s2.async_receive_from(buffer(recv_msg, sizeof(recv_msg)), sender_endpoint,
       boost::bind(handle_recv, sizeof(recv_msg),
- placeholders::error, placeholders::bytes_transferred));
+ boost::asio::placeholders::error,
+ boost::asio::placeholders::bytes_transferred));
 
   ios.run();
 
@@ -288,7 +327,7 @@
 
 //------------------------------------------------------------------------------
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("ip/udp");
   test->add(BOOST_TEST_CASE(&ip_udp_socket_compile::test));

Modified: branches/release/libs/asio/test/ip/unicast.cpp
==============================================================================
--- branches/release/libs/asio/test/ip/unicast.cpp (original)
+++ branches/release/libs/asio/test/ip/unicast.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -162,7 +162,7 @@
 
 //------------------------------------------------------------------------------
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("ip/unicast");
   test->add(BOOST_TEST_CASE(&ip_unicast_compile::test));

Modified: branches/release/libs/asio/test/ip/v6_only.cpp
==============================================================================
--- branches/release/libs/asio/test/ip/v6_only.cpp (original)
+++ branches/release/libs/asio/test/ip/v6_only.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -125,7 +125,7 @@
 
 //------------------------------------------------------------------------------
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("ip/v6_only");
   test->add(BOOST_TEST_CASE(&ip_v6_only_compile::test));

Modified: branches/release/libs/asio/test/is_read_buffered.cpp
==============================================================================
--- branches/release/libs/asio/test/is_read_buffered.cpp (original)
+++ branches/release/libs/asio/test/is_read_buffered.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -118,7 +118,7 @@
       boost::asio::buffered_stream<test_stream> >::value);
 }
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("is_read_buffered");
   test->add(BOOST_TEST_CASE(&is_read_buffered_test));

Modified: branches/release/libs/asio/test/is_write_buffered.cpp
==============================================================================
--- branches/release/libs/asio/test/is_write_buffered.cpp (original)
+++ branches/release/libs/asio/test/is_write_buffered.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -118,7 +118,7 @@
       boost::asio::buffered_stream<test_stream> >::value);
 }
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("is_write_buffered");
   test->add(BOOST_TEST_CASE(&is_write_buffered_test));

Copied: branches/release/libs/asio/test/local/basic_endpoint.cpp (from r44685, /trunk/libs/asio/test/local/basic_endpoint.cpp)
==============================================================================
--- /trunk/libs/asio/test/local/basic_endpoint.cpp (original)
+++ branches/release/libs/asio/test/local/basic_endpoint.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "../unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("local/basic_endpoint");
   test->add(BOOST_TEST_CASE(&null_test));

Copied: branches/release/libs/asio/test/local/connect_pair.cpp (from r44685, /trunk/libs/asio/test/local/connect_pair.cpp)
==============================================================================
--- /trunk/libs/asio/test/local/connect_pair.cpp (original)
+++ branches/release/libs/asio/test/local/connect_pair.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -68,7 +68,7 @@
 
 //------------------------------------------------------------------------------
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("local/connect_pair");
   test->add(BOOST_TEST_CASE(&local_connect_pair_compile::test));

Copied: branches/release/libs/asio/test/local/datagram_protocol.cpp (from r44685, /trunk/libs/asio/test/local/datagram_protocol.cpp)
==============================================================================
--- /trunk/libs/asio/test/local/datagram_protocol.cpp (original)
+++ branches/release/libs/asio/test/local/datagram_protocol.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -225,7 +225,7 @@
 
 //------------------------------------------------------------------------------
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("local/datagram_protocol");
   test->add(BOOST_TEST_CASE(&local_datagram_protocol_socket_compile::test));

Copied: branches/release/libs/asio/test/local/stream_protocol.cpp (from r44685, /trunk/libs/asio/test/local/stream_protocol.cpp)
==============================================================================
--- /trunk/libs/asio/test/local/stream_protocol.cpp (original)
+++ branches/release/libs/asio/test/local/stream_protocol.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -202,7 +202,7 @@
 
 //------------------------------------------------------------------------------
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("local/stream_protocol");
   test->add(BOOST_TEST_CASE(&local_stream_protocol_socket_compile::test));

Modified: branches/release/libs/asio/test/placeholders.cpp
==============================================================================
--- branches/release/libs/asio/test/placeholders.cpp (original)
+++ branches/release/libs/asio/test/placeholders.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("placeholders");
   test->add(BOOST_TEST_CASE(&null_test));

Copied: branches/release/libs/asio/test/posix/basic_descriptor.cpp (from r44685, /trunk/libs/asio/test/posix/basic_descriptor.cpp)
==============================================================================
--- /trunk/libs/asio/test/posix/basic_descriptor.cpp (original)
+++ branches/release/libs/asio/test/posix/basic_descriptor.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -19,7 +19,7 @@
 #include <boost/asio.hpp>
 #include "../unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("posix/basic_descriptor");
   test->add(BOOST_TEST_CASE(&null_test));

Copied: branches/release/libs/asio/test/posix/basic_stream_descriptor.cpp (from r44685, /trunk/libs/asio/test/posix/basic_stream_descriptor.cpp)
==============================================================================
--- /trunk/libs/asio/test/posix/basic_stream_descriptor.cpp (original)
+++ branches/release/libs/asio/test/posix/basic_stream_descriptor.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -19,7 +19,7 @@
 #include <boost/asio.hpp>
 #include "../unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("posix/basic_stream_descriptor");
   test->add(BOOST_TEST_CASE(&null_test));

Copied: branches/release/libs/asio/test/posix/descriptor_base.cpp (from r44685, /trunk/libs/asio/test/posix/descriptor_base.cpp)
==============================================================================
--- /trunk/libs/asio/test/posix/descriptor_base.cpp (original)
+++ branches/release/libs/asio/test/posix/descriptor_base.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -19,7 +19,7 @@
 #include <boost/asio.hpp>
 #include "../unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("posix/descriptor_base");
   test->add(BOOST_TEST_CASE(&null_test));

Copied: branches/release/libs/asio/test/posix/stream_descriptor.cpp (from r44685, /trunk/libs/asio/test/posix/stream_descriptor.cpp)
==============================================================================
--- /trunk/libs/asio/test/posix/stream_descriptor.cpp (original)
+++ branches/release/libs/asio/test/posix/stream_descriptor.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -119,7 +119,7 @@
 } // namespace posix_stream_descriptor_compile
 
 //------------------------------------------------------------------------------
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("posix/stream_descriptor");
   test->add(BOOST_TEST_CASE(&posix_stream_descriptor_compile::test));

Copied: branches/release/libs/asio/test/posix/stream_descriptor_service.cpp (from r44685, /trunk/libs/asio/test/posix/stream_descriptor_service.cpp)
==============================================================================
--- /trunk/libs/asio/test/posix/stream_descriptor_service.cpp (original)
+++ branches/release/libs/asio/test/posix/stream_descriptor_service.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -19,7 +19,7 @@
 #include <boost/asio.hpp>
 #include "../unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("posix/stream_descriptor_service");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/read.cpp
==============================================================================
--- branches/release/libs/asio/test/read.cpp (original)
+++ branches/release/libs/asio/test/read.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -619,7 +619,7 @@
   BOOST_CHECK(s.check(buffers, 50));
 }
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("read");
   test->add(BOOST_TEST_CASE(&test_2_arg_read));

Modified: branches/release/libs/asio/test/read_until.cpp
==============================================================================
--- branches/release/libs/asio/test/read_until.cpp (original)
+++ branches/release/libs/asio/test/read_until.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -226,6 +226,90 @@
   BOOST_CHECK(length == 0);
 }
 
+class match_char
+{
+public:
+ explicit match_char(char c) : c_(c) {}
+
+ template <typename Iterator>
+ std::pair<Iterator, bool> operator()(
+ Iterator begin, Iterator end) const
+ {
+ Iterator i = begin;
+ while (i != end)
+ if (c_ == *i++)
+ return std::make_pair(i, true);
+ return std::make_pair(i, false);
+ }
+
+private:
+ char c_;
+};
+
+namespace boost {
+namespace asio {
+ template <> struct is_match_condition<match_char>
+ : public boost::true_type {};
+} // namespace asio
+} // namespace boost
+
+void test_match_condition_read_until()
+{
+ boost::asio::io_service ios;
+ test_stream s(ios);
+ boost::asio::streambuf sb1;
+ boost::asio::streambuf sb2(25);
+ boost::system::error_code ec;
+
+ s.reset(read_data, sizeof(read_data));
+ std::size_t length = boost::asio::read_until(s, sb1, match_char('Z'));
+ BOOST_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ length = boost::asio::read_until(s, sb1, match_char('Z'));
+ BOOST_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ length = boost::asio::read_until(s, sb1, match_char('Z'));
+ BOOST_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ length = boost::asio::read_until(s, sb1, match_char('Z'), ec);
+ BOOST_CHECK(!ec);
+ BOOST_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ length = boost::asio::read_until(s, sb1, match_char('Z'), ec);
+ BOOST_CHECK(!ec);
+ BOOST_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ length = boost::asio::read_until(s, sb1, match_char('Z'), ec);
+ BOOST_CHECK(!ec);
+ BOOST_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ length = boost::asio::read_until(s, sb2, match_char('Z'), ec);
+ BOOST_CHECK(ec == boost::asio::error::not_found);
+ BOOST_CHECK(length == 0);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ length = boost::asio::read_until(s, sb2, match_char('Z'), ec);
+ BOOST_CHECK(ec == boost::asio::error::not_found);
+ BOOST_CHECK(length == 0);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ length = boost::asio::read_until(s, sb2, match_char('Z'), ec);
+ BOOST_CHECK(ec == boost::asio::error::not_found);
+ BOOST_CHECK(length == 0);
+}
+
 void async_read_handler(
     const boost::system::error_code& err, boost::system::error_code* err_out,
     std::size_t bytes_transferred, std::size_t* bytes_out, bool* called)
@@ -421,12 +505,107 @@
   BOOST_CHECK(length == 0);
 }
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+void test_match_condition_async_read_until()
+{
+ boost::asio::io_service ios;
+ test_stream s(ios);
+ boost::asio::streambuf sb1;
+ boost::asio::streambuf sb2(25);
+ boost::system::error_code ec;
+ std::size_t length;
+ bool called;
+
+ s.reset(read_data, sizeof(read_data));
+ ec = boost::system::error_code();
+ length = 0;
+ called = false;
+ boost::asio::async_read_until(s, sb1, match_char('Z'),
+ boost::bind(async_read_handler, boost::asio::placeholders::error, &ec,
+ boost::asio::placeholders::bytes_transferred, &length, &called));
+ ios.reset();
+ ios.run();
+ BOOST_CHECK(called);
+ BOOST_CHECK(!ec);
+ BOOST_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ ec = boost::system::error_code();
+ length = 0;
+ called = false;
+ boost::asio::async_read_until(s, sb1, match_char('Z'),
+ boost::bind(async_read_handler, boost::asio::placeholders::error, &ec,
+ boost::asio::placeholders::bytes_transferred, &length, &called));
+ ios.reset();
+ ios.run();
+ BOOST_CHECK(called);
+ BOOST_CHECK(!ec);
+ BOOST_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ ec = boost::system::error_code();
+ length = 0;
+ called = false;
+ boost::asio::async_read_until(s, sb1, match_char('Z'),
+ boost::bind(async_read_handler, boost::asio::placeholders::error, &ec,
+ boost::asio::placeholders::bytes_transferred, &length, &called));
+ ios.reset();
+ ios.run();
+ BOOST_CHECK(called);
+ BOOST_CHECK(!ec);
+ BOOST_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ ec = boost::system::error_code();
+ length = 0;
+ called = false;
+ boost::asio::async_read_until(s, sb2, match_char('Z'),
+ boost::bind(async_read_handler, boost::asio::placeholders::error, &ec,
+ boost::asio::placeholders::bytes_transferred, &length, &called));
+ ios.reset();
+ ios.run();
+ BOOST_CHECK(called);
+ BOOST_CHECK(ec == boost::asio::error::not_found);
+ BOOST_CHECK(length == 0);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ ec = boost::system::error_code();
+ length = 0;
+ called = false;
+ boost::asio::async_read_until(s, sb2, match_char('Z'),
+ boost::bind(async_read_handler, boost::asio::placeholders::error, &ec,
+ boost::asio::placeholders::bytes_transferred, &length, &called));
+ ios.reset();
+ ios.run();
+ BOOST_CHECK(called);
+ BOOST_CHECK(ec == boost::asio::error::not_found);
+ BOOST_CHECK(length == 0);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ ec = boost::system::error_code();
+ length = 0;
+ called = false;
+ boost::asio::async_read_until(s, sb2, match_char('Z'),
+ boost::bind(async_read_handler, boost::asio::placeholders::error, &ec,
+ boost::asio::placeholders::bytes_transferred, &length, &called));
+ ios.reset();
+ ios.run();
+ BOOST_CHECK(called);
+ BOOST_CHECK(ec == boost::asio::error::not_found);
+ BOOST_CHECK(length == 0);
+}
+
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("read_until");
   test->add(BOOST_TEST_CASE(&test_char_read_until));
   test->add(BOOST_TEST_CASE(&test_string_read_until));
+ test->add(BOOST_TEST_CASE(&test_match_condition_read_until));
   test->add(BOOST_TEST_CASE(&test_char_async_read_until));
   test->add(BOOST_TEST_CASE(&test_string_async_read_until));
+ test->add(BOOST_TEST_CASE(&test_match_condition_async_read_until));
   return test;
 }

Modified: branches/release/libs/asio/test/socket_acceptor_service.cpp
==============================================================================
--- branches/release/libs/asio/test/socket_acceptor_service.cpp (original)
+++ branches/release/libs/asio/test/socket_acceptor_service.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("socket_acceptor_service");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/socket_base.cpp
==============================================================================
--- branches/release/libs/asio/test/socket_base.cpp (original)
+++ branches/release/libs/asio/test/socket_base.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -644,7 +644,7 @@
 
 //------------------------------------------------------------------------------
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("socket_base");
   test->add(BOOST_TEST_CASE(&socket_base_compile::test));

Modified: branches/release/libs/asio/test/ssl/basic_context.cpp
==============================================================================
--- branches/release/libs/asio/test/ssl/basic_context.cpp (original)
+++ branches/release/libs/asio/test/ssl/basic_context.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "../unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("ssl/basic_context");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/ssl/context.cpp
==============================================================================
--- branches/release/libs/asio/test/ssl/context.cpp (original)
+++ branches/release/libs/asio/test/ssl/context.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "../unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("ssl/context");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/ssl/context_base.cpp
==============================================================================
--- branches/release/libs/asio/test/ssl/context_base.cpp (original)
+++ branches/release/libs/asio/test/ssl/context_base.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "../unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("ssl/context_base");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/ssl/context_service.cpp
==============================================================================
--- branches/release/libs/asio/test/ssl/context_service.cpp (original)
+++ branches/release/libs/asio/test/ssl/context_service.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "../unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("ssl/context_service");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/ssl/stream.cpp
==============================================================================
--- branches/release/libs/asio/test/ssl/stream.cpp (original)
+++ branches/release/libs/asio/test/ssl/stream.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -118,7 +118,7 @@
 
 //------------------------------------------------------------------------------
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("ssl/stream");
   test->add(BOOST_TEST_CASE(&ssl_stream_compile::test));

Modified: branches/release/libs/asio/test/ssl/stream_base.cpp
==============================================================================
--- branches/release/libs/asio/test/ssl/stream_base.cpp (original)
+++ branches/release/libs/asio/test/ssl/stream_base.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "../unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("ssl/stream_base");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/ssl/stream_service.cpp
==============================================================================
--- branches/release/libs/asio/test/ssl/stream_service.cpp (original)
+++ branches/release/libs/asio/test/ssl/stream_service.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "../unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("ssl/stream_service");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/strand.cpp
==============================================================================
--- branches/release/libs/asio/test/strand.cpp (original)
+++ branches/release/libs/asio/test/strand.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -161,9 +161,24 @@
   // The run() calls will not return until all work has finished.
   BOOST_CHECK(count == 3);
   BOOST_CHECK(exception_count == 2);
+
+ count = 0;
+ ios.reset();
+
+ // Check for clean shutdown when handlers posted through an orphaned strand
+ // are abandoned.
+ {
+ strand s2(ios);
+ s2.post(boost::bind(increment, &count));
+ s2.post(boost::bind(increment, &count));
+ s2.post(boost::bind(increment, &count));
+ }
+
+ // No handlers can be called until run() is called.
+ BOOST_CHECK(count == 0);
 }
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("strand");
   test->add(BOOST_TEST_CASE(&strand_test));

Modified: branches/release/libs/asio/test/stream_socket_service.cpp
==============================================================================
--- branches/release/libs/asio/test/stream_socket_service.cpp (original)
+++ branches/release/libs/asio/test/stream_socket_service.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("stream_socket_service");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/time_traits.cpp
==============================================================================
--- branches/release/libs/asio/test/time_traits.cpp (original)
+++ branches/release/libs/asio/test/time_traits.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include "unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("time_traits");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/unit_test.hpp
==============================================================================
--- branches/release/libs/asio/test/unit_test.hpp (original)
+++ branches/release/libs/asio/test/unit_test.hpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -31,6 +31,7 @@
 #if defined(BOOST_MSVC)
 # pragma warning (push)
 # pragma warning (disable:4244)
+# pragma warning (disable:4702)
 #endif // defined(BOOST_MSVC)
 
 #include <boost/test/unit_test.hpp>

Copied: branches/release/libs/asio/test/windows/basic_handle.cpp (from r44685, /trunk/libs/asio/test/windows/basic_handle.cpp)
==============================================================================
--- /trunk/libs/asio/test/windows/basic_handle.cpp (original)
+++ branches/release/libs/asio/test/windows/basic_handle.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -19,7 +19,7 @@
 #include <boost/asio.hpp>
 #include "../unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("windows/basic_handle");
   test->add(BOOST_TEST_CASE(&null_test));

Copied: branches/release/libs/asio/test/windows/basic_stream_handle.cpp (from r44685, /trunk/libs/asio/test/windows/basic_stream_handle.cpp)
==============================================================================
--- /trunk/libs/asio/test/windows/basic_stream_handle.cpp (original)
+++ branches/release/libs/asio/test/windows/basic_stream_handle.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -19,7 +19,7 @@
 #include <boost/asio.hpp>
 #include "../unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("windows/basic_stream_handle");
   test->add(BOOST_TEST_CASE(&null_test));

Copied: branches/release/libs/asio/test/windows/stream_handle.cpp (from r44685, /trunk/libs/asio/test/windows/stream_handle.cpp)
==============================================================================
--- /trunk/libs/asio/test/windows/stream_handle.cpp (original)
+++ branches/release/libs/asio/test/windows/stream_handle.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -106,7 +106,7 @@
 } // namespace windows_stream_handle_compile
 
 //------------------------------------------------------------------------------
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("windows/stream_handle");
   test->add(BOOST_TEST_CASE(&windows_stream_handle_compile::test));

Copied: branches/release/libs/asio/test/windows/stream_handle_service.cpp (from r44685, /trunk/libs/asio/test/windows/stream_handle_service.cpp)
==============================================================================
--- /trunk/libs/asio/test/windows/stream_handle_service.cpp (original)
+++ branches/release/libs/asio/test/windows/stream_handle_service.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -19,7 +19,7 @@
 #include <boost/asio.hpp>
 #include "../unit_test.hpp"
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("windows/stream_handle_service");
   test->add(BOOST_TEST_CASE(&null_test));

Modified: branches/release/libs/asio/test/write.cpp
==============================================================================
--- branches/release/libs/asio/test/write.cpp (original)
+++ branches/release/libs/asio/test/write.cpp 2008-06-19 18:20:52 EDT (Thu, 19 Jun 2008)
@@ -573,7 +573,7 @@
   BOOST_CHECK(s.check(buffers, 50));
 }
 
-test_suite* init_unit_test_suite(int argc, char* argv[])
+test_suite* init_unit_test_suite(int, char*[])
 {
   test_suite* test = BOOST_TEST_SUITE("write");
   test->add(BOOST_TEST_CASE(&test_2_arg_write));


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk