/
usr
/
include
/
boost
/
asio
/
/usr/include/boost/asio
mkdir
upload
Name
Size
Mode
Actions
detail/
-
0755
rm
execution/
-
0755
rm
generic/
-
0755
rm
impl/
-
0755
rm
ip/
-
0755
rm
local/
-
0755
rm
posix/
-
0755
rm
ssl/
-
0755
rm
traits/
-
0755
rm
ts/
-
0755
rm
windows/
-
0755
rm
any_io_executor.hpp
2625
0644
edit
dl
rm
associated_allocator.hpp
3791
0644
edit
dl
rm
associated_executor.hpp
5057
0644
edit
dl
rm
async_result.hpp
19423
0644
edit
dl
rm
awaitable.hpp
3270
0644
edit
dl
rm
basic_datagram_socket.hpp
47521
0644
edit
dl
rm
basic_deadline_timer.hpp
24158
0644
edit
dl
rm
basic_io_object.hpp
8096
0644
edit
dl
rm
basic_raw_socket.hpp
46996
0644
edit
dl
rm
basic_seq_packet_socket.hpp
29184
0644
edit
dl
rm
basic_serial_port.hpp
31912
0644
edit
dl
rm
basic_signal_set.hpp
19876
0644
edit
dl
rm
basic_socket.hpp
65516
0644
edit
dl
rm
basic_socket_acceptor.hpp
88062
0644
edit
dl
rm
basic_socket_iostream.hpp
13298
0644
edit
dl
rm
basic_socket_streambuf.hpp
21713
0644
edit
dl
rm
basic_streambuf.hpp
13714
0644
edit
dl
rm
basic_streambuf_fwd.hpp
920
0644
edit
dl
rm
basic_stream_socket.hpp
41520
0644
edit
dl
rm
basic_waitable_timer.hpp
28528
0644
edit
dl
rm
bind_executor.hpp
16510
0644
edit
dl
rm
buffer.hpp
83254
0644
edit
dl
rm
buffered_read_stream.hpp
8424
0644
edit
dl
rm
buffered_read_stream_fwd.hpp
699
0644
edit
dl
rm
buffered_stream.hpp
9074
0644
edit
dl
rm
buffered_stream_fwd.hpp
669
0644
edit
dl
rm
buffered_write_stream.hpp
8042
0644
edit
dl
rm
buffered_write_stream_fwd.hpp
705
0644
edit
dl
rm
buffers_iterator.hpp
14049
0644
edit
dl
rm
completion_condition.hpp
5500
0644
edit
dl
rm
compose.hpp
4596
0644
edit
dl
rm
connect.hpp
43157
0644
edit
dl
rm
coroutine.hpp
9897
0644
edit
dl
rm
co_spawn.hpp
14509
0644
edit
dl
rm
deadline_timer.hpp
1138
0644
edit
dl
rm
defer.hpp
5070
0644
edit
dl
rm
detached.hpp
3517
0644
edit
dl
rm
dispatch.hpp
4537
0644
edit
dl
rm
error.hpp
10351
0644
edit
dl
rm
execution.hpp
1871
0644
edit
dl
rm
execution_context.hpp
14341
0644
edit
dl
rm
executor.hpp
10467
0644
edit
dl
rm
executor_work_guard.hpp
8039
0644
edit
dl
rm
handler_alloc_hook.hpp
3471
0644
edit
dl
rm
handler_continuation_hook.hpp
1474
0644
edit
dl
rm
handler_invoke_hook.hpp
3744
0644
edit
dl
rm
high_resolution_timer.hpp
1394
0644
edit
dl
rm
io_context.hpp
55226
0644
edit
dl
rm
io_context_strand.hpp
13706
0644
edit
dl
rm
io_service.hpp
861
0644
edit
dl
rm
io_service_strand.hpp
575
0644
edit
dl
rm
is_applicable_property.hpp
1605
0644
edit
dl
rm
is_executor.hpp
1306
0644
edit
dl
rm
is_read_buffered.hpp
1646
0644
edit
dl
rm
is_write_buffered.hpp
1667
0644
edit
dl
rm
multiple_exceptions.hpp
1631
0644
edit
dl
rm
packaged_task.hpp
3358
0644
edit
dl
rm
placeholders.hpp
4146
0644
edit
dl
rm
post.hpp
4760
0644
edit
dl
rm
prefer.hpp
18821
0644
edit
dl
rm
query.hpp
8323
0644
edit
dl
rm
read.hpp
53894
0644
edit
dl
rm
read_at.hpp
27766
0644
edit
dl
rm
read_until.hpp
119477
0644
edit
dl
rm
redirect_error.hpp
1938
0644
edit
dl
rm
require.hpp
14926
0644
edit
dl
rm
require_concept.hpp
9218
0644
edit
dl
rm
serial_port.hpp
1010
0644
edit
dl
rm
serial_port_base.hpp
4975
0644
edit
dl
rm
signal_set.hpp
748
0644
edit
dl
rm
socket_base.hpp
15939
0644
edit
dl
rm
spawn.hpp
11793
0644
edit
dl
rm
ssl.hpp
848
0644
edit
dl
rm
static_thread_pool.hpp
826
0644
edit
dl
rm
steady_timer.hpp
1306
0644
edit
dl
rm
strand.hpp
17193
0644
edit
dl
rm
streambuf.hpp
826
0644
edit
dl
rm
system_context.hpp
2649
0644
edit
dl
rm
system_executor.hpp
22529
0644
edit
dl
rm
system_timer.hpp
1306
0644
edit
dl
rm
this_coro.hpp
1149
0644
edit
dl
rm
thread_pool.hpp
37567
0644
edit
dl
rm
time_traits.hpp
2281
0644
edit
dl
rm
unyield.hpp
381
0644
edit
dl
rm
uses_executor.hpp
2348
0644
edit
dl
rm
use_awaitable.hpp
5821
0644
edit
dl
rm
use_future.hpp
4820
0644
edit
dl
rm
version.hpp
686
0644
edit
dl
rm
wait_traits.hpp
1451
0644
edit
dl
rm
write.hpp
52959
0644
edit
dl
rm
write_at.hpp
29514
0644
edit
dl
rm
yield.hpp
482
0644
edit
dl
rm
Edit:
/usr/include/boost/asio/socket_base.hpp
(15939B)
// // socket_base.hpp // ~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2020 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) // #ifndef BOOST_ASIO_SOCKET_BASE_HPP #define BOOST_ASIO_SOCKET_BASE_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) #include <boost/asio/detail/config.hpp> #include <boost/asio/detail/io_control.hpp> #include <boost/asio/detail/socket_option.hpp> #include <boost/asio/detail/socket_types.hpp> #include <boost/asio/detail/push_options.hpp> namespace boost { namespace asio { /// The socket_base class is used as a base for the basic_stream_socket and /// basic_datagram_socket class templates so that we have a common place to /// define the shutdown_type and enum. class socket_base { public: /// Different ways a socket may be shutdown. enum shutdown_type { #if defined(GENERATING_DOCUMENTATION) /// Shutdown the receive side of the socket. shutdown_receive = implementation_defined, /// Shutdown the send side of the socket. shutdown_send = implementation_defined, /// Shutdown both send and receive on the socket. shutdown_both = implementation_defined #else shutdown_receive = BOOST_ASIO_OS_DEF(SHUT_RD), shutdown_send = BOOST_ASIO_OS_DEF(SHUT_WR), shutdown_both = BOOST_ASIO_OS_DEF(SHUT_RDWR) #endif }; /// Bitmask type for flags that can be passed to send and receive operations. typedef int message_flags; #if defined(GENERATING_DOCUMENTATION) /// Peek at incoming data without removing it from the input queue. static const int message_peek = implementation_defined; /// Process out-of-band data. static const int message_out_of_band = implementation_defined; /// Specify that the data should not be subject to routing. static const int message_do_not_route = implementation_defined; /// Specifies that the data marks the end of a record. static const int message_end_of_record = implementation_defined; #else BOOST_ASIO_STATIC_CONSTANT(int, message_peek = BOOST_ASIO_OS_DEF(MSG_PEEK)); BOOST_ASIO_STATIC_CONSTANT(int, message_out_of_band = BOOST_ASIO_OS_DEF(MSG_OOB)); BOOST_ASIO_STATIC_CONSTANT(int, message_do_not_route = BOOST_ASIO_OS_DEF(MSG_DONTROUTE)); BOOST_ASIO_STATIC_CONSTANT(int, message_end_of_record = BOOST_ASIO_OS_DEF(MSG_EOR)); #endif /// Wait types. /** * For use with basic_socket::wait() and basic_socket::async_wait(). */ enum wait_type { /// Wait for a socket to become ready to read. wait_read, /// Wait for a socket to become ready to write. wait_write, /// Wait for a socket to have error conditions pending. wait_error }; /// Socket option to permit sending of broadcast messages. /** * Implements the SOL_SOCKET/SO_BROADCAST socket option. * * @par Examples * Setting the option: * @code * boost::asio::ip::udp::socket socket(my_context); * ... * boost::asio::socket_base::broadcast option(true); * socket.set_option(option); * @endcode * * @par * Getting the current option value: * @code * boost::asio::ip::udp::socket socket(my_context); * ... * boost::asio::socket_base::broadcast option; * socket.get_option(option); * bool is_set = option.value(); * @endcode * * @par Concepts: * Socket_Option, Boolean_Socket_Option. */ #if defined(GENERATING_DOCUMENTATION) typedef implementation_defined broadcast; #else typedef boost::asio::detail::socket_option::boolean< BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_BROADCAST)> broadcast; #endif /// Socket option to enable socket-level debugging. /** * Implements the SOL_SOCKET/SO_DEBUG socket option. * * @par Examples * Setting the option: * @code * boost::asio::ip::tcp::socket socket(my_context); * ... * boost::asio::socket_base::debug option(true); * socket.set_option(option); * @endcode * * @par * Getting the current option value: * @code * boost::asio::ip::tcp::socket socket(my_context); * ... * boost::asio::socket_base::debug option; * socket.get_option(option); * bool is_set = option.value(); * @endcode * * @par Concepts: * Socket_Option, Boolean_Socket_Option. */ #if defined(GENERATING_DOCUMENTATION) typedef implementation_defined debug; #else typedef boost::asio::detail::socket_option::boolean< BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_DEBUG)> debug; #endif /// Socket option to prevent routing, use local interfaces only. /** * Implements the SOL_SOCKET/SO_DONTROUTE socket option. * * @par Examples * Setting the option: * @code * boost::asio::ip::udp::socket socket(my_context); * ... * boost::asio::socket_base::do_not_route option(true); * socket.set_option(option); * @endcode * * @par * Getting the current option value: * @code * boost::asio::ip::udp::socket socket(my_context); * ... * boost::asio::socket_base::do_not_route option; * socket.get_option(option); * bool is_set = option.value(); * @endcode * * @par Concepts: * Socket_Option, Boolean_Socket_Option. */ #if defined(GENERATING_DOCUMENTATION) typedef implementation_defined do_not_route; #else typedef boost::asio::detail::socket_option::boolean< BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_DONTROUTE)> do_not_route; #endif /// Socket option to send keep-alives. /** * Implements the SOL_SOCKET/SO_KEEPALIVE socket option. * * @par Examples * Setting the option: * @code * boost::asio::ip::tcp::socket socket(my_context); * ... * boost::asio::socket_base::keep_alive option(true); * socket.set_option(option); * @endcode * * @par * Getting the current option value: * @code * boost::asio::ip::tcp::socket socket(my_context); * ... * boost::asio::socket_base::keep_alive option; * socket.get_option(option); * bool is_set = option.value(); * @endcode * * @par Concepts: * Socket_Option, Boolean_Socket_Option. */ #if defined(GENERATING_DOCUMENTATION) typedef implementation_defined keep_alive; #else typedef boost::asio::detail::socket_option::boolean< BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_KEEPALIVE)> keep_alive; #endif /// Socket option for the send buffer size of a socket. /** * Implements the SOL_SOCKET/SO_SNDBUF socket option. * * @par Examples * Setting the option: * @code * boost::asio::ip::tcp::socket socket(my_context); * ... * boost::asio::socket_base::send_buffer_size option(8192); * socket.set_option(option); * @endcode * * @par * Getting the current option value: * @code * boost::asio::ip::tcp::socket socket(my_context); * ... * boost::asio::socket_base::send_buffer_size option; * socket.get_option(option); * int size = option.value(); * @endcode * * @par Concepts: * Socket_Option, Integer_Socket_Option. */ #if defined(GENERATING_DOCUMENTATION) typedef implementation_defined send_buffer_size; #else typedef boost::asio::detail::socket_option::integer< BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_SNDBUF)> send_buffer_size; #endif /// Socket option for the send low watermark. /** * Implements the SOL_SOCKET/SO_SNDLOWAT socket option. * * @par Examples * Setting the option: * @code * boost::asio::ip::tcp::socket socket(my_context); * ... * boost::asio::socket_base::send_low_watermark option(1024); * socket.set_option(option); * @endcode * * @par * Getting the current option value: * @code * boost::asio::ip::tcp::socket socket(my_context); * ... * boost::asio::socket_base::send_low_watermark option; * socket.get_option(option); * int size = option.value(); * @endcode * * @par Concepts: * Socket_Option, Integer_Socket_Option. */ #if defined(GENERATING_DOCUMENTATION) typedef implementation_defined send_low_watermark; #else typedef boost::asio::detail::socket_option::integer< BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_SNDLOWAT)> send_low_watermark; #endif /// Socket option for the receive buffer size of a socket. /** * Implements the SOL_SOCKET/SO_RCVBUF socket option. * * @par Examples * Setting the option: * @code * boost::asio::ip::tcp::socket socket(my_context); * ... * boost::asio::socket_base::receive_buffer_size option(8192); * socket.set_option(option); * @endcode * * @par * Getting the current option value: * @code * boost::asio::ip::tcp::socket socket(my_context); * ... * boost::asio::socket_base::receive_buffer_size option; * socket.get_option(option); * int size = option.value(); * @endcode * * @par Concepts: * Socket_Option, Integer_Socket_Option. */ #if defined(GENERATING_DOCUMENTATION) typedef implementation_defined receive_buffer_size; #else typedef boost::asio::detail::socket_option::integer< BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_RCVBUF)> receive_buffer_size; #endif /// Socket option for the receive low watermark. /** * Implements the SOL_SOCKET/SO_RCVLOWAT socket option. * * @par Examples * Setting the option: * @code * boost::asio::ip::tcp::socket socket(my_context); * ... * boost::asio::socket_base::receive_low_watermark option(1024); * socket.set_option(option); * @endcode * * @par * Getting the current option value: * @code * boost::asio::ip::tcp::socket socket(my_context); * ... * boost::asio::socket_base::receive_low_watermark option; * socket.get_option(option); * int size = option.value(); * @endcode * * @par Concepts: * Socket_Option, Integer_Socket_Option. */ #if defined(GENERATING_DOCUMENTATION) typedef implementation_defined receive_low_watermark; #else typedef boost::asio::detail::socket_option::integer< BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_RCVLOWAT)> receive_low_watermark; #endif /// Socket option to allow the socket to be bound to an address that is /// already in use. /** * Implements the SOL_SOCKET/SO_REUSEADDR socket option. * * @par Examples * Setting the option: * @code * boost::asio::ip::tcp::acceptor acceptor(my_context); * ... * boost::asio::socket_base::reuse_address option(true); * acceptor.set_option(option); * @endcode * * @par * Getting the current option value: * @code * boost::asio::ip::tcp::acceptor acceptor(my_context); * ... * boost::asio::socket_base::reuse_address option; * acceptor.get_option(option); * bool is_set = option.value(); * @endcode * * @par Concepts: * Socket_Option, Boolean_Socket_Option. */ #if defined(GENERATING_DOCUMENTATION) typedef implementation_defined reuse_address; #else typedef boost::asio::detail::socket_option::boolean< BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_REUSEADDR)> reuse_address; #endif /// Socket option to specify whether the socket lingers on close if unsent /// data is present. /** * Implements the SOL_SOCKET/SO_LINGER socket option. * * @par Examples * Setting the option: * @code * boost::asio::ip::tcp::socket socket(my_context); * ... * boost::asio::socket_base::linger option(true, 30); * socket.set_option(option); * @endcode * * @par * Getting the current option value: * @code * boost::asio::ip::tcp::socket socket(my_context); * ... * boost::asio::socket_base::linger option; * socket.get_option(option); * bool is_set = option.enabled(); * unsigned short timeout = option.timeout(); * @endcode * * @par Concepts: * Socket_Option, Linger_Socket_Option. */ #if defined(GENERATING_DOCUMENTATION) typedef implementation_defined linger; #else typedef boost::asio::detail::socket_option::linger< BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_LINGER)> linger; #endif /// Socket option for putting received out-of-band data inline. /** * Implements the SOL_SOCKET/SO_OOBINLINE socket option. * * @par Examples * Setting the option: * @code * boost::asio::ip::tcp::socket socket(my_context); * ... * boost::asio::socket_base::out_of_band_inline option(true); * socket.set_option(option); * @endcode * * @par * Getting the current option value: * @code * boost::asio::ip::tcp::socket socket(my_context); * ... * boost::asio::socket_base::out_of_band_inline option; * socket.get_option(option); * bool value = option.value(); * @endcode * * @par Concepts: * Socket_Option, Boolean_Socket_Option. */ #if defined(GENERATING_DOCUMENTATION) typedef implementation_defined out_of_band_inline; #else typedef boost::asio::detail::socket_option::boolean< BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_OOBINLINE)> out_of_band_inline; #endif /// Socket option to report aborted connections on accept. /** * 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. * * @par Examples * Setting the option: * @code * boost::asio::ip::tcp::acceptor acceptor(my_context); * ... * boost::asio::socket_base::enable_connection_aborted option(true); * acceptor.set_option(option); * @endcode * * @par * Getting the current option value: * @code * boost::asio::ip::tcp::acceptor acceptor(my_context); * ... * boost::asio::socket_base::enable_connection_aborted option; * acceptor.get_option(option); * bool is_set = option.value(); * @endcode * * @par Concepts: * Socket_Option, Boolean_Socket_Option. */ #if defined(GENERATING_DOCUMENTATION) typedef implementation_defined enable_connection_aborted; #else typedef boost::asio::detail::socket_option::boolean< boost::asio::detail::custom_socket_option_level, boost::asio::detail::enable_connection_aborted_option> enable_connection_aborted; #endif /// IO control command to get the amount of data that can be read without /// blocking. /** * Implements the FIONREAD IO control command. * * @par Example * @code * boost::asio::ip::tcp::socket socket(my_context); * ... * boost::asio::socket_base::bytes_readable command(true); * socket.io_control(command); * std::size_t bytes_readable = command.get(); * @endcode * * @par Concepts: * IO_Control_Command, Size_IO_Control_Command. */ #if defined(GENERATING_DOCUMENTATION) typedef implementation_defined bytes_readable; #else typedef boost::asio::detail::io_control::bytes_readable bytes_readable; #endif /// The maximum length of the queue of pending incoming connections. #if defined(GENERATING_DOCUMENTATION) static const int max_listen_connections = implementation_defined; #else BOOST_ASIO_STATIC_CONSTANT(int, max_listen_connections = BOOST_ASIO_OS_DEF(SOMAXCONN)); #endif #if !defined(BOOST_ASIO_NO_DEPRECATED) /// (Deprecated: Use max_listen_connections.) The maximum length of the queue /// of pending incoming connections. #if defined(GENERATING_DOCUMENTATION) static const int max_connections = implementation_defined; #else BOOST_ASIO_STATIC_CONSTANT(int, max_connections = BOOST_ASIO_OS_DEF(SOMAXCONN)); #endif #endif // !defined(BOOST_ASIO_NO_DEPRECATED) protected: /// Protected destructor to prevent deletion through this type. ~socket_base() { } }; } // namespace asio } // namespace boost #include <boost/asio/detail/pop_options.hpp> #endif // BOOST_ASIO_SOCKET_BASE_HPP
Save
cmd:
run