11 #ifndef ASIO_BASIC_STREAM_SOCKET_HPP 12 #define ASIO_BASIC_STREAM_SOCKET_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 43 template <
typename Protocol,
44 typename StreamSocketService = stream_socket_service<Protocol> >
51 typedef typename StreamSocketService::native_handle_type
native_type;
72 :
basic_socket<Protocol, StreamSocketService>(io_service)
89 const protocol_type& protocol)
90 :
basic_socket<Protocol, StreamSocketService>(io_service, protocol)
110 const endpoint_type& endpoint)
111 :
basic_socket<Protocol, StreamSocketService>(io_service, endpoint)
130 const protocol_type& protocol,
const native_handle_type& native_socket)
132 io_service, protocol, native_socket)
136 #if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) 181 template <
typename Protocol1,
typename StreamSocketService1>
184 typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
187 Protocol1, StreamSocketService1>)(other))
201 template <
typename Protocol1,
typename StreamSocketService1>
208 Protocol1, StreamSocketService1>)(other));
211 #endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) 238 template <
typename ConstBufferSequence>
275 template <
typename ConstBufferSequence>
304 template <
typename ConstBufferSequence>
347 template <
typename ConstBufferSequence,
typename WriteHandler>
350 async_send(
const ConstBufferSequence&
buffers,
399 template <
typename ConstBufferSequence,
typename WriteHandler>
402 async_send(
const ConstBufferSequence& buffers,
443 template <
typename MutableBufferSequence>
444 std::size_t
receive(
const MutableBufferSequence& buffers)
483 template <
typename MutableBufferSequence>
484 std::size_t
receive(
const MutableBufferSequence& buffers,
512 template <
typename MutableBufferSequence>
513 std::size_t
receive(
const MutableBufferSequence& buffers,
557 template <
typename MutableBufferSequence,
typename ReadHandler>
560 async_receive(
const MutableBufferSequence& buffers,
610 template <
typename MutableBufferSequence,
typename ReadHandler>
613 async_receive(
const MutableBufferSequence& buffers,
652 template <
typename ConstBufferSequence>
678 template <
typename ConstBufferSequence>
720 template <
typename ConstBufferSequence,
typename WriteHandler>
723 async_write_some(
const ConstBufferSequence& buffers,
762 template <
typename MutableBufferSequence>
763 std::size_t
read_some(
const MutableBufferSequence& buffers)
789 template <
typename MutableBufferSequence>
790 std::size_t
read_some(
const MutableBufferSequence& buffers,
833 template <
typename MutableBufferSequence,
typename ReadHandler>
836 async_read_some(
const MutableBufferSequence& buffers,
852 #endif // ASIO_BASIC_STREAM_SOCKET_HPP int message_flags
Bitmask type for flags that can be passed to send and receive operations.
std::size_t receive(const MutableBufferSequence &buffers, socket_base::message_flags flags, asio::error_code &ec)
Receive some data on a connected socket.
basic_stream_socket(asio::io_service &io_service)
Construct a basic_stream_socket without opening it.
StreamSocketService::native_handle_type native_type
void throw_error(const asio::error_code &err)
basic_stream_socket(asio::io_service &io_service, const protocol_type &protocol, const native_handle_type &native_socket)
Construct a basic_stream_socket on an existing native socket.
Provides core I/O functionality.
ASIO_MOVE_ARG(ReadHandler) handler)
service_type & get_service()
Get the service associated with the I/O object.
#define ASIO_MOVE_CAST2(type1, type2)
ASIO_INITFN_RESULT_TYPE(WriteHandler, void(asio::error_code, std::size_t)) async_send(const ConstBufferSequence &buffers
Start an asynchronous send.
Provides stream-oriented socket functionality.
std::size_t receive(const MutableBufferSequence &buffers)
Receive some data on the socket.
socket_base::message_flags flags
std::size_t send(const ConstBufferSequence &buffers)
Send some data on the socket.
std::size_t read_some(const MutableBufferSequence &buffers)
Read some data from the socket.
const MutableBufferSequence & buffers
#define ASIO_READ_HANDLER_CHECK(handler_type, handler)
std::size_t send(const ConstBufferSequence &buffers, socket_base::message_flags flags)
Send some data on the socket.
implementation_type & get_implementation()
Get the underlying implementation of the I/O object.
basic_stream_socket(asio::io_service &io_service, const endpoint_type &endpoint)
Class to represent an error code value.
std::size_t receive(const MutableBufferSequence &buffers, socket_base::message_flags flags)
Receive some data on the socket.
Protocol protocol_type
The protocol type.
socket_base::message_flags ASIO_MOVE_ARG(ReadHandler) handler)
Provides socket functionality.
std::size_t read_some(const MutableBufferSequence &buffers, asio::error_code &ec)
Read some data from the socket.
std::size_t write_some(const ConstBufferSequence &buffers, asio::error_code &ec)
Write some data to the socket.
#define ASIO_MOVE_CAST(type)
StreamSocketService::native_handle_type native_handle_type
The native representation of a socket.
#define ASIO_WRITE_HANDLER_CHECK(handler_type, handler)
std::size_t send(const ConstBufferSequence &buffers, socket_base::message_flags flags, asio::error_code &ec)
Send some data on the socket.
Protocol::endpoint endpoint_type
The endpoint type.
ASIO_MOVE_ARG(WriteHandler) handler)
socket_base::message_flags ASIO_MOVE_ARG(WriteHandler) handler)
std::size_t write_some(const ConstBufferSequence &buffers)
Write some data to the socket.
basic_stream_socket(asio::io_service &io_service, const protocol_type &protocol)
Construct and open a basic_stream_socket.