11 #ifndef ASIO_DETAIL_NULL_SOCKET_SERVICE_HPP 12 #define ASIO_DETAIL_NULL_SOCKET_SERVICE_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 20 #if defined(ASIO_WINDOWS_RUNTIME) 33 template <
typename Protocol>
34 class null_socket_service
38 typedef Protocol protocol_type;
41 typedef typename Protocol::endpoint endpoint_type;
44 typedef int native_handle_type;
47 struct implementation_type
53 : io_service_(io_service)
58 void shutdown_service()
63 void construct(implementation_type&)
68 void move_construct(implementation_type&, implementation_type&)
73 void move_assign(implementation_type&,
74 null_socket_service&, implementation_type&)
79 template <
typename Protocol1>
80 void converting_move_construct(implementation_type&,
81 typename null_socket_service<Protocol1>::implementation_type&)
86 void destroy(implementation_type&)
107 bool is_open(
const implementation_type&)
const 121 native_handle_type native_handle(implementation_type&)
135 bool at_mark(
const implementation_type&,
143 std::size_t
available(
const implementation_type&,
159 template <
typename IO_Control_Command>
182 bool native_non_blocking(
const implementation_type&)
const 212 template <
typename Option>
221 template <
typename Option>
230 endpoint_type local_endpoint(
const implementation_type&,
234 return endpoint_type();
238 endpoint_type remote_endpoint(
const implementation_type&,
242 return endpoint_type();
246 template <
typename ConstBufferSequence>
247 std::size_t
send(implementation_type&,
const ConstBufferSequence&,
255 std::size_t
send(implementation_type&,
const null_buffers&,
264 template <
typename ConstBufferSequence,
typename Handler>
265 void async_send(implementation_type&,
const ConstBufferSequence&,
269 const std::size_t bytes_transferred = 0;
274 template <
typename Handler>
275 void async_send(implementation_type&,
const null_buffers&,
279 const std::size_t bytes_transferred = 0;
284 template <
typename MutableBufferSequence>
285 std::size_t receive(implementation_type&,
const MutableBufferSequence&,
293 std::size_t receive(implementation_type&,
const null_buffers&,
302 template <
typename MutableBufferSequence,
typename Handler>
303 void async_receive(implementation_type&,
const MutableBufferSequence&,
307 const std::size_t bytes_transferred = 0;
312 template <
typename Handler>
313 void async_receive(implementation_type&,
const null_buffers&,
317 const std::size_t bytes_transferred = 0;
323 template <
typename MutableBufferSequence>
324 std::size_t receive_with_flags(implementation_type&,
333 std::size_t receive_with_flags(implementation_type&,
343 template <
typename MutableBufferSequence,
typename Handler>
344 void async_receive_with_flags(implementation_type&,
349 const std::size_t bytes_transferred = 0;
354 template <
typename Handler>
355 void async_receive_with_flags(implementation_type&,
360 const std::size_t bytes_transferred = 0;
366 template <
typename ConstBufferSequence>
367 std::size_t send_to(implementation_type&,
const ConstBufferSequence&,
376 std::size_t send_to(implementation_type&,
const null_buffers&,
386 template <
typename ConstBufferSequence,
typename Handler>
387 void async_send_to(implementation_type&,
const ConstBufferSequence&,
392 const std::size_t bytes_transferred = 0;
397 template <
typename Handler>
398 void async_send_to(implementation_type&,
const null_buffers&,
402 const std::size_t bytes_transferred = 0;
408 template <
typename MutableBufferSequence>
409 std::size_t receive_from(implementation_type&,
const MutableBufferSequence&,
418 std::size_t receive_from(implementation_type&,
const null_buffers&,
429 template <
typename MutableBufferSequence,
typename Handler>
430 void async_receive_from(implementation_type&,
431 const MutableBufferSequence&, endpoint_type&,
435 const std::size_t bytes_transferred = 0;
440 template <
typename Handler>
441 void async_receive_from(implementation_type&,
442 const null_buffers&, endpoint_type&,
446 const std::size_t bytes_transferred = 0;
451 template <
typename Socket>
461 template <
typename Socket,
typename Handler>
462 void async_accept(implementation_type&, Socket&,
463 endpoint_type*, Handler& handler)
478 template <
typename Handler>
479 void async_connect(implementation_type&,
480 const endpoint_type&, Handler& handler)
495 #endif // defined(ASIO_WINDOWS_RUNTIME) 497 #endif // ASIO_DETAIL_NULL_SOCKET_SERVICE_HPP int message_flags
Bitmask type for flags that can be passed to send and receive operations.
Provides core I/O functionality.
Iterator connect(basic_socket< Protocol, SocketService > &s, Iterator begin)
Establishes a socket connection by trying each endpoint in a sequence.
int listen(socket_type s, int backlog, asio::error_code &ec)
signed_size_type send(socket_type s, const buf *bufs, size_t count, int flags, asio::error_code &ec)
shutdown_type
Different ways a socket may be shutdown.
size_t available(socket_type s, asio::error_code &ec)
int bind(socket_type s, const socket_addr_type *addr, std::size_t addrlen, asio::error_code &ec)
Class to represent an error code value.
socket_type accept(socket_type s, socket_addr_type *addr, std::size_t *addrlen, asio::error_code &ec)
ASIO_DECL int close(int d, state_type &state, asio::error_code &ec)
int shutdown(socket_type s, int what, asio::error_code &ec)
binder1< Handler, Arg1 > bind_handler(Handler handler, const Arg1 &arg1)
ASIO_DECL int open(const char *path, int flags, asio::error_code &ec)