Module arceos_api::net

source ·
Expand description

Networking primitives for TCP/UDP communication.

Structs

Functions

  • Resolves the host name to a list of IP addresses.
  • Poll the network stack.
  • Accepts a new connection on the TCP socket.
  • 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.
  • Returns whether the TCP socket is readable or writable.
  • Receives data on the TCP socket, and stores it in the given buffer. On success, returns the number of bytes read.
  • 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.
  • Binds the UDP socket to the given address and port.
  • 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.
  • 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.
  • Returns whether the UDP socket is readable or writable.
  • 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.
  • 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.