Stops the server gracefully.
The server handle returned by listen
The universal web-standard entry point. Accepts a web Request and
returns a web Response. May be called without listen (e.g. Cloudflare
Workers where export default { fetch: app.fetch } is the deploy path).
A web-standard Request
A web-standard Response
Binds the adapter's fetch to a real TCP socket.
TCP port to bind
Optionalhostname: string
Bind address (defaults to all interfaces)
An opaque server handle (returned from listen, passed to close)
OptionalsetInstalls a gRPC/Connect fetch handler.
The RPC fetch handler (retained for compatibility)
This method is no longer called by the kernel. gRPC dispatch
now occurs inside the kernel terminal handler, after the middleware
pipeline runs. The kernel resolves IGrpcService from the
service registry and calls handleRequest directly. This setter is
retained for backward compatibility but is a no-op in current adapters.
It will be removed in the next major release.
OptionalsetInstalls a WebSocket upgrade router. The adapter stores the router but does
not consult it: since M70a the kernel's terminal handler resolves
IWebSocketService and calls routeUpgrade itself, after the
middleware pipeline has run without short-circuiting and before route
matching — so an application catch-all cannot shadow an upgrade. What the
adapter needs from this setter is the bare fact that a router was
installed: Node attaches its raw upgrade listener only then.
Optional: absent on adapters that cannot perform a WebSocket handshake.
Callers MUST degrade gracefully when it is not provided — see the
WebSocketPlugin, which still registers its service and health indicator
but fails route() with a typed error. Because the member is optional,
adapters written before this seam existed remain valid implementations.
Upgrade detection is the router's own job — it returns null for anything
that is not an upgrade on a path it owns, and the kernel falls through to
normal HTTP handling — so installing a router never changes the behavior of
non-WebSocket traffic.
Decides accept, reject, or fall-through per upgrade request
HTTP server adapter provided by the runtime plugin. No other plugin may create HTTP servers (AI_GUIDELINES §4.3).
The contract is web-standard
fetch-centric:setHandlerinstalls the request handler,fetchis the universal entry point callable withoutlisten(Cloudflare Workers),listenbinds a real socket, andclosetears it down.Since
0.1.0