Skip to content

xxsocket Class

Provides the functionality of low-level socket based on POSIX socket APIs, support std::move


namespace yasio { namespace inet { class xxsocket; } }


Name Description
xxsocket::xxsocket Constructs a xxsocket object.

Public Methods

Name Description
xxsocket::xpconnect Cnnect remote via tcp.
xxsocket::xpconnect_n Connect remote via tcp non-blocking.
xxsocket::pconnect Connect remote via tcp.
xxsocket::pconnect_n Connect remote via tcp non-blocking.
xxsocket::pserve Create socket as tcp server.
xxsocket::swap Swap socket handle.
xxsocket::open Open a socket.
xxsocket::reopen Reopen a socket.
xxsocket::is_open Check whether socket opened.
xxsocket::native_handle Gets socket handle.
xxsocket::release_handle Release ownership of socket handle.
xxsocket::set_nonblocking Sets socket non-blocking mode.
xxsocket::test_nonblocking Test whether socket is non-blocking mode.
xxsocket::bind Bind socket with specific address.
xxsocket::bind_any Bind socket with any address.
xxsocket::listen Listen a tcp socket.
xxsocket::accept Accept a tcp socket.
xxsocket::accept_n Accept a tcp socket non-blocking.
xxsocket::connect Connect a socket.
xxsocket::connect_n Connect a socket non-blocking.
xxsocket::send Send data on the socket.
xxsocket::send_n Send data on the socket non-blocking.
xxsocket::recv Receive data from the socket.
xxsocket::recv_n Receive data from the socket non-blocking.
xxsocket::sendto Send data to a DGRAM socket.
xxsocket::recvfrom Send data to a DGRAM socket non-blocking.
xxsocket::handle_write_ready Wait socket ready to write.
xxsocket::handle_read_ready Wait socket ready to read.
xxsocket::local_endpoint Gets local endpoint of socket.
xxsocket::peer_endpoint Gets peer endpoint of socket.
xxsocket::set_keepalive Sets tcp socket keepalive.
xxsocket::reuse_address Sets socket reuse address.
xxsocket::exclusive_address Sets socket exclusive address.
xxsocket::select Select event ready for socket.
xxsocket::shutdown Shutdown socket.
xxsocket::close Close socket.
xxsocket::tcp_rtt Gets tcp socket rtt.
xxsocket::get_last_errno Gets last socket error.
xxsocket::set_last_errno Sets last socket error.
xxsocket::strerror Translate socket error code to string.
xxsocket::gai_strerror Translate getaddrinfo error code to string.
xxsocket::resolve Resolve domain.
xxsocket::resolve_v4 Resolve domain ipv4 address.
xxsocket::resolve_v6 Resolve domain ipv6 address.
xxsocket::resolve_v4to6 Resolve ipv4 address and convert to ipv6 V4MAPPED format.
xxsocket::resolve_tov6 Resolve all address, convert ipv4 address to ipv6 V4MAPPED format.
xxsocket::getipsv Get local supported ip stack flags.
xxsocket::traverse_local_address Traverse local address.

See also

io_service Class