Module net

Source
Expand description

Networking primitives for TCP/UDP communication.

Structs§

AxTcpSocketHandle
A handle to a TCP socket.
AxUdpSocketHandle
A handle to a UDP socket.

Functions§

ax_dns_query
Resolves the host name to a list of IP addresses.
ax_poll_interfaces
Poll the network stack.
ax_tcp_accept
Accepts a new connection on the TCP socket.
ax_tcp_bind
Binds the TCP socket to the given address and port.
ax_tcp_connect
Connects the TCP socket to the given address and port.
ax_tcp_listen
Starts listening on the bound address and port.
ax_tcp_peer_addr
Returns the remote address and port of the TCP socket.
ax_tcp_poll
Returns whether the TCP socket is readable or writable.
ax_tcp_recv
Receives data on the TCP socket, and stores it in the given buffer. On success, returns the number of bytes read.
ax_tcp_send
Transmits data in the given buffer on the TCP socket.
ax_tcp_set_nonblocking
Moves this TCP socket into or out of nonblocking mode.
ax_tcp_shutdown
Closes the connection on the TCP socket.
ax_tcp_socket
Creates a new TCP socket.
ax_tcp_socket_addr
Returns the local address and port of the TCP socket.
ax_udp_bind
Binds the UDP socket to the given address and port.
ax_udp_connect
Connects this UDP socket to a remote address, allowing the send and recv to be used to send data and also applies filters to only receive data from the specified address.
ax_udp_peek_from
Receives a single datagram message on the UDP socket, without removing it from the queue.
ax_udp_peer_addr
Returns the remote address and port of the UDP socket.
ax_udp_poll
Returns whether the UDP socket is readable or writable.
ax_udp_recv
Receives a single datagram message on the UDP socket from the remote address to which it is connected. On success, returns the number of bytes read.
ax_udp_recv_from
Receives a single datagram message on the UDP socket.
ax_udp_send
Sends data on the UDP socket to the remote address to which it is connected.
ax_udp_send_to
Sends data on the UDP socket to the given address. On success, returns the number of bytes written.
ax_udp_set_nonblocking
Moves this UDP socket into or out of nonblocking mode.
ax_udp_socket
Creates a new UDP socket.
ax_udp_socket_addr
Returns the local address and port of the UDP socket.