From 2f3a9792f8601e73f4696bd4cb4ecb8d3a27a7b9 Mon Sep 17 00:00:00 2001 From: Beman Dawes Date: Sun, 25 Nov 2007 18:07:19 +0000 Subject: [PATCH] Full merge from trunk at revision 41356 of entire boost-root tree. [SVN r41369] --- doc/Jamfile.v2 | 36 - doc/asio.qbk | 94 - doc/design.qbk | 104 - doc/design/allocation.qbk | 51 - doc/design/async.qbk | 185 - doc/design/buffers.qbk | 58 - doc/design/eof.qbk | 17 - doc/design/implementation.qbk | 215 - doc/design/line_based.qbk | 50 - doc/design/proactor.dot | 100 - doc/design/proactor.png | Bin 30877 -> 0 bytes doc/design/rationale.qbk | 44 - doc/design/strands.qbk | 56 - doc/design/threads.qbk | 51 - doc/doxy2qbk.pl | 22 - doc/examples.qbk | 220 - doc/noncopyable_dox.txt | 10 - doc/quickref.xml | 162 - doc/reference.dox | 233 - doc/reference.qbk | 39165 ---------------- doc/reference.xsl | 991 - doc/requirements.qbk | 180 - doc/requirements/AcceptHandler.qbk | 15 - doc/requirements/AsyncReadStream.qbk | 56 - doc/requirements/AsyncWriteStream.qbk | 55 - doc/requirements/CompletionHandler.qbk | 14 - doc/requirements/ConnectHandler.qbk | 15 - doc/requirements/ConstBufferSequence.qbk | 102 - doc/requirements/ConvertibleToConstBuffer.qbk | 96 - .../ConvertibleToMutableBuffer.qbk | 96 - doc/requirements/DatagramSocketService.qbk | 227 - doc/requirements/Endpoint.qbk | 93 - doc/requirements/GettableSocketOption.qbk | 62 - doc/requirements/Handler.qbk | 64 - doc/requirements/InternetProtocol.qbk | 46 - doc/requirements/IoControlCommand.qbk | 31 - doc/requirements/IoObjectService.qbk | 48 - doc/requirements/MutableBufferSequence.qbk | 102 - doc/requirements/Protocol.qbk | 49 - doc/requirements/ReadHandler.qbk | 15 - doc/requirements/ResolveHandler.qbk | 18 - doc/requirements/ResolverService.qbk | 108 - doc/requirements/Service.qbk | 33 - doc/requirements/SettableSocketOption.qbk | 52 - doc/requirements/SocketAcceptorService.qbk | 249 - doc/requirements/SocketService.qbk | 290 - doc/requirements/StreamSocketService.qbk | 139 - doc/requirements/SyncReadStream.qbk | 48 - doc/requirements/SyncWriteStream.qbk | 47 - doc/requirements/TimeTraits.qbk | 72 - doc/requirements/TimerService.qbk | 105 - doc/requirements/WaitHandler.qbk | 15 - doc/requirements/WriteHandler.qbk | 15 - doc/requirements/asynchronous_operations.qbk | 176 - doc/std_exception_dox.txt | 14 - doc/tutorial.dox | 225 - doc/tutorial.qbk | 2402 - doc/tutorial.xsl | 271 - doc/using.qbk | 133 - example/allocation/Jamfile | 33 - example/allocation/Jamfile.v2 | 37 - example/allocation/server.cpp | 237 - example/buffers/Jamfile | 33 - example/buffers/Jamfile.v2 | 37 - example/buffers/reference_counted.cpp | 129 - example/chat/Jamfile | 47 - example/chat/Jamfile.v2 | 41 - example/chat/chat_client.cpp | 187 - example/chat/chat_message.hpp | 93 - example/chat/chat_server.cpp | 244 - example/echo/Jamfile | 63 - example/echo/Jamfile.v2 | 45 - example/echo/async_tcp_echo_server.cpp | 134 - example/echo/async_udp_echo_server.cpp | 93 - example/echo/blocking_tcp_echo_client.cpp | 59 - example/echo/blocking_tcp_echo_server.cpp | 80 - example/echo/blocking_udp_echo_client.cpp | 59 - example/echo/blocking_udp_echo_server.cpp | 53 - example/http/client/Jamfile | 45 - example/http/client/Jamfile.v2 | 40 - example/http/client/async_client.cpp | 214 - example/http/client/sync_client.cpp | 112 - example/http/doc_root/data_1K.html | 28 - example/http/doc_root/data_2K.html | 49 - example/http/doc_root/data_4K.html | 91 - example/http/doc_root/data_8K.html | 175 - example/http/server/Jamfile | 42 - example/http/server/Jamfile.v2 | 46 - example/http/server/connection.cpp | 99 - example/http/server/connection.hpp | 83 - example/http/server/connection_manager.cpp | 38 - example/http/server/connection_manager.hpp | 44 - example/http/server/header.hpp | 28 - example/http/server/mime_types.cpp | 46 - example/http/server/mime_types.hpp | 27 - example/http/server/posix_main.cpp | 73 - example/http/server/reply.cpp | 256 - example/http/server/reply.hpp | 64 - example/http/server/request.hpp | 34 - example/http/server/request_handler.cpp | 122 - example/http/server/request_handler.hpp | 46 - example/http/server/request_parser.cpp | 326 - example/http/server/request_parser.hpp | 96 - example/http/server/server.cpp | 78 - example/http/server/server.hpp | 66 - example/http/server/win_main.cpp | 70 - example/http/server2/Jamfile | 42 - example/http/server2/Jamfile.v2 | 46 - example/http/server2/connection.cpp | 93 - example/http/server2/connection.hpp | 75 - example/http/server2/header.hpp | 28 - example/http/server2/io_service_pool.cpp | 71 - example/http/server2/io_service_pool.hpp | 56 - example/http/server2/mime_types.cpp | 46 - example/http/server2/mime_types.hpp | 27 - example/http/server2/posix_main.cpp | 75 - example/http/server2/reply.cpp | 256 - example/http/server2/reply.hpp | 64 - example/http/server2/request.hpp | 34 - example/http/server2/request_handler.cpp | 122 - example/http/server2/request_handler.hpp | 46 - example/http/server2/request_parser.cpp | 326 - example/http/server2/request_parser.hpp | 96 - example/http/server2/server.cpp | 62 - example/http/server2/server.hpp | 62 - example/http/server2/win_main.cpp | 72 - example/http/server3/Jamfile | 41 - example/http/server3/Jamfile.v2 | 45 - example/http/server3/connection.cpp | 98 - example/http/server3/connection.hpp | 78 - example/http/server3/header.hpp | 28 - example/http/server3/mime_types.cpp | 46 - example/http/server3/mime_types.hpp | 27 - example/http/server3/posix_main.cpp | 75 - example/http/server3/reply.cpp | 256 - example/http/server3/reply.hpp | 64 - example/http/server3/request.hpp | 34 - example/http/server3/request_handler.cpp | 122 - example/http/server3/request_handler.hpp | 46 - example/http/server3/request_parser.cpp | 326 - example/http/server3/request_parser.hpp | 96 - example/http/server3/server.cpp | 74 - example/http/server3/server.hpp | 64 - example/http/server3/win_main.cpp | 72 - example/invocation/Jamfile | 33 - example/invocation/Jamfile.v2 | 37 - example/invocation/prioritised_handlers.cpp | 147 - example/iostreams/Jamfile | 45 - example/iostreams/Jamfile.v2 | 40 - example/iostreams/daytime_client.cpp | 38 - example/iostreams/daytime_server.cpp | 47 - example/multicast/Jamfile | 45 - example/multicast/Jamfile.v2 | 40 - example/multicast/receiver.cpp | 93 - example/multicast/sender.cpp | 99 - example/serialization/Jamfile | 47 - example/serialization/Jamfile.v2 | 41 - example/serialization/client.cpp | 136 - example/serialization/connection.hpp | 188 - example/serialization/server.cpp | 130 - example/serialization/stock.hpp | 50 - example/services/Jamfile | 35 - example/services/Jamfile.v2 | 39 - example/services/basic_logger.hpp | 83 - example/services/daytime_client.cpp | 95 - example/services/logger.hpp | 24 - example/services/logger_service.cpp | 17 - example/services/logger_service.hpp | 145 - example/services/stream_socket_service.hpp | 351 - example/socks4/Jamfile | 33 - example/socks4/Jamfile.v2 | 37 - example/socks4/socks4.hpp | 144 - example/socks4/sync_client.cpp | 102 - example/ssl/Jamfile | 49 - example/ssl/Jamfile.v2 | 53 - example/ssl/README | 8 - example/ssl/ca.pem | 31 - example/ssl/client.cpp | 143 - example/ssl/dh512.pem | 12 - example/ssl/server.cpp | 166 - example/ssl/server.pem | 44 - example/timeouts/Jamfile | 53 - example/timeouts/Jamfile.v2 | 42 - example/timeouts/accept_timeout.cpp | 74 - example/timeouts/connect_timeout.cpp | 85 - example/timeouts/datagram_receive_timeout.cpp | 77 - example/timeouts/stream_receive_timeout.cpp | 102 - example/timers/Jamfile | 38 - example/timers/Jamfile.v2 | 50 - example/timers/tick_count_timer.cpp | 116 - example/timers/time_t_timer.cpp | 93 - example/tutorial/Jamfile | 46 - example/tutorial/Jamfile.v2 | 74 - example/tutorial/daytime1/client.cpp | 65 - example/tutorial/daytime2/server.cpp | 51 - example/tutorial/daytime3/server.cpp | 116 - example/tutorial/daytime4/client.cpp | 52 - example/tutorial/daytime5/server.cpp | 58 - example/tutorial/daytime6/server.cpp | 89 - example/tutorial/daytime7/server.cpp | 157 - example/tutorial/daytime_dox.txt | 501 - example/tutorial/index_dox.txt | 48 - example/tutorial/timer1/timer.cpp | 25 - example/tutorial/timer2/timer.cpp | 30 - example/tutorial/timer3/timer.cpp | 44 - example/tutorial/timer4/timer.cpp | 55 - example/tutorial/timer5/timer.cpp | 75 - example/tutorial/timer_dox.txt | 380 - index.html | 13 - test/Jamfile | 81 - test/Jamfile.v2 | 136 - test/basic_datagram_socket.cpp | 26 - test/basic_deadline_timer.cpp | 26 - test/basic_socket_acceptor.cpp | 26 - test/basic_stream_socket.cpp | 26 - test/buffer.cpp | 147 - test/buffered_read_stream.cpp | 218 - test/buffered_stream.cpp | 233 - test/buffered_write_stream.cpp | 233 - test/completion_condition.cpp | 26 - test/datagram_socket_service.cpp | 26 - test/deadline_timer.cpp | 187 - test/deadline_timer_service.cpp | 26 - test/error.cpp | 90 - test/io_service.cpp | 242 - test/ip/address.cpp | 26 - test/ip/address_v4.cpp | 132 - test/ip/address_v6.cpp | 153 - test/ip/basic_endpoint.cpp | 26 - test/ip/basic_resolver.cpp | 26 - test/ip/basic_resolver_entry.cpp | 26 - test/ip/basic_resolver_iterator.cpp | 26 - test/ip/basic_resolver_query.cpp | 26 - test/ip/host_name.cpp | 57 - test/ip/multicast.cpp | 343 - test/ip/resolver_query_base.cpp | 26 - test/ip/resolver_service.cpp | 26 - test/ip/tcp.cpp | 367 - test/ip/udp.cpp | 297 - test/ip/unicast.cpp | 171 - test/ip/v6_only.cpp | 134 - test/is_read_buffered.cpp | 126 - test/is_write_buffered.cpp | 126 - test/placeholders.cpp | 26 - test/read.cpp | 631 - test/read_until.cpp | 432 - test/socket_acceptor_service.cpp | 26 - test/socket_base.cpp | 653 - test/ssl/Jamfile | 45 - test/ssl/Jamfile.v2 | 65 - test/ssl/basic_context.cpp | 26 - test/ssl/context.cpp | 26 - test/ssl/context_base.cpp | 26 - test/ssl/context_service.cpp | 26 - test/ssl/stream.cpp | 126 - test/ssl/stream_base.cpp | 26 - test/ssl/stream_service.cpp | 26 - test/strand.cpp | 171 - test/stream_socket_service.cpp | 26 - test/time_traits.cpp | 26 - test/unit_test.hpp | 48 - test/write.cpp | 585 - 262 files changed, 67430 deletions(-) delete mode 100644 doc/Jamfile.v2 delete mode 100644 doc/asio.qbk delete mode 100644 doc/design.qbk delete mode 100644 doc/design/allocation.qbk delete mode 100644 doc/design/async.qbk delete mode 100644 doc/design/buffers.qbk delete mode 100644 doc/design/eof.qbk delete mode 100644 doc/design/implementation.qbk delete mode 100644 doc/design/line_based.qbk delete mode 100644 doc/design/proactor.dot delete mode 100644 doc/design/proactor.png delete mode 100644 doc/design/rationale.qbk delete mode 100644 doc/design/strands.qbk delete mode 100644 doc/design/threads.qbk delete mode 100644 doc/doxy2qbk.pl delete mode 100644 doc/examples.qbk delete mode 100644 doc/noncopyable_dox.txt delete mode 100644 doc/quickref.xml delete mode 100644 doc/reference.dox delete mode 100644 doc/reference.qbk delete mode 100644 doc/reference.xsl delete mode 100644 doc/requirements.qbk delete mode 100644 doc/requirements/AcceptHandler.qbk delete mode 100644 doc/requirements/AsyncReadStream.qbk delete mode 100644 doc/requirements/AsyncWriteStream.qbk delete mode 100644 doc/requirements/CompletionHandler.qbk delete mode 100644 doc/requirements/ConnectHandler.qbk delete mode 100644 doc/requirements/ConstBufferSequence.qbk delete mode 100644 doc/requirements/ConvertibleToConstBuffer.qbk delete mode 100644 doc/requirements/ConvertibleToMutableBuffer.qbk delete mode 100644 doc/requirements/DatagramSocketService.qbk delete mode 100644 doc/requirements/Endpoint.qbk delete mode 100644 doc/requirements/GettableSocketOption.qbk delete mode 100644 doc/requirements/Handler.qbk delete mode 100644 doc/requirements/InternetProtocol.qbk delete mode 100644 doc/requirements/IoControlCommand.qbk delete mode 100644 doc/requirements/IoObjectService.qbk delete mode 100644 doc/requirements/MutableBufferSequence.qbk delete mode 100644 doc/requirements/Protocol.qbk delete mode 100644 doc/requirements/ReadHandler.qbk delete mode 100644 doc/requirements/ResolveHandler.qbk delete mode 100644 doc/requirements/ResolverService.qbk delete mode 100644 doc/requirements/Service.qbk delete mode 100644 doc/requirements/SettableSocketOption.qbk delete mode 100644 doc/requirements/SocketAcceptorService.qbk delete mode 100644 doc/requirements/SocketService.qbk delete mode 100644 doc/requirements/StreamSocketService.qbk delete mode 100644 doc/requirements/SyncReadStream.qbk delete mode 100644 doc/requirements/SyncWriteStream.qbk delete mode 100644 doc/requirements/TimeTraits.qbk delete mode 100644 doc/requirements/TimerService.qbk delete mode 100644 doc/requirements/WaitHandler.qbk delete mode 100644 doc/requirements/WriteHandler.qbk delete mode 100644 doc/requirements/asynchronous_operations.qbk delete mode 100644 doc/std_exception_dox.txt delete mode 100644 doc/tutorial.dox delete mode 100644 doc/tutorial.qbk delete mode 100644 doc/tutorial.xsl delete mode 100644 doc/using.qbk delete mode 100644 example/allocation/Jamfile delete mode 100644 example/allocation/Jamfile.v2 delete mode 100644 example/allocation/server.cpp delete mode 100644 example/buffers/Jamfile delete mode 100644 example/buffers/Jamfile.v2 delete mode 100644 example/buffers/reference_counted.cpp delete mode 100644 example/chat/Jamfile delete mode 100644 example/chat/Jamfile.v2 delete mode 100644 example/chat/chat_client.cpp delete mode 100644 example/chat/chat_message.hpp delete mode 100644 example/chat/chat_server.cpp delete mode 100644 example/echo/Jamfile delete mode 100644 example/echo/Jamfile.v2 delete mode 100644 example/echo/async_tcp_echo_server.cpp delete mode 100644 example/echo/async_udp_echo_server.cpp delete mode 100644 example/echo/blocking_tcp_echo_client.cpp delete mode 100644 example/echo/blocking_tcp_echo_server.cpp delete mode 100644 example/echo/blocking_udp_echo_client.cpp delete mode 100644 example/echo/blocking_udp_echo_server.cpp delete mode 100644 example/http/client/Jamfile delete mode 100644 example/http/client/Jamfile.v2 delete mode 100644 example/http/client/async_client.cpp delete mode 100644 example/http/client/sync_client.cpp delete mode 100644 example/http/doc_root/data_1K.html delete mode 100644 example/http/doc_root/data_2K.html delete mode 100644 example/http/doc_root/data_4K.html delete mode 100644 example/http/doc_root/data_8K.html delete mode 100644 example/http/server/Jamfile delete mode 100644 example/http/server/Jamfile.v2 delete mode 100644 example/http/server/connection.cpp delete mode 100644 example/http/server/connection.hpp delete mode 100644 example/http/server/connection_manager.cpp delete mode 100644 example/http/server/connection_manager.hpp delete mode 100644 example/http/server/header.hpp delete mode 100644 example/http/server/mime_types.cpp delete mode 100644 example/http/server/mime_types.hpp delete mode 100644 example/http/server/posix_main.cpp delete mode 100644 example/http/server/reply.cpp delete mode 100644 example/http/server/reply.hpp delete mode 100644 example/http/server/request.hpp delete mode 100644 example/http/server/request_handler.cpp delete mode 100644 example/http/server/request_handler.hpp delete mode 100644 example/http/server/request_parser.cpp delete mode 100644 example/http/server/request_parser.hpp delete mode 100644 example/http/server/server.cpp delete mode 100644 example/http/server/server.hpp delete mode 100644 example/http/server/win_main.cpp delete mode 100644 example/http/server2/Jamfile delete mode 100644 example/http/server2/Jamfile.v2 delete mode 100644 example/http/server2/connection.cpp delete mode 100644 example/http/server2/connection.hpp delete mode 100644 example/http/server2/header.hpp delete mode 100644 example/http/server2/io_service_pool.cpp delete mode 100644 example/http/server2/io_service_pool.hpp delete mode 100644 example/http/server2/mime_types.cpp delete mode 100644 example/http/server2/mime_types.hpp delete mode 100644 example/http/server2/posix_main.cpp delete mode 100644 example/http/server2/reply.cpp delete mode 100644 example/http/server2/reply.hpp delete mode 100644 example/http/server2/request.hpp delete mode 100644 example/http/server2/request_handler.cpp delete mode 100644 example/http/server2/request_handler.hpp delete mode 100644 example/http/server2/request_parser.cpp delete mode 100644 example/http/server2/request_parser.hpp delete mode 100644 example/http/server2/server.cpp delete mode 100644 example/http/server2/server.hpp delete mode 100644 example/http/server2/win_main.cpp delete mode 100644 example/http/server3/Jamfile delete mode 100644 example/http/server3/Jamfile.v2 delete mode 100644 example/http/server3/connection.cpp delete mode 100644 example/http/server3/connection.hpp delete mode 100644 example/http/server3/header.hpp delete mode 100644 example/http/server3/mime_types.cpp delete mode 100644 example/http/server3/mime_types.hpp delete mode 100644 example/http/server3/posix_main.cpp delete mode 100644 example/http/server3/reply.cpp delete mode 100644 example/http/server3/reply.hpp delete mode 100644 example/http/server3/request.hpp delete mode 100644 example/http/server3/request_handler.cpp delete mode 100644 example/http/server3/request_handler.hpp delete mode 100644 example/http/server3/request_parser.cpp delete mode 100644 example/http/server3/request_parser.hpp delete mode 100644 example/http/server3/server.cpp delete mode 100644 example/http/server3/server.hpp delete mode 100644 example/http/server3/win_main.cpp delete mode 100644 example/invocation/Jamfile delete mode 100644 example/invocation/Jamfile.v2 delete mode 100644 example/invocation/prioritised_handlers.cpp delete mode 100644 example/iostreams/Jamfile delete mode 100644 example/iostreams/Jamfile.v2 delete mode 100644 example/iostreams/daytime_client.cpp delete mode 100644 example/iostreams/daytime_server.cpp delete mode 100644 example/multicast/Jamfile delete mode 100644 example/multicast/Jamfile.v2 delete mode 100644 example/multicast/receiver.cpp delete mode 100644 example/multicast/sender.cpp delete mode 100644 example/serialization/Jamfile delete mode 100644 example/serialization/Jamfile.v2 delete mode 100644 example/serialization/client.cpp delete mode 100644 example/serialization/connection.hpp delete mode 100644 example/serialization/server.cpp delete mode 100644 example/serialization/stock.hpp delete mode 100644 example/services/Jamfile delete mode 100644 example/services/Jamfile.v2 delete mode 100644 example/services/basic_logger.hpp delete mode 100644 example/services/daytime_client.cpp delete mode 100644 example/services/logger.hpp delete mode 100644 example/services/logger_service.cpp delete mode 100644 example/services/logger_service.hpp delete mode 100644 example/services/stream_socket_service.hpp delete mode 100644 example/socks4/Jamfile delete mode 100644 example/socks4/Jamfile.v2 delete mode 100644 example/socks4/socks4.hpp delete mode 100644 example/socks4/sync_client.cpp delete mode 100644 example/ssl/Jamfile delete mode 100644 example/ssl/Jamfile.v2 delete mode 100644 example/ssl/README delete mode 100644 example/ssl/ca.pem delete mode 100644 example/ssl/client.cpp delete mode 100644 example/ssl/dh512.pem delete mode 100644 example/ssl/server.cpp delete mode 100644 example/ssl/server.pem delete mode 100644 example/timeouts/Jamfile delete mode 100644 example/timeouts/Jamfile.v2 delete mode 100644 example/timeouts/accept_timeout.cpp delete mode 100644 example/timeouts/connect_timeout.cpp delete mode 100644 example/timeouts/datagram_receive_timeout.cpp delete mode 100644 example/timeouts/stream_receive_timeout.cpp delete mode 100644 example/timers/Jamfile delete mode 100644 example/timers/Jamfile.v2 delete mode 100644 example/timers/tick_count_timer.cpp delete mode 100644 example/timers/time_t_timer.cpp delete mode 100644 example/tutorial/Jamfile delete mode 100644 example/tutorial/Jamfile.v2 delete mode 100644 example/tutorial/daytime1/client.cpp delete mode 100644 example/tutorial/daytime2/server.cpp delete mode 100644 example/tutorial/daytime3/server.cpp delete mode 100644 example/tutorial/daytime4/client.cpp delete mode 100644 example/tutorial/daytime5/server.cpp delete mode 100644 example/tutorial/daytime6/server.cpp delete mode 100644 example/tutorial/daytime7/server.cpp delete mode 100644 example/tutorial/daytime_dox.txt delete mode 100644 example/tutorial/index_dox.txt delete mode 100644 example/tutorial/timer1/timer.cpp delete mode 100644 example/tutorial/timer2/timer.cpp delete mode 100644 example/tutorial/timer3/timer.cpp delete mode 100644 example/tutorial/timer4/timer.cpp delete mode 100644 example/tutorial/timer5/timer.cpp delete mode 100644 example/tutorial/timer_dox.txt delete mode 100644 index.html delete mode 100644 test/Jamfile delete mode 100644 test/Jamfile.v2 delete mode 100644 test/basic_datagram_socket.cpp delete mode 100644 test/basic_deadline_timer.cpp delete mode 100644 test/basic_socket_acceptor.cpp delete mode 100644 test/basic_stream_socket.cpp delete mode 100644 test/buffer.cpp delete mode 100644 test/buffered_read_stream.cpp delete mode 100644 test/buffered_stream.cpp delete mode 100644 test/buffered_write_stream.cpp delete mode 100644 test/completion_condition.cpp delete mode 100644 test/datagram_socket_service.cpp delete mode 100644 test/deadline_timer.cpp delete mode 100644 test/deadline_timer_service.cpp delete mode 100644 test/error.cpp delete mode 100644 test/io_service.cpp delete mode 100644 test/ip/address.cpp delete mode 100644 test/ip/address_v4.cpp delete mode 100644 test/ip/address_v6.cpp delete mode 100644 test/ip/basic_endpoint.cpp delete mode 100644 test/ip/basic_resolver.cpp delete mode 100644 test/ip/basic_resolver_entry.cpp delete mode 100644 test/ip/basic_resolver_iterator.cpp delete mode 100644 test/ip/basic_resolver_query.cpp delete mode 100644 test/ip/host_name.cpp delete mode 100644 test/ip/multicast.cpp delete mode 100644 test/ip/resolver_query_base.cpp delete mode 100644 test/ip/resolver_service.cpp delete mode 100644 test/ip/tcp.cpp delete mode 100644 test/ip/udp.cpp delete mode 100644 test/ip/unicast.cpp delete mode 100644 test/ip/v6_only.cpp delete mode 100644 test/is_read_buffered.cpp delete mode 100644 test/is_write_buffered.cpp delete mode 100644 test/placeholders.cpp delete mode 100644 test/read.cpp delete mode 100644 test/read_until.cpp delete mode 100644 test/socket_acceptor_service.cpp delete mode 100644 test/socket_base.cpp delete mode 100644 test/ssl/Jamfile delete mode 100644 test/ssl/Jamfile.v2 delete mode 100644 test/ssl/basic_context.cpp delete mode 100644 test/ssl/context.cpp delete mode 100644 test/ssl/context_base.cpp delete mode 100644 test/ssl/context_service.cpp delete mode 100644 test/ssl/stream.cpp delete mode 100644 test/ssl/stream_base.cpp delete mode 100644 test/ssl/stream_service.cpp delete mode 100644 test/strand.cpp delete mode 100644 test/stream_socket_service.cpp delete mode 100644 test/time_traits.cpp delete mode 100644 test/unit_test.hpp delete mode 100644 test/write.cpp diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 deleted file mode 100644 index 9ca14504..00000000 --- a/doc/Jamfile.v2 +++ /dev/null @@ -1,36 +0,0 @@ -# -# Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) -# -# Distributed under the Boost Software License, Version 1.0. (See accompanying -# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -# - -using quickbook ; - -xml asio - : - asio.qbk - ; - -boostbook standalone - : - asio - : - boost.root=../../../.. - boost.libraries=../../../../libs/libraries.htm - navig.graphics.path="../../../../doc/html/images/" - chapter.autolabel=0 - chunk.section.depth=8 - chunk.first.sections=1 - toc.section.depth=2 - toc.max.depth=1 - generate.section.toc.level=1 - generate.toc="chapter nop section nop" - ; - - -install html - : - /boost//doc/html/boostbook.css - design/proactor.png - ; diff --git a/doc/asio.qbk b/doc/asio.qbk deleted file mode 100644 index a9605af8..00000000 --- a/doc/asio.qbk +++ /dev/null @@ -1,94 +0,0 @@ -[/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) - / - / Distributed under the Boost Software License, Version 1.0. (See accompanying - / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - /] - -[library Boost.Asio - [quickbook 1.4] - [copyright 2003 - 2007 Christopher M. Kohlhoff] - [purpose Networking library] - [license - Distributed under the Boost Software License, Version 1.0. - (See accompanying file LICENSE_1_0.txt or copy at - [@http://www.boost.org/LICENSE_1_0.txt]) - ] - [authors [Kohlhoff, Christopher]] - [category template] - [category generic] - [last-revision $Date$] -] - -[template mdash[] '''— '''] -[def __POSIX__ /POSIX/] -[def __Windows__ /Windows/] -[def __accept__ [@http://www.opengroup.org/onlinepubs/000095399/functions/accept.html `accept()`]] -[def __connect__ [@http://www.opengroup.org/onlinepubs/000095399/functions/connect.html `connect()`]] -[def __getpeername__ [@http://www.opengroup.org/onlinepubs/000095399/functions/getpeername.html `getpeername()`]] -[def __getsockname__ [@http://www.opengroup.org/onlinepubs/000095399/functions/getsockname.html `getsockname()`]] -[def __getsockopt__ [@http://www.opengroup.org/onlinepubs/000095399/functions/getsockopt.html `getsockopt()`]] -[def __ioctl__ [@http://www.opengroup.org/onlinepubs/000095399/functions/ioctl.html `ioctl()`]] -[def __recvfrom__ [@http://www.opengroup.org/onlinepubs/000095399/functions/recvfrom.html `recvfrom()`]] -[def __sendto__ [@http://www.opengroup.org/onlinepubs/000095399/functions/sendto.html `sendto()`]] -[def __setsockopt__ [@http://www.opengroup.org/onlinepubs/000095399/functions/setsockopt.html `setsockopt()`]] -[def __socket__ [@http://www.opengroup.org/onlinepubs/000095399/functions/socket.html `socket()`]] - -[/=============================================================================] - -Boost.Asio is a cross-platform C++ library for network programming that -provides developers with a consistent asynchronous I/O model using a modern C++ -approach. - -[variablelist - [ - [ - [link boost_asio.using Using Boost.Asio] - ] - [ - How to use Boost.Asio in your applications. Includes information on - library dependencies and supported platforms. - ] - ] - [ - [ - [link boost_asio.tutorial Tutorial] - ] - [ - A tutorial that introduces the fundamental concepts required to use - Boost.Asio, and shows how to use Boost.Asio to develop simple client and - server programs. - ] - ] - [ - [ - [link boost_asio.examples Examples] - ] - [ - Examples that illustrate the use of Boost.Asio in more complex - applications. - ] - ] - [ - [ - [link boost_asio.reference Reference] - ] - [ - Detailed class and function reference. - ] - ] - [ - [ - [link boost_asio.design Design] - ] - [ - Rationale and design information for Boost.Asio. - ] - ] -] - -[include using.qbk] -[include tutorial.qbk] -[include examples.qbk] -[include reference.qbk] -[include design.qbk] diff --git a/doc/design.qbk b/doc/design.qbk deleted file mode 100644 index 35336d3f..00000000 --- a/doc/design.qbk +++ /dev/null @@ -1,104 +0,0 @@ -[/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) - / - / Distributed under the Boost Software License, Version 1.0. (See accompanying - / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - /] - -[section:design Design Notes] - -[variablelist - [ - [ - [link boost_asio.design.rationale Rationale] - ] - [ - Design rationale for the Boost.Asio library. - ] - ] - [ - [ - [link boost_asio.design.async Asynchronous operations] - ] - [ - Support for asynchronous operations in the Boost.Asio library is based on - the Proactor pattern. This design note outlines the advantages and - disadvantages of this approach. - ] - ] - [ - [ - [link boost_asio.design.allocation Custom memory allocation] - ] - [ - Describes the custom memory allocation support in Boost.Asio. - ] - ] - [ - [ - [link boost_asio.design.buffers Buffers] - ] - [ - Examines the buffer abstraction used by asio in order to support - scatter-gather operations. - ] - ] - [ - [ - [link boost_asio.design.eof Why EOF is an error] - ] - [ - Discusses why the end-of-file condition should be an error code. - ] - ] - [ - [ - [link boost_asio.design.line_based Line-based protocols] - ] - [ - Outlines Boost.Asio's support for line-based protocols. - ] - ] - [ - [ - [link boost_asio.design.threads Threads] - ] - [ - An implementation of Boost.Asio for a particular platform may make use of - one or more additional threads to emulate asynchronicity. This design - note discusses design rules applied to the use of threads in this way. - ] - ] - [ - [ - [link boost_asio.design.strands Strands] - ] - [ - Describes the "strand" abstraction provided by Boost.Asio to ease - concurrent programming and provide scalability across multiple - processors. - ] - ] - [ - [ - [link boost_asio.design.implementation Platform-specific implementation] - ] - [ - This design note lists platform-specific implementation details, such as - the default demultiplexing mechanism, the number of threads created - internally, and when threads are created. - ] - ] -] - -[include design/rationale.qbk] -[include design/async.qbk] -[include design/allocation.qbk] -[include design/buffers.qbk] -[include design/eof.qbk] -[include design/line_based.qbk] -[include design/threads.qbk] -[include design/strands.qbk] -[include design/implementation.qbk] - -[endsect] diff --git a/doc/design/allocation.qbk b/doc/design/allocation.qbk deleted file mode 100644 index d0127143..00000000 --- a/doc/design/allocation.qbk +++ /dev/null @@ -1,51 +0,0 @@ -[/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) - / - / Distributed under the Boost Software License, Version 1.0. (See accompanying - / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - /] - -[section:allocation Custom Memory Allocation] - -Many asynchronous operations need to allocate an object to store state -associated with the operation. For example, a Win32 implementation needs -`OVERLAPPED`-derived objects to pass to Win32 API functions. - -Furthermore, programs typically contain easily identifiable chains of -asynchronous operations. A half duplex protocol implementation (e.g. an HTTP -server) would have a single chain of operations per client (receives followed -by sends). A full duplex protocol implementation would have two chains -executing in parallel. Programs should be able to leverage this knowledge to -reuse memory for all asynchronous operations in a chain. - -Given a copy of a user-defined `Handler` object `h`, if the implementation -needs to allocate memory associated with that handler it will execute the code: - - void* pointer = asio_handler_allocate(size, &h); - -Similarly, to deallocate the memory it will execute: - - asio_handler_deallocate(pointer, size, &h); - -These functions are located using argument-dependent lookup. The implementation -provides default implementations of the above functions in the `asio` namespace: - - void* asio_handler_allocate(size_t, ...); - void asio_handler_deallocate(void*, size_t, ...); - -which are implemented in terms of `::operator new()` and `::operator delete()` -respectively. - -The implementation guarantees that the deallocation will occur before the -associated handler is invoked, which means the memory is ready to be reused for -any new asynchronous operations started by the handler. - -The custom memory allocation functions may be called from any user-created -thread that is calling a library function. The implementation guarantees that, -for the asynchronous operations included the library, the implementation will -not make concurrent calls to the memory allocation functions for that handler. -The implementation will insert appropriate memory barriers to ensure correct -memory visibility should allocation functions need to be called from different -threads. - -[endsect] diff --git a/doc/design/async.qbk b/doc/design/async.qbk deleted file mode 100644 index ad76073f..00000000 --- a/doc/design/async.qbk +++ /dev/null @@ -1,185 +0,0 @@ -[/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) - / - / Distributed under the Boost Software License, Version 1.0. (See accompanying - / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - /] - -[section:async Asynchronous Operations] - -The proposed library offers side-by-side support for synchronous and -asynchronous operations. The asynchronous support is based on the Proactor -design pattern [link boost_asio.design.async.references \[POSA2\]], and the -advantages and disadvantages of this approach, when compared to a -synchronous-only or Reactor approach, are outlined below. - -[heading Proactor and Boost.Asio] - -Let us examine how the Proactor design pattern is implemented in Boost.Asio, -without reference to platform-specific details. - -[$proactor.png] - -[*Proactor design pattern (adapted from \[POSA2\])] - -[mdash] Asynchronous Operation - -[:Defines an operation that is executed asynchronously, such as an asynchronous -read or write on a socket.] - -[mdash] Asynchronous Operation Processor - -[:Executes asynchronous operations and queues events on a completion event -queue when operations complete. From a high-level point of view, services like -asio::stream_socket_service are asynchronous operation processors.] - -[mdash] Completion Event Queue - -[:Buffers completion events until they are dequeued by an asynchronous event -demultiplexer.] - -[mdash] Completion Handler - -[:Processes the result of an asynchronous operation. These are function -objects, often created using `boost::bind`.] - -[mdash] Asynchronous Event Demultiplexer - -[:Blocks waiting for events to occur on the completion event queue, and returns -a completed event to its caller.] - -[mdash] Proactor - -[:Calls the asynchronous event demultiplexer to dequeue events, and dispatches -the completion handler (i.e. invokes the function object) associated with the -event. This abstraction is represented by `boost::asio::io_service`.] - -[mdash] Initiator - -[:Application-specific code that starts asynchronous operations. The initiator -interacts with an asynchronous operation processor via a high-level interface -such as `asio::basic_stream_socket`, which in turn delegates to a service like -`asio::stream_socket_service`.] - -[heading Implementation Using Reactor] - -On many platforms, Boost.Asio implements the Proactor design pattern in terms -of a Reactor, such as `select`, `epoll` or `kqueue`. This implementation -approach corresponds to the Proactor design pattern as follows: - -[mdash] Asynchronous Operation Processor - -[:A reactor implemented using `select`, `epoll` or `kqueue`. When the reactor -indicates that the resource is ready to perform the operation, the processor -executes the asynchronous operation and enqueues the associated completion -handler on the completion event queue.] - -[mdash] Completion Event Queue - -[:A linked list of completion handlers (i.e. function objects).] - -[mdash] Asynchronous Event Demultiplexer - -[:This is implemented by waiting on an event or condition variable until a -completion handler is available in the completion event queue.] - -[heading Implementation Using Windows Overlapped I/O] - -On Windows NT, 2000 and XP, Boost.Asio takes advantage of overlapped I/O to -provide an efficient implementation of the Proactor design pattern. This -implementation approach corresponds to the Proactor design pattern as follows: - -[mdash] Asynchronous Operation Processor - -[:This is implemented by the operating system. Operations are initiated by -calling an overlapped function such as `AcceptEx`.] - -[mdash] Completion Event Queue - -[:This is implemented by the operating system, and is associated with an I/O -completion port. There is one I/O completion port for each asio::io_service -instance.] - -[mdash] Asynchronous Event Demultiplexer - -[:Called by Boost.Asio to dequeue events and their associated completion -handlers.] - -[heading Advantages] - -[mdash] Portability. - -[:Many operating systems offer a native asynchronous I/O API (such as -overlapped I/O on __Windows__) as the preferred option for developing high -performance network applications. The proposed library may be implemented in -terms of native asynchronous I/O. However, if native support is not available, -the library may also be implemented using synchronous event demultiplexors that -typify the Reactor pattern, such as __POSIX__ `select()`.] - -[mdash] Decoupling threading from concurrency. - -[:Long-duration operations are performed asynchronously by the implementation -on behalf of the application. Consequently applications do not need to spawn -many threads in order to increase concurrency.] - -[mdash] Performance and scalability. - -[:Implementation strategies such as thread-per-connection (which a -synchronous-only approach would require) can degrade system performance, due to -increased context switching, synchronisation and data movement among CPUs. With -asynchronous operations it is possible to avoid the cost of context switching -by minimising the number of operating system threads [mdash] typically a -limited resource [mdash] and only activating the logical threads of control -that have events to process.] - -[mdash] Simplified application synchronisation. - -[:Asynchronous operation completion handlers can be written as though they -exist in a single-threaded environment, and so application logic can be -developed with little or no concern for synchronisation issues.] - -[mdash] Function composition. - -[:Function composition refers to the implementation of functions to provide a -higher-level operation, such as sending a message in a particular format. Each -function is implemented in terms of multiple calls to lower-level read or write -operations.] - -[:For example, consider a protocol where each message consists of a -fixed-length header followed by a variable length body, where the length of the -body is specified in the header. A hypothetical read_message operation could be -implemented using two lower-level reads, the first to receive the header and, -once the length is known, the second to receive the body.] - -[:To compose functions in an asynchronous model, asynchronous operations can be -chained together. That is, a completion handler for one operation can initiate -the next. Starting the first call in the chain can be encapsulated so that the -caller need not be aware that the higher-level operation is implemented as a -chain of asynchronous operations.] - -[:The ability to compose new operations in this way simplifies the development -of higher levels of abstraction above a networking library, such as functions -to support a specific protocol.] - -[heading Disadvantages] - -[mdash] Program complexity. - -[:It is more difficult to develop applications using asynchronous mechanisms -due to the separation in time and space between operation initiation and -completion. Applications may also be harder to debug due to the inverted flow -of control.] - -[mdash] Memory usage. - -[:Buffer space must be committed for the duration of a read or write operation, -which may continue indefinitely, and a separate buffer is required for each -concurrent operation. The Reactor pattern, on the other hand, does not require -buffer space until a socket is ready for reading or writing.] - -[heading References] - -\[POSA2\] D. Schmidt et al, ['Pattern Oriented Software Architecture, Volume -2]. Wiley, 2000. - -[endsect] diff --git a/doc/design/buffers.qbk b/doc/design/buffers.qbk deleted file mode 100644 index ffb380ef..00000000 --- a/doc/design/buffers.qbk +++ /dev/null @@ -1,58 +0,0 @@ -[/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) - / - / Distributed under the Boost Software License, Version 1.0. (See accompanying - / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - /] - -[section:buffers Buffers] - -To allow the development of efficient network applications, Boost.Asio includes -support for scatter-gather operations. These operations involve one or more -buffers (where each buffer is a contiguous region of memory): - -* A scatter-read receives data into multiple buffers. -* A gather-write transmits multiple buffers. - -Therefore we require an abstraction to represent a collection of buffers. The -approach used in Boost.Asio is to define a type (actually two types) to -represent a single buffer. These can be stored in a container, which may be -passed to the scatter-gather operations. - -A buffer, as a contiguous region of memory, can be represented by an address -and size in bytes. There is a distinction between modifiable memory (called -mutable in Boost.Asio) and non-modifiable memory (where the latter is -created from the storage for a const-qualified variable). These two types could -therefore be defined as follows: - - typedef std::pair mutable_buffer; - typedef std::pair const_buffer; - -Here, a mutable_buffer would be convertible to a const_buffer, but conversion -in the opposite direction is not valid. - -However, Boost.Asio does not use the above definitions, but instead defines two -classes: `mutable_buffer` and `const_buffer`. The goal of these is to provide -an opaque representation of contiguous memory, where: - -* Types behave as std::pair would in conversions. That is, a `mutable_buffer` is - convertible to a `const_buffer`, but the opposite conversion is disallowed. - -* There is protection against buffer overruns. Given a buffer instance, a user - can only create another buffer representing the same range of memory or a - sub-range of it. To provide further safety, the library also includes - mechanisms for automatically determining the size of a buffer from an array, - `boost::array` or `std::vector` of POD elements, or from a `std::string`. - -* Type safety violations must be explicitly requested using the `buffer_cast` - function. In general an application should never need to do this, but it is - required by the library implementation to pass the raw memory to the - underlying operating system functions. - -Finally, multiple buffers can be passed to scatter-gather operations (such as -`boost::asio::read` or `boost::asio::write`) by putting the buffer objects -into a container. The `MutableBufferSequence` and `ConstBufferSequence` -concepts have been defined so that containers such as `std::vector`, -`std::list`, `std::vector` or `boost::array` can be used. - -[endsect] diff --git a/doc/design/eof.qbk b/doc/design/eof.qbk deleted file mode 100644 index 9ba7f746..00000000 --- a/doc/design/eof.qbk +++ /dev/null @@ -1,17 +0,0 @@ -[/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) - / - / Distributed under the Boost Software License, Version 1.0. (See accompanying - / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - /] - -[section:eof Why EOF is an error] - -* The end of a stream can cause `read`, `async_read`, `read_until` or - `async_read_until` functions to violate their contract. E.g. - a read of N bytes may finish early due to EOF. - -* An EOF error may be used to distinguish the end of a stream from a successful - read of size 0. - -[endsect] diff --git a/doc/design/implementation.qbk b/doc/design/implementation.qbk deleted file mode 100644 index 84f39e84..00000000 --- a/doc/design/implementation.qbk +++ /dev/null @@ -1,215 +0,0 @@ -[/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) - / - / Distributed under the Boost Software License, Version 1.0. (See accompanying - / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - /] - -[section:implementation Platform-Specific Implementation] - -This design note lists platform-specific implementation details, such as the -default demultiplexing mechanism, the number of threads created internally, and -when threads are created. - - -[heading Linux Kernel 2.4] - -Demultiplexing mechanism: - -* Uses `select` for demultiplexing. This means that the number of file -descriptors in the process cannot be permitted to exceed `FD_SETSIZE`. - -Threads: - -* Demultiplexing using `select` is performed in one of the threads that calls -`io_service::run()`, `io_service::run_one()`, `io_service::poll()` or -`io_service::poll_one()`. - -* An additional thread per `io_service` is used to emulate asynchronous host -resolution. This thread is created on the first call to either -`ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`. - - -[heading Linux Kernel 2.6] - -Demultiplexing mechanism: - -* Uses `epoll` for demultiplexing. - -Threads: - -* Demultiplexing using `epoll` is performed in one of the threads that calls -`io_service::run()`, `io_service::run_one()`, `io_service::poll()` or -`io_service::poll_one()`. - -* An additional thread per `io_service` is used to emulate asynchronous host -resolution. This thread is created on the first call to either -`ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`. - - -[heading Solaris] - -Demultiplexing mechanism: - -* Uses [^/dev/poll] for demultiplexing. - -Threads: - -* Demultiplexing using [^/dev/poll] is performed in one of the threads that -calls `io_service::run()`, `io_service::run_one()`, `io_service::poll()` or -`io_service::poll_one()`. - -* An additional thread per `io_service` is used to emulate asynchronous host -resolution. This thread is created on the first call to either -`ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`. - - -[heading QNX Neutrino] - -Demultiplexing mechanism: - -* Uses `select` for demultiplexing. This means that the number of file -descriptors in the process cannot be permitted to exceed `FD_SETSIZE`. - -Threads: - -* Demultiplexing using `select` is performed in one of the threads that calls -`io_service::run()`, `io_service::run_one()`, `io_service::poll()` or -`io_service::poll_one()`. - -* An additional thread per `io_service` is used to emulate asynchronous host -resolution. This thread is created on the first call to either -`ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`. - - -[heading Mac OS X] - -Demultiplexing mechanism: - -* Uses `kqueue` for demultiplexing. - -Threads: - -* Demultiplexing using `kqueue` is performed in one of the threads that calls -`io_service::run()`, `io_service::run_one()`, `io_service::poll()` or -`io_service::poll_one()`. - -* An additional thread per `io_service` is used to emulate asynchronous host -resolution. This thread is created on the first call to either -`ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`. - - -[heading FreeBSD] - -Demultiplexing mechanism: - -* Uses `kqueue` for demultiplexing. - -Threads: - -* Demultiplexing using `kqueue` is performed in one of the threads that calls -`io_service::run()`, `io_service::run_one()`, `io_service::poll()` or -`io_service::poll_one()`. - -* An additional thread per `io_service` is used to emulate asynchronous host -resolution. This thread is created on the first call to either -`ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`. - - -[heading AIX] - -Demultiplexing mechanism: - -* Uses `select` for demultiplexing. This means that the number of file -descriptors in the process cannot be permitted to exceed `FD_SETSIZE`. - -Threads: - -* Demultiplexing using `select` is performed in one of the threads that calls -`io_service::run()`, `io_service::run_one()`, `io_service::poll()` or -`io_service::poll_one()`. - -* An additional thread per `io_service` is used to emulate asynchronous host -resolution. This thread is created on the first call to either -`ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`. - - -[heading HP-UX] - -Demultiplexing mechanism: - -* Uses `select` for demultiplexing. This means that the number of file -descriptors in the process cannot be permitted to exceed `FD_SETSIZE`. - -Threads: - -* Demultiplexing using `select` is performed in one of the threads that calls -`io_service::run()`, `io_service::run_one()`, `io_service::poll()` or -`io_service::poll_one()`. - -* An additional thread per `io_service` is used to emulate asynchronous host -resolution. This thread is created on the first call to either -`ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`. - - -[heading Tru64] - -Demultiplexing mechanism: - -* Uses `select` for demultiplexing. This means that the number of file -descriptors in the process cannot be permitted to exceed `FD_SETSIZE`. - -Threads: - -* Demultiplexing using `select` is performed in one of the threads that calls -`io_service::run()`, `io_service::run_one()`, `io_service::poll()` or -`io_service::poll_one()`. - -* An additional thread per `io_service` is used to emulate asynchronous host -resolution. This thread is created on the first call to either -`ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`. - - -[heading Windows 95, 98 and Me] - -Demultiplexing mechanism: - -* Uses `select` for demultiplexing. - -Threads: - -* Demultiplexing using `select` is performed in one of the threads that calls -`io_service::run()`, `io_service::run_one()`, `io_service::poll()` or -`io_service::poll_one()`. - -* An additional thread per `io_service` is used to emulate asynchronous host -resolution. This thread is created on the first call to either -`ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`. - - -[heading Windows NT, 2000, XP, 2003 and Vista] - -Demultiplexing mechanism: - -* Uses overlapped I/O and I/O completion ports for all asynchronous socket -operations except for asynchronous connect. - -* Uses `select` for `deadline_timer` operations and for emulating asynchronous -connect. - -Threads: - -* Demultiplexing using I/O completion ports is performed in all threads that call -`io_service::run()`, `io_service::run_one()`, `io_service::poll()` or -`io_service::poll_one()`. - -* An additional thread per `io_service` is used for the `select` -demultiplexing. This thread is created whenever the first `deadline_timer` is -created, or on the first call to `async_connect()`. - -* An additional thread per `io_service` is used to emulate asynchronous host -resolution. This thread is created on the first call to either -`ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`. - - -[endsect] diff --git a/doc/design/line_based.qbk b/doc/design/line_based.qbk deleted file mode 100644 index d13223c9..00000000 --- a/doc/design/line_based.qbk +++ /dev/null @@ -1,50 +0,0 @@ -[/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) - / - / Distributed under the Boost Software License, Version 1.0. (See accompanying - / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - /] - -[section:line_based Line-Based Protocols] - -Many commonly-used internet protocols are line-based, which means that they -have protocol elements that are delimited by the character sequence `"\r\n"`. -Examples include HTTP, SMTP and FTP. - -To more easily permit the implementation of line-based protocols, as well as -other protocols that use delimiters, Boost.Asio includes the functions -`read_until()` and `async_read_until()`. - -The following example illustrates the use of `async_read_until()` in an HTTP -server, to receive the first line of an HTTP request from a client: - - class http_connection - { - ... - - void start() - { - asio::async_read_until(socket_, data_, "\r\n", - boost::bind(&http_connection::handle_request_line, this, _1)); - } - - void handle_request_line(boost::system::error_code ec) - { - if (!ec) - { - std::string method, uri, version; - char sp1, sp2, cr, lf; - std::istream is(&data_); - is.unsetf(std::ios_base::skipws); - is >> method >> sp1 >> uri >> sp2 >> version >> cr >> lf; - ... - } - } - - ... - - asio::ip::tcp::socket socket_; - asio::streambuf data_; - }; - -[endsect] diff --git a/doc/design/proactor.dot b/doc/design/proactor.dot deleted file mode 100644 index 87172340..00000000 --- a/doc/design/proactor.dot +++ /dev/null @@ -1,100 +0,0 @@ -digraph g -{ - edge - [ - fontname="Helvetica", - fontsize=10, - labelfontname="Helvetica", - labelfontsize=10 - ]; - - node - [ - fontname="Helvetica", - fontsize=10, - shape=record - ]; - - initiator - [ - label="Initiator" - ]; - - async_processor - [ - label="Asynchronous\nOperation Processor" - ]; - - async_op - [ - label="Asynchronous\nOperation" - ]; - - completion_queue - [ - label="Completion\nEvent Queue" - ]; - - async_event_demuxer - [ - label="Asynchronous\nEvent Demultiplexer" - ]; - - proactor - [ - label="Proactor" - ]; - - handler - [ - label="Completion\nHandler" - ]; - - initiator -> async_processor - [ - label="uses", - style="dashed" - ]; - - initiator -> async_op - [ - label="starts", - style="dashed" - ]; - - initiator -> handler - [ - label="creates", - style="dashed" - ]; - - async_processor -> async_op - [ - label="executes", - style="dashed" - ]; - - async_processor -> completion_queue - [ - label="enqueues", - style="dashed" - ]; - - async_op -> handler; - - async_event_demuxer -> completion_queue - [ - label="dequeues", - style="dashed" - ]; - - proactor -> async_event_demuxer - [ - ]; - - proactor -> handler - [ - label="demultiplexes\n& dispatches" - style="dashed" - ]; -} diff --git a/doc/design/proactor.png b/doc/design/proactor.png deleted file mode 100644 index a0653b0106c8514b24ad8ed3aef48d320168634f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 30877 zcmeAS@N?(olHy`uVBq!ia0y~yV2WU1V4TFk#=yW}|9Agn1_lO}bVpxD28Nr=PS^Yw zGB7Z37I;J!GcfQS0b$0e+I-Rs3=AqIt`Q}{`DrEPiAAXlfu)(r*&&&^sS4(LhI+;d z8or6i3jV#3eF6nsVJuOEuvdhIoMKjg@ z|IfHNKj){#EEY|$`N+0X)F8TGJC1JN#R6AuW1WKI|eMSy4lNjD~M4#gG$rNbTxOHcmz_&9c| zR_GUxj{;5|F^fM&J}$Nk(tX1wBK7!KFZXWF%9Gja_da9el@cj4ZV^!JIrjWVMhzc3 z=bECTGls`o?zZf472hDBbrATno8?4A&HwviasMLm ze@mywy*g+8-lqEB?fm^S1AhO0zd!h$@{YLzP92+iWGpZ3{r~Uxx~Q#L-y$|7G~UkN z|MyPj^10J4m+krY>vi7ev*zbt8oK69VAW3f_v^L(_L`qX;oI}>zR3Q5w>N* zz%??3M+D#9DL&u(&$i}A!S&tc`Q?{=&39UrzH*8G|MhzO+yAewuD<>Mu#ni5Ji|KAUzi#8PSKB7sFzfu|EVf4A$D7UP&&b%O zoDkUUa6P`hcKh>r)w|}`|GRnbe)apkcV`$T$Lz2BduML>y_asiQmM=b|NQ*y`$u8k zgO$tY72VF++{&pzV_=>+2)y-(q`vAyR|L%^}ZjExU1jy zS-&edE?2$A`r{Gdx3-Ec8m`}NB=gUnp_H@l=QC;UqY{QmExvj26%SjNJl6Q~_V)E- zNyk#;f|vXC?)&~?asRD~`+F*jg?+c*De9hWTfNQt!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iNWM)4 - void asio_handler_invoke(F f, my_handler*) - { - // Do custom invocation here. - // Default implementation calls f(); - } - -The `io_service::strand::wrap()` function creates a new completion handler that -defines `asio_handler_invoke` so that the function object is executed through the -strand. - -[endsect] diff --git a/doc/design/threads.qbk b/doc/design/threads.qbk deleted file mode 100644 index e9f8e382..00000000 --- a/doc/design/threads.qbk +++ /dev/null @@ -1,51 +0,0 @@ -[/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) - / - / Distributed under the Boost Software License, Version 1.0. (See accompanying - / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - /] - -[section:threads Threads] - -[heading Thread Safety] - -In general, it is safe to make concurrent use of distinct objects, but unsafe -to make concurrent use of a single object. However, types such as `io_service` -provide a stronger guarantee that it is safe to use a single object -concurrently. - -[heading Internal Threads] - -The implementation of this library for a particular platform may make use of -one or more internal threads to emulate asynchronicity. As far as possible, -these threads must be invisible to the library user. In particular, the threads: - -* must not call the user's code directly; and - -* must block all signals. - -This approach is complemented by the following guarantee: - -* Asynchronous completion handlers will only be called from threads that are - currently calling `io_service::run()`. - -Consequently, it is the library user's responsibility to create and manage all -threads to which the notifications will be delivered. - -The reasons for this approach include: - -* By only calling `io_service::run()` from a single thread, the user's code can - avoid the development complexity associated with synchronisation. For - example, a library user can implement scalable servers that are - single-threaded (from the user's point of view). - -* A library user may need to perform initialisation in a thread shortly after - the thread starts and before any other application code is executed. For - example, users of Microsoft's COM must call `CoInitializeEx` before any other - COM operations can be called from that thread. - -* The library interface is decoupled from interfaces for thread creation and - management, and permits implementations on platforms where threads are not - available. - -[endsect] diff --git a/doc/doxy2qbk.pl b/doc/doxy2qbk.pl deleted file mode 100644 index c539239c..00000000 --- a/doc/doxy2qbk.pl +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/perl -w - -# Copyright (c) 2003-2006 Christopher M. Kohlhoff (chris at kohlhoff dot com) -# -# Distributed under the Boost Software License, Version 1.0. (See accompanying -# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -use strict; - -system("doxygen reference.dox"); -chdir("xml"); -system("xsltproc combine.xslt index.xml > all.xml"); -chdir(".."); -system("xsltproc reference.xsl xml/all.xml > reference.qbk"); -system("rm -rf xml"); - -system("doxygen tutorial.dox"); -chdir("xml"); -system("xsltproc combine.xslt index.xml > all.xml"); -chdir(".."); -system("xsltproc tutorial.xsl xml/all.xml > tutorial.qbk"); -system("rm -rf xml"); diff --git a/doc/examples.qbk b/doc/examples.qbk deleted file mode 100644 index 991667e8..00000000 --- a/doc/examples.qbk +++ /dev/null @@ -1,220 +0,0 @@ -[/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) - / - / Distributed under the Boost Software License, Version 1.0. (See accompanying - / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - /] - -[section:examples Examples] - - -[heading Allocation] - -This example shows how to customise the allocation of memory associated with -asynchronous operations. - -* [@../../example/allocation/server.cpp] - - -[heading Buffers] - -This example demonstrates how to create reference counted buffers that can be -used with socket read and write operations. - -* [@../../example/buffers/reference_counted.cpp] - - -[heading Chat] - -This example implements a chat server and client. The programs use a custom -protocol with a fixed length message header and variable length message body. - -* [@../../example/chat/chat_message.hpp] -* [@../../example/chat/chat_client.cpp] -* [@../../example/chat/chat_server.cpp] - - -[heading Echo] - -A collection of simple clients and servers, showing the use of both synchronous -and asynchronous operations. - -* [@../../example/echo/async_tcp_echo_server.cpp] -* [@../../example/echo/async_udp_echo_server.cpp] -* [@../../example/echo/blocking_tcp_echo_client.cpp] -* [@../../example/echo/blocking_tcp_echo_server.cpp] -* [@../../example/echo/blocking_udp_echo_client.cpp] -* [@../../example/echo/blocking_udp_echo_server.cpp] - - -[heading HTTP Client] - -Example programs implementing simple HTTP 1.0 clients. These examples show how -to use the [link boost_asio.reference.read_until] and [link -boost_asio.reference.async_read_until] functions. - -* [@../../example/http/client/sync_client.cpp] -* [@../../example/http/client/async_client.cpp] - - -[heading HTTP Server] - -This example illustrates the use of asio in a simple single-threaded server -implementation of HTTP 1.0. It demonstrates how to perform a clean shutdown by -cancelling all outstanding asynchronous operations. - -* [@../../example/http/server/connection.cpp] -* [@../../example/http/server/connection.hpp] -* [@../../example/http/server/connection_manager.cpp] -* [@../../example/http/server/connection_manager.hpp] -* [@../../example/http/server/header.hpp] -* [@../../example/http/server/mime_types.cpp] -* [@../../example/http/server/mime_types.hpp] -* [@../../example/http/server/posix_main.cpp] -* [@../../example/http/server/reply.cpp] -* [@../../example/http/server/reply.hpp] -* [@../../example/http/server/request.hpp] -* [@../../example/http/server/request_handler.cpp] -* [@../../example/http/server/request_handler.hpp] -* [@../../example/http/server/request_parser.cpp] -* [@../../example/http/server/request_parser.hpp] -* [@../../example/http/server/server.cpp] -* [@../../example/http/server/server.hpp] -* [@../../example/http/server/win_main.cpp] - - -[heading HTTP Server 2] - -An HTTP server using an io_service-per-CPU design. - -* [@../../example/http/server2/connection.cpp] -* [@../../example/http/server2/connection.hpp] -* [@../../example/http/server2/header.hpp] -* [@../../example/http/server2/io_service_pool.cpp] -* [@../../example/http/server2/io_service_pool.hpp] -* [@../../example/http/server2/mime_types.cpp] -* [@../../example/http/server2/mime_types.hpp] -* [@../../example/http/server2/posix_main.cpp] -* [@../../example/http/server2/reply.cpp] -* [@../../example/http/server2/reply.hpp] -* [@../../example/http/server2/request.hpp] -* [@../../example/http/server2/request_handler.cpp] -* [@../../example/http/server2/request_handler.hpp] -* [@../../example/http/server2/request_parser.cpp] -* [@../../example/http/server2/request_parser.hpp] -* [@../../example/http/server2/server.cpp] -* [@../../example/http/server2/server.hpp] -* [@../../example/http/server2/win_main.cpp] - - -[heading HTTP Server 3] - -An HTTP server using a single io_service and a thread pool calling `io_service::run()`. - -* [@../../example/http/server3/connection.cpp] -* [@../../example/http/server3/connection.hpp] -* [@../../example/http/server3/header.hpp] -* [@../../example/http/server3/mime_types.cpp] -* [@../../example/http/server3/mime_types.hpp] -* [@../../example/http/server3/posix_main.cpp] -* [@../../example/http/server3/reply.cpp] -* [@../../example/http/server3/reply.hpp] -* [@../../example/http/server3/request.hpp] -* [@../../example/http/server3/request_handler.cpp] -* [@../../example/http/server3/request_handler.hpp] -* [@../../example/http/server3/request_parser.cpp] -* [@../../example/http/server3/request_parser.hpp] -* [@../../example/http/server3/server.cpp] -* [@../../example/http/server3/server.hpp] -* [@../../example/http/server3/win_main.cpp] - - -[heading Invocation] - -This example shows how to customise handler invocation. Completion handlers are -added to a priority queue rather than executed immediately. - -* [@../../example/invocation/prioritised_handlers.cpp] - - -[heading Iostreams] - -Two examples showing how to use [link boost_asio.reference.ip__tcp.iostream]. - -* [@../../example/iostreams/daytime_client.cpp] -* [@../../example/iostreams/daytime_server.cpp] - - -[heading Multicast] - -An example showing the use of multicast to transmit packets to a group of -subscribers. - -* [@../../example/multicast/receiver.cpp] -* [@../../example/multicast/sender.cpp] - - -[heading Serialization] - -This example shows how Boost.Serialization can be used with asio to encode and -decode structures for transmission over a socket. - -* [@../../example/serialization/client.cpp] -* [@../../example/serialization/connection.hpp] -* [@../../example/serialization/server.cpp] -* [@../../example/serialization/stock.hpp] - - -[heading Services] - -This example demonstrates how to integrate custom functionality (in this case, -for logging) into asio's [link boost_asio.reference.io_service io_service], and -how to use a custom service with [link -boost_asio.reference.basic_stream_socket]. - -* [@../../example/services/basic_logger.hpp] -* [@../../example/services/daytime_client.cpp] -* [@../../example/services/logger.hpp] -* [@../../example/services/logger_service.cpp] -* [@../../example/services/logger_service.hpp] -* [@../../example/services/stream_socket_service.hpp] - - -[heading SOCKS 4] - -Example client program implementing the SOCKS 4 protocol for communication via -a proxy. - -* [@../../example/socks4/sync_client.cpp] -* [@../../example/socks4/socks4.hpp] - - -[heading SSL] - -Example client and server programs showing the use of the [link -boost_asio.reference.ssl__stream] template with asynchronous operations. - -* [@../../example/ssl/client.cpp] -* [@../../example/ssl/server.cpp] - - -[heading Timeouts] - -A collection of examples showing how to cancel long running asynchronous -operations after a period of time. - -* [@../../example/timeouts/accept_timeout.cpp] -* [@../../example/timeouts/connect_timeout.cpp] -* [@../../example/timeouts/datagram_receive_timeout.cpp] -* [@../../example/timeouts/stream_receive_timeout.cpp] - - -[heading Timers] - -Examples showing how to customise deadline_timer using different time types. - -* [@../../example/timers/tick_count_timer.cpp] -* [@../../example/timers/time_t_timer.cpp] - - -[endsect] diff --git a/doc/noncopyable_dox.txt b/doc/noncopyable_dox.txt deleted file mode 100644 index e6256f31..00000000 --- a/doc/noncopyable_dox.txt +++ /dev/null @@ -1,10 +0,0 @@ -// -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -/** -\class noncopyable -*/ diff --git a/doc/quickref.xml b/doc/quickref.xml deleted file mode 100644 index 6667527a..00000000 --- a/doc/quickref.xml +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - - - - Classes - - const_buffer - const_buffers_1 - deadline_timer - io_service - io_service::id - io_service::service - io_service::strand - io_service::work - ip::address - ip::address_v4 - ip::address_v6 - ip::resolver_query_base - ip::tcp - ip::tcp::acceptor - ip::tcp::endpoint - ip::tcp::iostream - ip::tcp::resolver - ip::tcp::socket - ip::udp - ip::udp::endpoint - ip::udp::resolver - ip::udp::socket - mutable_buffer - mutable_buffers_1 - socket_base - ssl::context - ssl::context_base - ssl::stream_base - streambuf - - - - Class Templates - - basic_datagram_socket - basic_deadline_timer - basic_io_object - basic_socket - basic_socket_acceptor - basic_socket_iostream - basic_socket_streambuf - basic_stream_socket - basic_streambuf - buffered_read_stream - buffered_stream - buffered_write_stream - ip::basic_endpoint - ip::basic_resolver - ip::basic_resolver_entry - ip::basic_resolver_iterator - ip::basic_resolver_query - ssl::basic_context - ssl::stream - - Services - - datagram_socket_service - deadline_timer_service - ip::resolver_service - socket_acceptor_service - ssl::context_service - ssl::stream_service - stream_socket_service - - Placeholders - - placeholders::bytes_transferred - placeholders::error - placeholders::iterator - - - - Free Functions - - add_service - asio_handler_allocate - asio_handler_deallocate - asio_handler_invoke - async_read - async_read_until - async_write - buffer - has_service - ip::host_name - read - read_until - transfer_all - transfer_at_least - use_service - write - - Error Codes - - error::basic_errors - error::netdb_errors - error::addrinfo_errors - error::misc_errors - - Type Traits - - is_read_buffered - is_write_buffered - - - - Type Requirements - - Asynchronous operations - AcceptHandler - AsyncReadStream - AsyncWriteStream - CompletionHandler - ConnectHandler - ConstBufferSequence - ConvertibleToConstBuffer - ConvertibleToMutableBuffer - DatagramSocketService - Endpoint - GettableSocketOption - Handler - InternetProtocol - IoControlCommand - IoObjectService - MutableBufferSequence - Protocol - ReadHandler - ResolveHandler - ResolverService - Service - SettableSocketOption - SocketAcceptorService - SocketService - StreamSocketService - SyncReadStream - SyncWriteStream - TimerService - TimeTraits - WaitHandler - WriteHandler - - - - - - diff --git a/doc/reference.dox b/doc/reference.dox deleted file mode 100644 index ab677d09..00000000 --- a/doc/reference.dox +++ /dev/null @@ -1,233 +0,0 @@ -# Doxyfile 1.4.5 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "Boost.Asio Reference" -PROJECT_NUMBER = -OUTPUT_DIRECTORY = . -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -USE_WINDOWS_ENCODING = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = -ALWAYS_DETAILED_SEC = YES -INLINE_INHERITED_MEMB = YES -FULL_PATH_NAMES = YES -STRIP_FROM_PATH = ./../../../ -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = YES -DETAILS_AT_TOP = YES -INHERIT_DOCS = NO -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 2 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = NO -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = YES -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = NO -EXTRACT_LOCAL_METHODS = NO -HIDE_UNDOC_MEMBERS = YES -HIDE_UNDOC_CLASSES = YES -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = NO -INLINE_INFO = NO -SORT_MEMBER_DOCS = NO -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = NO -GENERATE_TESTLIST = NO -GENERATE_BUGLIST = NO -GENERATE_DEPRECATEDLIST= NO -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = NO -SHOW_DIRECTORIES = NO -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ./../../../boost/asio.hpp \ - ./../../../boost/asio \ - ./../../../boost/asio/impl \ - ./../../../boost/asio/ip \ - ./../../../boost/asio/ssl \ - ./noncopyable_dox.txt \ - ./std_exception_dox.txt -FILE_PATTERNS = -RECURSIVE = NO -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = YES -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = NO -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = NO -REFERENCES_RELATION = NO -USE_HTAGS = NO -VERBATIM_HEADERS = NO -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = YES -COLS_IN_ALPHA_INDEX = 1 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = NO -HTML_OUTPUT = . -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = YES -ENUM_VALUES_PER_LINE = 1 -GENERATE_TREEVIEW = NO -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = YES -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = NO -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = YES -EXPAND_ONLY_PREDEF = YES -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = GENERATING_DOCUMENTATION \ - BOOST_ASIO_SOCKET_ERROR(e)=implementation_defined \ - BOOST_ASIO_NETDB_ERROR(e)=implementation_defined \ - BOOST_ASIO_EOF_ERROR(e)=implementation_defined \ - BOOST_ASIO_OS_ERROR(e1,e2)=implementation_defined -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = NO -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = YES -CLASS_GRAPH = YES -COLLABORATION_GRAPH = NO -GROUP_GRAPHS = NO -UML_LOOK = NO -TEMPLATE_RELATIONS = YES -INCLUDE_GRAPH = NO -INCLUDED_BY_GRAPH = NO -CALL_GRAPH = NO -GRAPHICAL_HIERARCHY = NO -DIRECTORY_GRAPH = NO -DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 640 -MAX_DOT_GRAPH_HEIGHT = 640 -MAX_DOT_GRAPH_DEPTH = 0 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = NO -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO diff --git a/doc/reference.qbk b/doc/reference.qbk deleted file mode 100644 index 45fe298b..00000000 --- a/doc/reference.qbk +++ /dev/null @@ -1,39165 +0,0 @@ -[/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) - / - / Distributed under the Boost Software License, Version 1.0. (See accompanying - / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - /] - -[section:reference Reference] - -[xinclude quickref.xml] - -[include requirements/asynchronous_operations.qbk] -[include requirements/AcceptHandler.qbk] -[include requirements/AsyncReadStream.qbk] -[include requirements/AsyncWriteStream.qbk] -[include requirements/CompletionHandler.qbk] -[include requirements/ConnectHandler.qbk] -[include requirements/ConstBufferSequence.qbk] -[include requirements/ConvertibleToConstBuffer.qbk] -[include requirements/ConvertibleToMutableBuffer.qbk] -[include requirements/DatagramSocketService.qbk] -[include requirements/Endpoint.qbk] -[include requirements/GettableSocketOption.qbk] -[include requirements/Handler.qbk] -[include requirements/InternetProtocol.qbk] -[include requirements/IoControlCommand.qbk] -[include requirements/IoObjectService.qbk] -[include requirements/MutableBufferSequence.qbk] -[include requirements/Protocol.qbk] -[include requirements/ReadHandler.qbk] -[include requirements/ResolveHandler.qbk] -[include requirements/ResolverService.qbk] -[include requirements/Service.qbk] -[include requirements/SettableSocketOption.qbk] -[include requirements/SocketAcceptorService.qbk] -[include requirements/SocketService.qbk] -[include requirements/StreamSocketService.qbk] -[include requirements/SyncReadStream.qbk] -[include requirements/SyncWriteStream.qbk] -[include requirements/TimeTraits.qbk] -[include requirements/TimerService.qbk] -[include requirements/WaitHandler.qbk] -[include requirements/WriteHandler.qbk] - - - -[section:add_service add_service] - - - - template< - typename ``[link boost_asio.reference.Service Service]``> - 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(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:asio_handler_allocate asio_handler_allocate] - -Default allocation function for handlers. - - void * asio_handler_allocate( - std::size_t size, - ... ); - - -Asynchronous operations may need to allocate temporary objects. Since asynchronous operations have a handler function object, these temporary objects can be said to be associated with the handler. - -Implement asio\_handler\_allocate and asio\_handler\_deallocate for your own handlers to provide custom allocation for these temporary objects. - -This default implementation is simply: - - return ::operator new(bytes); - - - - - -[heading Remarks] - -All temporary objects associated with a handler will be deallocated before the upcall to the handler is performed. This allows the same memory to be reused for a subsequent asynchronous operation initiated by the handler. - -[heading Example] - - - - class my_handler; - - void* asio_handler_allocate(std::size_t size, my_handler* context) - { - return ::operator new(size); - } - - void asio_handler_deallocate(void* pointer, std::size_t size, - my_handler* context) - { - ::operator delete(pointer); - } - - - - - - -[endsect] - - - -[section:asio_handler_deallocate asio_handler_deallocate] - -Default deallocation function for handlers. - - void asio_handler_deallocate( - void * pointer, - std::size_t size, - ... ); - - -Implement asio\_handler\_allocate and asio\_handler\_deallocate for your own handlers to provide custom allocation for the associated temporary objects. - -This default implementation is simply: - - ::operator delete(pointer); - - - - - - - -[endsect] - - - -[section:asio_handler_invoke asio_handler_invoke] - -Default invoke function for handlers. - - template< - typename Function> - void asio_handler_invoke( - Function function, - ... ); - - -Completion handlers for asynchronous operations are invoked by the io_service associated with the corresponding object (e.g. a socket or deadline\_timer). Certain guarantees are made on when the handler may be invoked, in particular that a handler can only be invoked from a thread that is currently calling boost::asio::io\_service::run() on the corresponding io_service object. Handlers may subsequently be invoked through other objects (such as boost::asio::strand objects) that provide additional guarantees. - -When asynchronous operations are composed from other asynchronous operations, all intermediate handlers should be invoked using the same method as the final handler. This is required to ensure that user-defined objects are not accessed in a way that may violate the guarantees. This hooking function ensures that the invoked method used for the final handler is accessible at each intermediate step. - -Implement asio\_handler\_invoke for your own handlers to specify a custom invocation strategy. - -This default implementation is simply: - - function(); - - - - - -[heading Example] - - - - class my_handler; - - template - void asio_handler_invoke(Function function, my_handler* context) - { - context->strand_.dispatch(function); - } - - - - - - -[endsect] - - -[section:async_read async_read] - -Start an asynchronous operation to read a certain amount of data from a stream. - - template< - typename ``[link boost_asio.reference.AsyncReadStream AsyncReadStream]``, - typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``, - typename ``[link boost_asio.reference.ReadHandler ReadHandler]``> - void ``[link boost_asio.reference.async_read.overload1 async_read]``( - AsyncReadStream & s, - const MutableBufferSequence & buffers, - ReadHandler handler); - - template< - typename ``[link boost_asio.reference.AsyncReadStream AsyncReadStream]``, - typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``, - typename CompletionCondition, - typename ``[link boost_asio.reference.ReadHandler ReadHandler]``> - void ``[link boost_asio.reference.async_read.overload2 async_read]``( - AsyncReadStream & s, - const MutableBufferSequence & buffers, - CompletionCondition completion_condition, - ReadHandler handler); - - template< - typename ``[link boost_asio.reference.AsyncReadStream AsyncReadStream]``, - typename Allocator, - typename ``[link boost_asio.reference.ReadHandler ReadHandler]``> - void ``[link boost_asio.reference.async_read.overload3 async_read]``( - AsyncReadStream & s, - basic_streambuf< Allocator > & b, - ReadHandler handler); - - template< - typename ``[link boost_asio.reference.AsyncReadStream AsyncReadStream]``, - typename Allocator, - typename CompletionCondition, - typename ``[link boost_asio.reference.ReadHandler ReadHandler]``> - void ``[link boost_asio.reference.async_read.overload4 async_read]``( - AsyncReadStream & s, - basic_streambuf< Allocator > & b, - CompletionCondition completion_condition, - ReadHandler handler); - - -[section:overload1 async_read (1 of 4 overloads)] - -Start an asynchronous operation to read a certain amount of data from a stream. - - template< - typename ``[link boost_asio.reference.AsyncReadStream AsyncReadStream]``, - typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``, - typename ``[link boost_asio.reference.ReadHandler ReadHandler]``> - void async_read( - AsyncReadStream & s, - const MutableBufferSequence & buffers, - ReadHandler handler); - - -This function is used to asynchronously read a certain number of bytes of data from a stream. 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 stream's async\_read\_some function. - - -[heading Parameters] - - -[variablelist - -[[s][The stream from which the data is to be read. The type must support the AsyncReadStream 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. 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 copied into the - // buffers. If an error occurred, - // this will be the number of - // bytes successfully transferred - // prior to the error. - ); - -`` -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(s, 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( - s, buffers, - boost::asio::transfer_all(), - handler); - - - - - - -[endsect] - - - -[section:overload2 async_read (2 of 4 overloads)] - -Start an asynchronous operation to read a certain amount of data from a stream. - - template< - typename ``[link boost_asio.reference.AsyncReadStream AsyncReadStream]``, - typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``, - typename CompletionCondition, - typename ``[link boost_asio.reference.ReadHandler ReadHandler]``> - void async_read( - AsyncReadStream & s, - const MutableBufferSequence & buffers, - CompletionCondition completion_condition, - ReadHandler handler); - - -This function is used to asynchronously read a certain number of bytes of data from a stream. 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 - -[[s][The stream from which the data is to be read. The type must support the AsyncReadStream 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. 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( - 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 async\_read\_some 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( - const boost::system::error_code& error, // Result of operation. - - std::size_t bytes_transferred // Number of bytes copied into the - // buffers. If an error occurred, - // this will be the number of - // bytes successfully transferred - // prior to the error. - ); - -`` -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(s, - 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 (3 of 4 overloads)] - -Start an asynchronous operation to read a certain amount of data from a stream. - - template< - typename ``[link boost_asio.reference.AsyncReadStream AsyncReadStream]``, - typename Allocator, - typename ``[link boost_asio.reference.ReadHandler ReadHandler]``> - void async_read( - AsyncReadStream & s, - basic_streambuf< Allocator > & b, - ReadHandler handler); - - -This function is used to asynchronously read a certain number of bytes of data from a stream. 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 stream's async\_read\_some function. - - -[heading Parameters] - - -[variablelist - -[[s][The stream from which the data is to be read. The type must support the AsyncReadStream concept.]] - -[[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( - const boost::system::error_code& error, // Result of operation. - - std::size_t bytes_transferred // Number of bytes copied into the - // buffers. If an error occurred, - // this will be the number of - // bytes successfully transferred - // prior to the error. - ); - -`` -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( - s, b, - boost::asio::transfer_all(), - handler); - - - - - - -[endsect] - - - -[section:overload4 async_read (4 of 4 overloads)] - -Start an asynchronous operation to read a certain amount of data from a stream. - - template< - typename ``[link boost_asio.reference.AsyncReadStream AsyncReadStream]``, - typename Allocator, - typename CompletionCondition, - typename ``[link boost_asio.reference.ReadHandler ReadHandler]``> - void async_read( - AsyncReadStream & s, - 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 stream. 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 stream's async\_read\_some function. - - -[heading Parameters] - - -[variablelist - -[[s][The stream from which the data is to be read. The type must support the AsyncReadStream concept.]] - -[[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( - 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 async\_read\_some 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( - const boost::system::error_code& error, // Result of operation. - - std::size_t bytes_transferred // Number of bytes copied into the - // buffers. If an error occurred, - // this will be the number of - // bytes successfully transferred - // prior to the error. - ); - -`` -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. - - template< - typename ``[link boost_asio.reference.AsyncReadStream AsyncReadStream]``, - typename Allocator, - typename ``[link boost_asio.reference.ReadHandler ReadHandler]``> - void ``[link boost_asio.reference.async_read_until.overload1 async_read_until]``( - AsyncReadStream & s, - boost::asio::basic_streambuf< Allocator > & b, - char delim, - ReadHandler handler); - - template< - typename ``[link boost_asio.reference.AsyncReadStream AsyncReadStream]``, - typename Allocator, - typename ``[link boost_asio.reference.ReadHandler ReadHandler]``> - void ``[link boost_asio.reference.async_read_until.overload2 async_read_until]``( - AsyncReadStream & s, - boost::asio::basic_streambuf< Allocator > & b, - const std::string & delim, - ReadHandler handler); - - template< - typename ``[link boost_asio.reference.AsyncReadStream AsyncReadStream]``, - typename Allocator, - typename ``[link boost_asio.reference.ReadHandler ReadHandler]``> - void ``[link boost_asio.reference.async_read_until.overload3 async_read_until]``( - AsyncReadStream & s, - boost::asio::basic_streambuf< Allocator > & b, - const boost::regex & expr, - ReadHandler handler); - - -[section:overload1 async_read_until (1 of 3 overloads)] - -Start an asynchronous operation to read data into a streambuf until a delimiter is encountered. - - template< - typename ``[link boost_asio.reference.AsyncReadStream AsyncReadStream]``, - typename Allocator, - typename ``[link boost_asio.reference.ReadHandler ReadHandler]``> - void async_read_until( - AsyncReadStream & s, - boost::asio::basic_streambuf< Allocator > & b, - char delim, - ReadHandler handler); - - -This function is used to asynchronously read data into the specified streambuf until the streambuf's get area contains the specified delimiter. The function call always returns immediately. The asynchronous operation will continue 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 async\_read\_some function. If the streambuf's get area already contains the delimiter, the asynchronous 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. Ownership of the streambuf is retained by the caller, which must guarantee that it remains valid until the handler is called.]] - -[[delim][The delimiter character.]] - -[[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 // The number of bytes in the - // streambuf's get area up to - // and including the delimiter. - // 0 if an error occurred. - ); - -`` -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 asynchronously read data into a streambuf until a newline is encountered: - - boost::asio::streambuf b; - ... - void handler(const boost::system::error_code& e, std::size_t size) - { - if (!e) - { - std::istream is(&b); - std::string line; - std::getline(is, line); - ... - } - } - ... - boost::asio::async_read_until(s, b, '\n', handler); - - - - - - -[endsect] - - - -[section:overload2 async_read_until (2 of 3 overloads)] - -Start an asynchronous operation to read data into a streambuf until a delimiter is encountered. - - template< - typename ``[link boost_asio.reference.AsyncReadStream AsyncReadStream]``, - typename Allocator, - typename ``[link boost_asio.reference.ReadHandler ReadHandler]``> - void async_read_until( - AsyncReadStream & s, - boost::asio::basic_streambuf< Allocator > & b, - const std::string & delim, - ReadHandler handler); - - -This function is used to asynchronously read data into the specified streambuf until the streambuf's get area contains the specified delimiter. The function call always returns immediately. The asynchronous operation will continue 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 async\_read\_some function. If the streambuf's get area already contains the delimiter, the asynchronous 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. Ownership of the streambuf is retained by the caller, which must guarantee that it remains valid until the handler is called.]] - -[[delim][The delimiter string.]] - -[[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 // The number of bytes in the - // streambuf's get area up to - // and including the delimiter. - // 0 if an error occurred. - ); - -`` -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 asynchronously read data into a streambuf until a newline is encountered: - - boost::asio::streambuf b; - ... - void handler(const boost::system::error_code& e, std::size_t size) - { - if (!e) - { - std::istream is(&b); - std::string line; - std::getline(is, line); - ... - } - } - ... - boost::asio::async_read_until(s, b, "\r\n", handler); - - - - - - -[endsect] - - - -[section:overload3 async_read_until (3 of 3 overloads)] - -Start an asynchronous operation to read data into a streambuf until a regular expression is located. - - template< - typename ``[link boost_asio.reference.AsyncReadStream AsyncReadStream]``, - typename Allocator, - typename ``[link boost_asio.reference.ReadHandler ReadHandler]``> - void async_read_until( - AsyncReadStream & s, - boost::asio::basic_streambuf< Allocator > & b, - const boost::regex & expr, - ReadHandler handler); - - -This function is used to asynchronously read data into the specified streambuf until the streambuf's get area contains some data that matches a regular expression. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true: - - -* 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 async\_read\_some function. If the streambuf's get area already contains data that matches the regular expression, the function returns 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. Ownership of the streambuf is retained by the caller, which must guarantee that it remains valid until the handler is called.]] - -[[expr][The regular expression.]] - -[[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 // The number of bytes in the - // streambuf's get area up to - // and including the substring - // that matches the regular. - // expression. 0 if an error - // occurred. - ); - -`` -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 asynchronously read data into a streambuf until a CR-LF sequence is encountered: - - boost::asio::streambuf b; - ... - void handler(const boost::system::error_code& e, std::size_t size) - { - if (!e) - { - std::istream is(&b); - std::string line; - std::getline(is, line); - ... - } - } - ... - boost::asio::async_read_until(s, b, boost::regex("\r\n"), handler); - - - - - - -[endsect] - - -[endsect] - -[section:async_write async_write] - -Start an asynchronous operation to write of all of the supplied data to a stream. - - template< - typename ``[link boost_asio.reference.AsyncWriteStream AsyncWriteStream]``, - typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``, - typename ``[link boost_asio.reference.WriteHandler WriteHandler]``> - void ``[link boost_asio.reference.async_write.overload1 async_write]``( - AsyncWriteStream & s, - const ConstBufferSequence & buffers, - WriteHandler handler); - - template< - typename ``[link boost_asio.reference.AsyncWriteStream AsyncWriteStream]``, - typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``, - typename CompletionCondition, - typename ``[link boost_asio.reference.WriteHandler WriteHandler]``> - void ``[link boost_asio.reference.async_write.overload2 async_write]``( - AsyncWriteStream & s, - const ConstBufferSequence & buffers, - CompletionCondition completion_condition, - WriteHandler handler); - - template< - typename ``[link boost_asio.reference.AsyncWriteStream AsyncWriteStream]``, - typename Allocator, - typename ``[link boost_asio.reference.WriteHandler WriteHandler]``> - void ``[link boost_asio.reference.async_write.overload3 async_write]``( - AsyncWriteStream & s, - basic_streambuf< Allocator > & b, - WriteHandler handler); - - template< - typename ``[link boost_asio.reference.AsyncWriteStream AsyncWriteStream]``, - typename Allocator, - typename CompletionCondition, - typename ``[link boost_asio.reference.WriteHandler WriteHandler]``> - void ``[link boost_asio.reference.async_write.overload4 async_write]``( - AsyncWriteStream & s, - basic_streambuf< Allocator > & b, - CompletionCondition completion_condition, - WriteHandler handler); - - -[section:overload1 async_write (1 of 4 overloads)] - -Start an asynchronous operation to write of all of the supplied data to a stream. - - template< - typename ``[link boost_asio.reference.AsyncWriteStream AsyncWriteStream]``, - typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``, - typename ``[link boost_asio.reference.WriteHandler WriteHandler]``> - void async_write( - AsyncWriteStream & s, - const ConstBufferSequence & buffers, - WriteHandler handler); - - -This function is used to asynchronously write a certain number of bytes of data to a stream. 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 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 stream's async\_write\_some function. - - -[heading Parameters] - - -[variablelist - -[[s][The stream to which the data is to be written. The type must support the AsyncWriteStream concept.]] - -[[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( - const boost::system::error_code& error, // Result of operation. - - std::size_t bytes_transferred // Number of bytes written from the - // buffers. If an error occurred, - // this will be less than the sum - // of the buffer sizes. - ); - -`` -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(s, 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:overload2 async_write (2 of 4 overloads)] - -Start an asynchronous operation to write a certain amount of data to a stream. - - template< - typename ``[link boost_asio.reference.AsyncWriteStream AsyncWriteStream]``, - typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``, - typename CompletionCondition, - typename ``[link boost_asio.reference.WriteHandler WriteHandler]``> - void async_write( - AsyncWriteStream & s, - const ConstBufferSequence & buffers, - CompletionCondition completion_condition, - WriteHandler handler); - - -This function is used to asynchronously write a certain number of bytes of data to a stream. 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 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 stream's async\_write\_some function. - - -[heading Parameters] - - -[variablelist - -[[s][The stream to which the data is to be written. The type must support the AsyncWriteStream concept.]] - -[[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( - const boost::system::error_code& error, // Result of latest write_some - // operation. - - std::size_t bytes_transferred // Number of bytes transferred - // so far. - ); - -`` -A return value of true indicates that the write operation is complete. False indicates that further calls to the stream's async\_write\_some 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( - const boost::system::error_code& error, // Result of operation. - - std::size_t bytes_transferred // Number of bytes written from the - // buffers. If an error occurred, - // this will be less than the sum - // of the buffer sizes. - ); - -`` -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(s, - 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 (3 of 4 overloads)] - -Start an asynchronous operation to write a certain amount of data to a stream. - - template< - typename ``[link boost_asio.reference.AsyncWriteStream AsyncWriteStream]``, - typename Allocator, - typename ``[link boost_asio.reference.WriteHandler WriteHandler]``> - void async_write( - AsyncWriteStream & s, - basic_streambuf< Allocator > & b, - WriteHandler handler); - - -This function is used to asynchronously write a certain number of bytes of data to a stream. 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 stream's async\_write\_some function. - - -[heading Parameters] - - -[variablelist - -[[s][The stream to which the data is to be written. The type must support the AsyncWriteStream concept.]] - -[[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( - const boost::system::error_code& error, // Result of operation. - - std::size_t bytes_transferred // Number of bytes written from the - // buffers. If an error occurred, - // this will be less than the sum - // of the buffer sizes. - ); - -`` -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 (4 of 4 overloads)] - -Start an asynchronous operation to write a certain amount of data to a stream. - - template< - typename ``[link boost_asio.reference.AsyncWriteStream AsyncWriteStream]``, - typename Allocator, - typename CompletionCondition, - typename ``[link boost_asio.reference.WriteHandler WriteHandler]``> - void async_write( - AsyncWriteStream & s, - 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 stream. 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 stream's async\_write\_some function. - - -[heading Parameters] - - -[variablelist - -[[s][The stream to which the data is to be written. The type must support the AsyncWriteStream concept.]] - -[[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( - const boost::system::error_code& error, // Result of latest write_some - // operation. - - std::size_t bytes_transferred // Number of bytes transferred - // so far. - ); - -`` -A return value of true indicates that the write operation is complete. False indicates that further calls to the stream's async\_write\_some 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( - const boost::system::error_code& error, // Result of operation. - - std::size_t bytes_transferred // Number of bytes written from the - // buffers. If an error occurred, - // this will be less than the sum - // of the buffer sizes. - ); - -`` -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> - 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. ] - - ] - - [ - - [[link boost_asio.reference.basic_datagram_socket.shutdown_type [*shutdown_type]]] - [Different ways a socket may be shutdown. ] - - ] - -] - -[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]] - - [ - [[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. ] - ] - - [ - [[link boost_asio.reference.basic_datagram_socket.message_peek [*message_peek]]] - [Peek at incoming data without removing it from the input queue. ] - ] - -] - -The basic_datagram_socket class template provides asynchronous and blocking datagram-oriented socket functionality. - - -[heading Thread Safety] - -[*Distinct] [*objects:] Safe. - -[*Shared] [*objects:] Unsafe. - - -[section:assign basic_datagram_socket::assign] - -Assign an existing native socket to the socket. - - void ``[link boost_asio.reference.basic_datagram_socket.assign.overload1 assign]``( - const protocol_type & protocol, - const native_type & native_socket); - - boost::system::error_code ``[link boost_asio.reference.basic_datagram_socket.assign.overload2 assign]``( - const protocol_type & protocol, - const native_type & native_socket, - boost::system::error_code & ec); - - -[section:overload1 basic_datagram_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_datagram_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_datagram_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_receive basic_datagram_socket::async_receive] - -Start an asynchronous receive on a connected socket. - - template< - typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``, - typename ``[link boost_asio.reference.ReadHandler ReadHandler]``> - void ``[link boost_asio.reference.basic_datagram_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_datagram_socket.async_receive.overload2 async_receive]``( - const MutableBufferSequence & buffers, - socket_base::message_flags flags, - ReadHandler handler); - - -[section:overload1 basic_datagram_socket::async_receive (1 of 2 overloads)] - -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 asynchronously receive data from the datagram 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 async\_receive operation can only be used with a connected socket. Use the async\_receive\_from function to receive data on an unconnected datagram 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_datagram_socket::async_receive (2 of 2 overloads)] - -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, - socket_base::message_flags flags, - ReadHandler handler); - - -This function is used to asynchronously receive data from the datagram 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 async\_receive operation can only be used with a connected socket. Use the async\_receive\_from function to receive data on an unconnected datagram socket. - - - -[endsect] - - -[endsect] - -[section:async_receive_from basic_datagram_socket::async_receive_from] - -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_datagram_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_datagram_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_datagram_socket::async_receive_from (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_from( - const MutableBufferSequence & buffers, - endpoint_type & sender_endpoint, - ReadHandler handler); - - -This function is used to asynchronously receive a datagram. 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.]] - -[[sender_endpoint][An endpoint object that receives the endpoint of the remote sender of the datagram. 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_datagram_socket::async_receive_from (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_from( - const MutableBufferSequence & buffers, - endpoint_type & sender_endpoint, - socket_base::message_flags flags, - ReadHandler handler); - - -This function is used to asynchronously receive a datagram. 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.]] - -[[sender_endpoint][An endpoint object that receives the endpoint of the remote sender of the datagram. Ownership of the sender\_endpoint object is retained by the caller, which must guarantee that it is 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(). ]] - -] - - - -[endsect] - - -[endsect] - -[section:async_send basic_datagram_socket::async_send] - -Start an asynchronous send on a connected socket. - - template< - typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``, - typename ``[link boost_asio.reference.WriteHandler WriteHandler]``> - void ``[link boost_asio.reference.basic_datagram_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_datagram_socket.async_send.overload2 async_send]``( - const ConstBufferSequence & buffers, - socket_base::message_flags flags, - WriteHandler handler); - - -[section:overload1 basic_datagram_socket::async_send (1 of 2 overloads)] - -Start an asynchronous send on a connected socket. - - 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 send data on the datagram socket. The function call will block until the data has been sent successfully or an error occurs. - - -[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 async\_send operation can only be used with a connected socket. Use the async\_send\_to function to send data on an unconnected datagram 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_datagram_socket::async_send (2 of 2 overloads)] - -Start an asynchronous send on a connected socket. - - 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 send data on the datagram socket. The function call will block until the data has been sent successfully or an error occurs. - - -[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 async\_send operation can only be used with a connected socket. Use the async\_send\_to function to send data on an unconnected datagram socket. - - - -[endsect] - - -[endsect] - -[section:async_send_to basic_datagram_socket::async_send_to] - -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_datagram_socket.async_send_to.overload1 async_send_to]``( - const ConstBufferSequence & buffers, - const endpoint_type & destination, - WriteHandler handler); - - template< - typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``, - typename ``[link boost_asio.reference.WriteHandler WriteHandler]``> - void ``[link boost_asio.reference.basic_datagram_socket.async_send_to.overload2 async_send_to]``( - const ConstBufferSequence & buffers, - const endpoint_type & destination, - socket_base::message_flags flags, - WriteHandler handler); - - -[section:overload1 basic_datagram_socket::async_send_to (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_to( - const ConstBufferSequence & buffers, - const endpoint_type & destination, - WriteHandler handler); - - -This function is used to asynchronously send a datagram to the specified remote endpoint. The function call always returns immediately. - - -[heading Parameters] - - -[variablelist - -[[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.]] - -[[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. - ); - -`` -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 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. - - - -[endsect] - - - -[section:overload2 basic_datagram_socket::async_send_to (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_to( - const ConstBufferSequence & buffers, - const endpoint_type & destination, - socket_base::message_flags flags, - WriteHandler handler); - - -This function is used to asynchronously send a datagram to the specified remote endpoint. The function call always returns immediately. - - -[heading Parameters] - - -[variablelist - -[[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.]] - -[[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.]] - -[[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(). ]] - -] - - - -[endsect] - - -[endsect] - -[section:at_mark basic_datagram_socket::at_mark] - -Determine whether the socket is at the out-of-band data mark. - - bool ``[link boost_asio.reference.basic_datagram_socket.at_mark.overload1 at_mark]``() const; - - bool ``[link boost_asio.reference.basic_datagram_socket.at_mark.overload2 at_mark]``( - boost::system::error_code & ec) const; - - -[section:overload1 basic_datagram_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_datagram_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_datagram_socket::available] - -Determine the number of bytes available for reading. - - std::size_t ``[link boost_asio.reference.basic_datagram_socket.available.overload1 available]``() const; - - std::size_t ``[link boost_asio.reference.basic_datagram_socket.available.overload2 available]``( - boost::system::error_code & ec) const; - - -[section:overload1 basic_datagram_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_datagram_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_datagram_socket basic_datagram_socket::basic_datagram_socket] - -Construct a basic_datagram_socket without opening it. - - ``[link boost_asio.reference.basic_datagram_socket.basic_datagram_socket.overload1 basic_datagram_socket]``( - boost::asio::io_service & io_service); - - ``[link boost_asio.reference.basic_datagram_socket.basic_datagram_socket.overload2 basic_datagram_socket]``( - boost::asio::io_service & io_service, - const protocol_type & protocol); - - ``[link boost_asio.reference.basic_datagram_socket.basic_datagram_socket.overload3 basic_datagram_socket]``( - boost::asio::io_service & io_service, - const endpoint_type & endpoint); - - ``[link boost_asio.reference.basic_datagram_socket.basic_datagram_socket.overload4 basic_datagram_socket]``( - boost::asio::io_service & io_service, - const protocol_type & protocol, - const native_type & native_socket); - - -[section:overload1 basic_datagram_socket::basic_datagram_socket (1 of 4 overloads)] - -Construct a basic_datagram_socket without opening it. - - basic_datagram_socket( - boost::asio::io_service & io_service); - - -This constructor creates a datagram 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 datagram socket will use to dispatch handlers for any asynchronous operations performed on the socket. ]] - -] - - - -[endsect] - - - -[section:overload2 basic_datagram_socket::basic_datagram_socket (2 of 4 overloads)] - -Construct and open a basic_datagram_socket. - - basic_datagram_socket( - boost::asio::io_service & io_service, - const protocol_type & protocol); - - -This constructor creates and opens a datagram socket. - - -[heading Parameters] - - -[variablelist - -[[io_service][The io\_service object that the datagram 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_datagram_socket::basic_datagram_socket (3 of 4 overloads)] - -Construct a basic_datagram_socket, opening it and binding it to the given local endpoint. - - basic_datagram_socket( - boost::asio::io_service & io_service, - const endpoint_type & endpoint); - - -This constructor creates a datagram 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 datagram socket will use to dispatch handlers for any asynchronous operations performed on the socket.]] - -[[endpoint][An endpoint on the local machine to which the datagram socket will be bound.]] - -] - -[heading Exceptions] - - -[variablelist - -[[boost::system::system_error][Thrown on failure. ]] - -] - - - -[endsect] - - - -[section:overload4 basic_datagram_socket::basic_datagram_socket (4 of 4 overloads)] - -Construct a basic_datagram_socket on an existing native socket. - - basic_datagram_socket( - boost::asio::io_service & io_service, - const protocol_type & protocol, - const native_type & native_socket); - - -This constructor creates a datagram socket object to hold an existing native socket. - - -[heading Parameters] - - -[variablelist - -[[io_service][The io\_service object that the datagram 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_datagram_socket::bind] - -Bind the socket to the given local endpoint. - - void ``[link boost_asio.reference.basic_datagram_socket.bind.overload1 bind]``( - const endpoint_type & endpoint); - - boost::system::error_code ``[link boost_asio.reference.basic_datagram_socket.bind.overload2 bind]``( - const endpoint_type & endpoint, - boost::system::error_code & ec); - - -[section:overload1 basic_datagram_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_datagram_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_datagram_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_datagram_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_datagram_socket::cancel] - -Cancel all asynchronous operations associated with the socket. - - void ``[link boost_asio.reference.basic_datagram_socket.cancel.overload1 cancel]``(); - - boost::system::error_code ``[link boost_asio.reference.basic_datagram_socket.cancel.overload2 cancel]``( - boost::system::error_code & ec); - - -[section:overload1 basic_datagram_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. ]] - -] - - - -[endsect] - - - -[section:overload2 basic_datagram_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. ]] - -] - - - -[endsect] - - -[endsect] - -[section:close basic_datagram_socket::close] - -Close the socket. - - void ``[link boost_asio.reference.basic_datagram_socket.close.overload1 close]``(); - - boost::system::error_code ``[link boost_asio.reference.basic_datagram_socket.close.overload2 close]``( - boost::system::error_code & ec); - - -[section:overload1 basic_datagram_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_datagram_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_datagram_socket::connect] - -Connect the socket to the specified endpoint. - - void ``[link boost_asio.reference.basic_datagram_socket.connect.overload1 connect]``( - const endpoint_type & peer_endpoint); - - boost::system::error_code ``[link boost_asio.reference.basic_datagram_socket.connect.overload2 connect]``( - const endpoint_type & peer_endpoint, - boost::system::error_code & ec); - - -[section:overload1 basic_datagram_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_datagram_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_datagram_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_datagram_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_datagram_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_datagram_socket::endpoint_type] - -The endpoint type. - - typedef Protocol::endpoint endpoint_type; - - - - -[endsect] - - - -[section:get_io_service basic_datagram_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_datagram_socket::get_option] - -Get an option from the socket. - - void ``[link boost_asio.reference.basic_datagram_socket.get_option.overload1 get_option]``( - GettableSocketOption & option) const; - - boost::system::error_code ``[link boost_asio.reference.basic_datagram_socket.get_option.overload2 get_option]``( - GettableSocketOption & option, - boost::system::error_code & ec) const; - - -[section:overload1 basic_datagram_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_datagram_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_type basic_datagram_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_datagram_socket::io_control] - -Perform an IO control command on the socket. - - void ``[link boost_asio.reference.basic_datagram_socket.io_control.overload1 io_control]``( - IoControlCommand & command); - - boost::system::error_code ``[link boost_asio.reference.basic_datagram_socket.io_control.overload2 io_control]``( - IoControlCommand & command, - boost::system::error_code & ec); - - -[section:overload1 basic_datagram_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_datagram_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_datagram_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_datagram_socket::is_open] - - -['Inherited from basic_socket.] - -Determine whether the socket is open. - - bool is_open() const; - - - -[endsect] - - - -[section:keep_alive basic_datagram_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_datagram_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_datagram_socket::local_endpoint] - -Get the local endpoint of the socket. - - endpoint_type ``[link boost_asio.reference.basic_datagram_socket.local_endpoint.overload1 local_endpoint]``() const; - - endpoint_type ``[link boost_asio.reference.basic_datagram_socket.local_endpoint.overload2 local_endpoint]``( - boost::system::error_code & ec) const; - - -[section:overload1 basic_datagram_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_datagram_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_datagram_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_datagram_socket::lowest_layer_type] - - -['Inherited from basic_socket.] - -A basic_socket is always the lowest layer. - - typedef basic_socket< Protocol, DatagramSocketService > 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 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. ] - ] - -] - -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_datagram_socket::max_connections] - - -['Inherited from socket_base.] - -The maximum length of the queue of pending incoming connections. - - static const int max_connections; - - - -[endsect] - - - -[section:message_do_not_route basic_datagram_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; - - - -[endsect] - - - -[section:message_flags basic_datagram_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_datagram_socket::message_out_of_band] - - -['Inherited from socket_base.] - -Process out-of-band data. - - static const int message_out_of_band; - - - -[endsect] - - - -[section:message_peek basic_datagram_socket::message_peek] - - -['Inherited from socket_base.] - -Peek at incoming data without removing it from the input queue. - - static const int message_peek; - - - -[endsect] - - - -[section:native basic_datagram_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_datagram_socket::native_type] - -The native representation of a socket. - - typedef DatagramSocketService::native_type native_type; - - - - -[endsect] - - - -[section:non_blocking_io basic_datagram_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_datagram_socket::open] - -Open the socket using the specified protocol. - - void ``[link boost_asio.reference.basic_datagram_socket.open.overload1 open]``( - const protocol_type & protocol = protocol_type()); - - boost::system::error_code ``[link boost_asio.reference.basic_datagram_socket.open.overload2 open]``( - const protocol_type & protocol, - boost::system::error_code & ec); - - -[section:overload1 basic_datagram_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_datagram_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_datagram_socket::protocol_type] - -The protocol type. - - typedef Protocol protocol_type; - - - - -[endsect] - - -[section:receive basic_datagram_socket::receive] - -Receive some data on a connected socket. - - template< - typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``> - std::size_t ``[link boost_asio.reference.basic_datagram_socket.receive.overload1 receive]``( - const MutableBufferSequence & buffers); - - template< - typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``> - std::size_t ``[link boost_asio.reference.basic_datagram_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_datagram_socket.receive.overload3 receive]``( - const MutableBufferSequence & buffers, - socket_base::message_flags flags, - boost::system::error_code & ec); - - -[section:overload1 basic_datagram_socket::receive (1 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); - - -This function is used to receive data on the datagram 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.]] - -] - -[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 datagram 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. - - - -[endsect] - - - -[section:overload2 basic_datagram_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 datagram 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 datagram socket. - - - -[endsect] - - - -[section:overload3 basic_datagram_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 datagram 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 datagram socket. - - - -[endsect] - - -[endsect] - - -[section:receive_buffer_size basic_datagram_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_from basic_datagram_socket::receive_from] - -Receive a datagram with the endpoint of the sender. - - template< - typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``> - std::size_t ``[link boost_asio.reference.basic_datagram_socket.receive_from.overload1 receive_from]``( - const MutableBufferSequence & buffers, - endpoint_type & sender_endpoint); - - template< - typename ``[link boost_asio.reference.MutableBufferSequence MutableBufferSequence]``> - std::size_t ``[link boost_asio.reference.basic_datagram_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_datagram_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_datagram_socket::receive_from (1 of 3 overloads)] - -Receive a datagram with the endpoint of the sender. - - 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 receive a datagram. 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 datagram.]] - -] - -[heading Return Value] - -The number of bytes received. - -[heading Exceptions] - - -[variablelist - -[[boost::system::system_error][Thrown on failure.]] - -] - -[heading Example] - -To receive into a single data buffer use the -[link boost_asio.reference.buffer buffer] function as follows: - - 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. - - - -[endsect] - - - -[section:overload2 basic_datagram_socket::receive_from (2 of 3 overloads)] - -Receive a datagram with the endpoint of the sender. - - 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 receive a datagram. 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 datagram.]] - -[[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. ]] - -] - - - -[endsect] - - - -[section:overload3 basic_datagram_socket::receive_from (3 of 3 overloads)] - -Receive a datagram with the endpoint of the sender. - - 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 a datagram. 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 datagram.]] - -[[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. - - - -[endsect] - - -[endsect] - - -[section:receive_low_watermark basic_datagram_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_datagram_socket::remote_endpoint] - -Get the remote endpoint of the socket. - - endpoint_type ``[link boost_asio.reference.basic_datagram_socket.remote_endpoint.overload1 remote_endpoint]``() const; - - endpoint_type ``[link boost_asio.reference.basic_datagram_socket.remote_endpoint.overload2 remote_endpoint]``( - boost::system::error_code & ec) const; - - -[section:overload1 basic_datagram_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_datagram_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_datagram_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_datagram_socket::send] - -Send some data on a connected socket. - - template< - typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``> - std::size_t ``[link boost_asio.reference.basic_datagram_socket.send.overload1 send]``( - const ConstBufferSequence & buffers); - - template< - typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``> - std::size_t ``[link boost_asio.reference.basic_datagram_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_datagram_socket.send.overload3 send]``( - const ConstBufferSequence & buffers, - socket_base::message_flags flags, - boost::system::error_code & ec); - - -[section:overload1 basic_datagram_socket::send (1 of 3 overloads)] - -Send some data on a connected 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 datagram socket. The function call will block until the data has been sent successfully or an error occurs. - - -[heading Parameters] - - -[variablelist - -[[buffers][One ore 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 can only be used with a connected socket. Use the send\_to function to send data on an unconnected datagram socket. - -[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_datagram_socket::send (2 of 3 overloads)] - -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); - - -This function is used to send data on the datagram socket. The function call will block until the data has been sent successfully or an error occurs. - - -[heading Parameters] - - -[variablelist - -[[buffers][One ore 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 can only be used with a connected socket. Use the send\_to function to send data on an unconnected datagram socket. - - - -[endsect] - - - -[section:overload3 basic_datagram_socket::send (3 of 3 overloads)] - -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); - - -This function is used to send data on the datagram socket. The function call will block until the data has been sent successfully or an 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. - -[heading Remarks] - -The send operation can only be used with a connected socket. Use the send\_to function to send data on an unconnected datagram socket. - - - -[endsect] - - -[endsect] - - -[section:send_buffer_size basic_datagram_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_datagram_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:send_to basic_datagram_socket::send_to] - -Send a datagram to the specified endpoint. - - template< - typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``> - std::size_t ``[link boost_asio.reference.basic_datagram_socket.send_to.overload1 send_to]``( - const ConstBufferSequence & buffers, - const endpoint_type & destination); - - template< - typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``> - std::size_t ``[link boost_asio.reference.basic_datagram_socket.send_to.overload2 send_to]``( - const ConstBufferSequence & buffers, - const endpoint_type & destination, - socket_base::message_flags flags); - - template< - typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``> - std::size_t ``[link boost_asio.reference.basic_datagram_socket.send_to.overload3 send_to]``( - const ConstBufferSequence & buffers, - const endpoint_type & destination, - socket_base::message_flags flags, - boost::system::error_code & ec); - - -[section:overload1 basic_datagram_socket::send_to (1 of 3 overloads)] - -Send a datagram to the specified endpoint. - - template< - typename ``[link boost_asio.reference.ConstBufferSequence ConstBufferSequence]``> - std::size_t send_to( - const ConstBufferSequence & buffers, - const endpoint_type & destination); - - -This function is used to send a datagram to the specified remote endpoint. The function call will block until the data has been sent successfully or an error occurs. - - -[heading Parameters] - - -[variablelist - -[[buffers][One or more data buffers to be sent to the remote endpoint.]] - -[[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.]] - -] - -[heading Example] - -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.send_to(boost::asio::buffer(data, size), destination); - - -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_datagram_socket::send_to (2 of 3 overloads)] - -Send a datagram to the specified endpoint. - - template< - 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 send a datagram to the specified remote endpoint. The function call will block until the data has been sent successfully or an error occurs. - - -[heading Parameters] - - -[variablelist - -[[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. ]] - -] - - - -[endsect] - - - -[section:overload3 basic_datagram_socket::send_to (3 of 3 overloads)] - -Send a datagram to the specified endpoint. - - template< - 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 send a datagram to the specified remote endpoint. The function call will block until the data has been sent successfully or an error occurs. - - -[heading Parameters] - - -[variablelist - -[[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 Return Value] - -The number of bytes sent. - - - -[endsect] - - -[endsect] - - -[section:service_type basic_datagram_socket::service_type] - - -['Inherited from basic_io_object.] - -The type of the service that will be used to provide I/O operations. - - typedef DatagramSocketService service_type; - - - - -[endsect] - - -[section:set_option basic_datagram_socket::set_option] - -Set an option on the socket. - - void ``[link boost_asio.reference.basic_datagram_socket.set_option.overload1 set_option]``( - const SettableSocketOption & option); - - boost::system::error_code ``[link boost_asio.reference.basic_datagram_socket.set_option.overload2 set_option]``( - const SettableSocketOption & option, - boost::system::error_code & ec); - - -[section:overload1 basic_datagram_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_datagram_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_datagram_socket::shutdown] - -Disable sends or receives on the socket. - - void ``[link boost_asio.reference.basic_datagram_socket.shutdown.overload1 shutdown]``( - shutdown_type what); - - boost::system::error_code ``[link boost_asio.reference.basic_datagram_socket.shutdown.overload2 shutdown]``( - shutdown_type what, - boost::system::error_code & ec); - - -[section:overload1 basic_datagram_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_datagram_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_datagram_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] - - - -[endsect] - -[section:basic_deadline_timer basic_deadline_timer] - -Provides waitable timer functionality. - - template< - typename Time, - typename ``[link boost_asio.reference.TimeTraits TimeTraits]`` = boost::asio::time_traits