11 #ifndef ASIO_DETAIL_SOCKET_OPS_HPP 12 #define ASIO_DETAIL_SOCKET_OPS_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 29 namespace socket_ops {
65 #if !defined(ASIO_WINDOWS_RUNTIME) 74 #if defined(ASIO_HAS_IOCP) 77 void* output_buffer, DWORD address_length,
81 #else // defined(ASIO_HAS_IOCP) 87 #endif // defined(ASIO_HAS_IOCP) 110 #if defined(ASIO_HAS_IOCP) 115 #endif // defined(ASIO_HAS_IOCP) 130 #if defined(ASIO_WINDOWS) || defined(__CYGWIN__) 132 #else // defined(ASIO_WINDOWS) || defined(__CYGWIN__) 134 #endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__) 146 #if defined(ASIO_HAS_IOCP) 148 ASIO_DECL void complete_iocp_recv(state_type state,
149 const weak_cancel_token_type& cancel_token,
bool all_empty,
152 #else // defined(ASIO_HAS_IOCP) 155 buf* bufs,
size_t count,
int flags,
bool is_stream,
158 #endif // defined(ASIO_HAS_IOCP) 168 #if defined(ASIO_HAS_IOCP) 171 const weak_cancel_token_type& cancel_token,
174 #else // defined(ASIO_HAS_IOCP) 177 buf* bufs,
size_t count,
int flags,
181 #endif // defined(ASIO_HAS_IOCP) 184 size_t count,
int in_flags,
int& out_flags,
188 buf* bufs,
size_t count,
int in_flags,
int& out_flags,
191 #if defined(ASIO_HAS_IOCP) 194 const weak_cancel_token_type& cancel_token,
197 #else // defined(ASIO_HAS_IOCP) 200 buf* bufs,
size_t count,
int in_flags,
int& out_flags,
203 #endif // defined(ASIO_HAS_IOCP) 209 const buf* bufs,
size_t count,
int flags,
212 #if defined(ASIO_HAS_IOCP) 215 const weak_cancel_token_type& cancel_token,
218 #else // defined(ASIO_HAS_IOCP) 221 const buf* bufs,
size_t count,
int flags,
224 #endif // defined(ASIO_HAS_IOCP) 234 #if !defined(ASIO_HAS_IOCP) 237 const buf* bufs,
size_t count,
int flags,
241 #endif // !defined(ASIO_HAS_IOCP) 247 int level,
int optname,
const void* optval,
251 int level,
int optname,
void* optval,
274 #endif // !defined(ASIO_WINDOWS_RUNTIME) 285 #if !defined(ASIO_WINDOWS_RUNTIME) 292 const weak_cancel_token_type& cancel_token,
const char* host,
300 char* host, std::size_t hostlen,
char* serv,
305 char* host, std::size_t hostlen,
char* serv,
309 const weak_cancel_token_type& cancel_token,
311 char* host, std::size_t hostlen,
char* serv,
314 #endif // !defined(ASIO_WINDOWS_RUNTIME) 330 #if defined(ASIO_HEADER_ONLY) 332 #endif // defined(ASIO_HEADER_ONLY) 334 #endif // ASIO_DETAIL_SOCKET_OPS_HPP int connect(socket_type s, const socket_addr_type *addr, std::size_t addrlen, asio::error_code &ec)
bool set_user_non_blocking(socket_type s, state_type &state, bool value, asio::error_code &ec)
signed_size_type recvmsg(socket_type s, buf *bufs, size_t count, int in_flags, int &out_flags, asio::error_code &ec)
const char * inet_ntop(int af, const void *src, char *dest, size_t length, unsigned long scope_id, asio::error_code &ec)
shared_ptr< void > shared_cancel_token_type
size_t sync_recv(socket_type s, state_type state, buf *bufs, size_t count, int flags, bool all_empty, asio::error_code &ec)
socket_type socket(int af, int type, int protocol, asio::error_code &ec)
int poll_connect(socket_type s, asio::error_code &ec)
bool sockatmark(socket_type s, asio::error_code &ec)
size_t sync_send(socket_type s, state_type state, const buf *bufs, size_t count, int flags, bool all_empty, asio::error_code &ec)
bool non_blocking_recv(socket_type s, buf *bufs, size_t count, int flags, bool is_stream, asio::error_code &ec, size_t &bytes_transferred)
int getsockopt(socket_type s, state_type state, int level, int optname, void *optval, size_t *optlen, asio::error_code &ec)
int getsockname(socket_type s, socket_addr_type *addr, std::size_t *addrlen, asio::error_code &ec)
signed_size_type recvfrom(socket_type s, buf *bufs, size_t count, int flags, socket_addr_type *addr, std::size_t *addrlen, asio::error_code &ec)
void init_buf(buf &b, void *data, size_t size)
bool non_blocking_send(socket_type s, const buf *bufs, size_t count, int flags, asio::error_code &ec, size_t &bytes_transferred)
int poll_read(socket_type s, state_type state, asio::error_code &ec)
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, timeval *timeout, asio::error_code &ec)
u_short_type host_to_network_short(u_short_type value)
int listen(socket_type s, int backlog, asio::error_code &ec)
sockaddr socket_addr_type
size_t sync_sendto(socket_type s, state_type state, const buf *bufs, size_t count, int flags, const socket_addr_type *addr, std::size_t addrlen, asio::error_code &ec)
asio::basic_streambuf< Allocator > & b
weak_ptr< void > weak_cancel_token_type
int setsockopt(socket_type s, state_type &state, int level, int optname, const void *optval, std::size_t optlen, asio::error_code &ec)
int ioctl(socket_type s, state_type &state, int cmd, ioctl_arg_type *arg, asio::error_code &ec)
int inet_pton(int af, const char *src, void *dest, unsigned long *scope_id, asio::error_code &ec)
signed_size_type send(socket_type s, const buf *bufs, size_t count, int flags, asio::error_code &ec)
asio::error_code background_getaddrinfo(const weak_cancel_token_type &cancel_token, const char *host, const char *service, const addrinfo_type &hints, addrinfo_type **result, asio::error_code &ec)
int socketpair(int af, int type, int protocol, socket_type sv[2], asio::error_code &ec)
u_long_type host_to_network_long(u_long_type value)
int gethostname(char *name, int namelen, asio::error_code &ec)
bool non_blocking_recvmsg(socket_type s, buf *bufs, size_t count, int in_flags, int &out_flags, asio::error_code &ec, size_t &bytes_transferred)
bool non_blocking_sendto(socket_type s, const buf *bufs, size_t count, int flags, const socket_addr_type *addr, std::size_t addrlen, asio::error_code &ec, size_t &bytes_transferred)
int poll_write(socket_type s, state_type state, asio::error_code &ec)
asio::error_code getnameinfo(const socket_addr_type *addr, std::size_t addrlen, char *host, std::size_t hostlen, char *serv, std::size_t servlen, int flags, asio::error_code &ec)
size_t available(socket_type s, asio::error_code &ec)
void freeaddrinfo(addrinfo_type *ai)
int bind(socket_type s, const socket_addr_type *addr, std::size_t addrlen, asio::error_code &ec)
signed_size_type sendto(socket_type s, const buf *bufs, size_t count, int flags, const socket_addr_type *addr, std::size_t addrlen, asio::error_code &ec)
Class to represent an error code value.
size_t sync_recvmsg(socket_type s, state_type state, buf *bufs, size_t count, int in_flags, int &out_flags, asio::error_code &ec)
u_short_type network_to_host_short(u_short_type value)
socket_type accept(socket_type s, socket_addr_type *addr, std::size_t *addrlen, asio::error_code &ec)
void sync_connect(socket_type s, const socket_addr_type *addr, std::size_t addrlen, asio::error_code &ec)
asio::error_code sync_getnameinfo(const socket_addr_type *addr, std::size_t addrlen, char *host, std::size_t hostlen, char *serv, std::size_t servlen, int sock_type, asio::error_code &ec)
int getpeername(socket_type s, socket_addr_type *addr, std::size_t *addrlen, bool cached, asio::error_code &ec)
int shutdown(socket_type s, int what, asio::error_code &ec)
signed_size_type recv(socket_type s, buf *bufs, size_t count, int flags, asio::error_code &ec)
size_t sync_recvfrom(socket_type s, state_type state, buf *bufs, size_t count, int flags, socket_addr_type *addr, std::size_t *addrlen, asio::error_code &ec)
bool non_blocking_connect(socket_type s, asio::error_code &ec)
bool non_blocking_recvfrom(socket_type s, buf *bufs, size_t count, int flags, socket_addr_type *addr, std::size_t *addrlen, asio::error_code &ec, size_t &bytes_transferred)
socket_type sync_accept(socket_type s, state_type state, socket_addr_type *addr, std::size_t *addrlen, asio::error_code &ec)
bool non_blocking_accept(socket_type s, state_type state, socket_addr_type *addr, std::size_t *addrlen, asio::error_code &ec, socket_type &new_socket)
u_long_type network_to_host_long(u_long_type value)
bool set_internal_non_blocking(socket_type s, state_type &state, bool value, asio::error_code &ec)
int close(socket_type s, state_type &state, bool destruction, asio::error_code &ec)
asio::error_code getaddrinfo(const char *host, const char *service, const addrinfo_type &hints, addrinfo_type **result, asio::error_code &ec)
asio::error_code background_getnameinfo(const weak_cancel_token_type &cancel_token, const socket_addr_type *addr, std::size_t addrlen, char *host, std::size_t hostlen, char *serv, std::size_t servlen, int sock_type, asio::error_code &ec)