Network API Overview

The network API combines portable address values with event-based operations.

Address and Host Values

Working with IP Addresses and Hostnames explains how to choose, parse, format, compare, and inspect IP addresses, host names, endpoints, ports, IPv6 scopes, and CIDR networks.

Resolving Hosts

Resolving Hosts Asynchronously explains how to resolve a numeric address or host name without blocking an event loop, handle every returned address, choose an owner loop, cancel safely, and manage lookup errors and lifetime.

Transports

Sending and Receiving UDP Packets explains how to bind a native UDP socket, exchange repeated datagrams with multiple remotes, respond to output back-pressure and oversized input, and choose graceful or immediate shutdown.

Using TCP Connections explains outgoing resolution, listeners and admission filters, transferable accepted sockets, stream back-pressure, and normal or immediate shutdown.

Using TLS Client Connections explains authenticated outgoing TLS connections, configuration snapshots, checkpoints, back-pressure, deadlines, and close_notify.

Using TLS Server Connections explains shared accepted-connection and handshake quotas, default and exact-SNI identities, ClientHello inspection, authenticated stream flow, and graceful shutdown.

HTTP Servers

Using HTTP Servers explains how to configure one plaintext or TLS HTTP/1.1 server, register ordered server and session routes, choose request-body policies, retain requests for delayed work, stream responses, and enable bounded cookie-backed sessions.

HTTP Clients

Using HTTP Clients explains how to prepare and submit HTTP or HTTPS requests through one session, choose automatic or low-level response handling, stream uploads and downloads under back-pressure, and close the session cleanly.