Client connections

Client connections

Connect your client to the server over HTTP, a message channel, or a direct call.

On this page
ConnectionChoose it whenThe application owns
HTTP calls with FetchThe caller reaches the server over HTTP or already uses Fetch APIs.Authentication, cookies, retries, and the base URL.
Same-process callsThe caller can safely import the server implementation.Server-only module placement and process lifetime.
Workers and IPCThe caller and server communicate through MessagePort-style IPC.Port transfer, access policy, and port lifetime.
WebSocket connectionsCalls need a dedicated long-lived network connection.Upgrades, authentication, origin checks, and reconnects.
Desktop IPC bridgesA desktop host must hand calls between web and native processes.Native routing, capabilities, handoff, and host shutdown.