11 #ifndef ASIO_BASIC_RAW_SOCKET_HPP 12 #define ASIO_BASIC_RAW_SOCKET_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 40 template <
typename Protocol,
41 typename RawSocketService = raw_socket_service<Protocol> >
48 typedef typename RawSocketService::native_handle_type
native_type;
86 const protocol_type& protocol)
87 :
basic_socket<Protocol, RawSocketService>(io_service, protocol)
108 const endpoint_type& endpoint)
109 :
basic_socket<Protocol, RawSocketService>(io_service, endpoint)
129 const protocol_type& protocol,
const native_handle_type& native_socket)
131 io_service, protocol, native_socket)
135 #if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) 179 template <
typename Protocol1,
typename RawSocketService1>
181 typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
184 Protocol1, RawSocketService1>)(other))
198 template <
typename Protocol1,
typename RawSocketService1>
205 Protocol1, RawSocketService1>)(other));
208 #endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) 231 template <
typename ConstBufferSequence>
257 template <
typename ConstBufferSequence>
284 template <
typename ConstBufferSequence>
327 template <
typename ConstBufferSequence,
typename WriteHandler>
330 async_send(
const ConstBufferSequence&
buffers,
369 template <
typename ConstBufferSequence,
typename WriteHandler>
372 async_send(
const ConstBufferSequence& buffers,
409 template <
typename ConstBufferSequence>
410 std::size_t
send_to(
const ConstBufferSequence& buffers,
436 template <
typename ConstBufferSequence>
437 std::size_t
send_to(
const ConstBufferSequence& buffers,
463 template <
typename ConstBufferSequence>
464 std::size_t
send_to(
const ConstBufferSequence& buffers,
469 buffers, destination, flags, ec);
509 template <
typename ConstBufferSequence,
typename WriteHandler>
512 async_send_to(
const ConstBufferSequence& buffers,
551 template <
typename ConstBufferSequence,
typename WriteHandler>
554 async_send_to(
const ConstBufferSequence& buffers,
591 template <
typename MutableBufferSequence>
592 std::size_t
receive(
const MutableBufferSequence& buffers)
619 template <
typename MutableBufferSequence>
620 std::size_t
receive(
const MutableBufferSequence& buffers,
648 template <
typename MutableBufferSequence>
649 std::size_t
receive(
const MutableBufferSequence& buffers,
692 template <
typename MutableBufferSequence,
typename ReadHandler>
695 async_receive(
const MutableBufferSequence& buffers,
734 template <
typename MutableBufferSequence,
typename ReadHandler>
737 async_receive(
const MutableBufferSequence& buffers,
775 template <
typename MutableBufferSequence>
802 template <
typename MutableBufferSequence>
829 template <
typename MutableBufferSequence>
835 buffers, sender_endpoint, flags, ec);
874 template <
typename MutableBufferSequence,
typename ReadHandler>
877 async_receive_from(
const MutableBufferSequence& buffers,
919 template <
typename MutableBufferSequence,
typename ReadHandler>
922 async_receive_from(
const MutableBufferSequence& buffers,
940 #endif // ASIO_BASIC_RAW_SOCKET_HPP int message_flags
Bitmask type for flags that can be passed to send and receive operations.
std::size_t send(const ConstBufferSequence &buffers)
Send some data on a connected socket.
basic_raw_socket(asio::io_service &io_service, const protocol_type &protocol)
Construct and open a basic_raw_socket.
void throw_error(const asio::error_code &err)
ASIO_INITFN_RESULT_TYPE(WriteHandler, void(asio::error_code, std::size_t)) async_send(const ConstBufferSequence &buffers
Start an asynchronous send on a connected socket.
Provides core I/O functionality.
service_type & get_service()
Get the service associated with the I/O object.
#define ASIO_MOVE_CAST2(type1, type2)
std::size_t send_to(const ConstBufferSequence &buffers, const endpoint_type &destination)
Send raw data to the specified endpoint.
basic_raw_socket(asio::io_service &io_service)
Construct a basic_raw_socket without opening it.
Protocol protocol_type
The protocol type.
RawSocketService::native_handle_type native_handle_type
The native representation of a socket.
const endpoint_type ASIO_MOVE_ARG(WriteHandler) handler)
std::size_t receive_from(const MutableBufferSequence &buffers, endpoint_type &sender_endpoint, socket_base::message_flags flags)
Receive raw data with the endpoint of the sender.
std::size_t receive_from(const MutableBufferSequence &buffers, endpoint_type &sender_endpoint)
Receive raw data with the endpoint of the sender.
const endpoint_type socket_base::message_flags ASIO_MOVE_ARG(WriteHandler) handler)
const MutableBufferSequence & buffers
endpoint_type ASIO_MOVE_ARG(ReadHandler) handler)
std::size_t receive(const MutableBufferSequence &buffers)
Receive some data on a connected socket.
#define ASIO_READ_HANDLER_CHECK(handler_type, handler)
const endpoint_type & destination
ASIO_MOVE_ARG(ReadHandler) handler)
RawSocketService::native_handle_type native_type
socket_base::message_flags flags
implementation_type & get_implementation()
Get the underlying implementation of the I/O object.
endpoint_type & sender_endpoint
std::size_t receive(const MutableBufferSequence &buffers, socket_base::message_flags flags, asio::error_code &ec)
Receive some data on a connected socket.
socket_base::message_flags ASIO_MOVE_ARG(WriteHandler) handler)
Class to represent an error code value.
basic_raw_socket(asio::io_service &io_service, const protocol_type &protocol, const native_handle_type &native_socket)
Construct a basic_raw_socket on an existing native socket.
std::size_t send_to(const ConstBufferSequence &buffers, const endpoint_type &destination, socket_base::message_flags flags)
Send raw data to the specified endpoint.
std::size_t receive(const MutableBufferSequence &buffers, socket_base::message_flags flags)
Receive some data on a connected socket.
socket_base::message_flags ASIO_MOVE_ARG(ReadHandler) handler)
Provides raw-oriented socket functionality.
std::size_t send_to(const ConstBufferSequence &buffers, const endpoint_type &destination, socket_base::message_flags flags, asio::error_code &ec)
Send raw data to the specified endpoint.
Protocol::endpoint endpoint_type
The endpoint type.
std::size_t receive_from(const MutableBufferSequence &buffers, endpoint_type &sender_endpoint, socket_base::message_flags flags, asio::error_code &ec)
Receive raw data with the endpoint of the sender.
basic_raw_socket(asio::io_service &io_service, const endpoint_type &endpoint)
Provides socket functionality.
ASIO_MOVE_ARG(WriteHandler) handler)
#define ASIO_MOVE_CAST(type)
std::size_t send(const ConstBufferSequence &buffers, socket_base::message_flags flags)
Send some data on a connected socket.
std::size_t send(const ConstBufferSequence &buffers, socket_base::message_flags flags, asio::error_code &ec)
Send some data on a connected socket.
#define ASIO_WRITE_HANDLER_CHECK(handler_type, handler)
endpoint_type socket_base::message_flags ASIO_MOVE_ARG(ReadHandler) handler)