Expand description
Networking primitives for TCP/UDP communication.
Structs§
- A handle to a TCP socket.
- A handle to a UDP socket.
Functions§
- ax_
dns_ query net
Resolves the host name to a list of IP addresses. - Poll the network stack.
- Accepts a new connection on the TCP socket.
- ax_
tcp_ bind net
Binds the TCP socket to the given address and port. - Connects the TCP socket to the given address and port.
- Starts listening on the bound address and port.
- Returns the remote address and port of the TCP socket.
- ax_
tcp_ poll net
Returns whether the TCP socket is readable or writable. - ax_
tcp_ recv net
Receives data on the TCP socket, and stores it in the given buffer. On success, returns the number of bytes read. - ax_
tcp_ send net
Transmits data in the given buffer on the TCP socket. - Moves this TCP socket into or out of nonblocking mode.
- Closes the connection on the TCP socket.
- Creates a new TCP socket.
- Returns the local address and port of the TCP socket.
- ax_
udp_ bind net
Binds the UDP socket to the given address and port. - Connects this UDP socket to a remote address, allowing the
send
andrecv
to be used to send data and also applies filters to only receive data from the specified address. - Receives a single datagram message on the UDP socket, without removing it from the queue.
- Returns the remote address and port of the UDP socket.
- ax_
udp_ poll net
Returns whether the UDP socket is readable or writable. - ax_
udp_ recv net
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. - Receives a single datagram message on the UDP socket.
- ax_
udp_ send net
Sends data on the UDP socket to the remote address to which it is connected. - Sends data on the UDP socket to the given address. On success, returns the number of bytes written.
- Moves this UDP socket into or out of nonblocking mode.
- Creates a new UDP socket.
- Returns the local address and port of the UDP socket.