Skip to main content

Module Server

Module Server 

Source
Expand description

§DNS Server

Builds and serves the private DNS catalog for CodeEditorLand. Binds exclusively to loopback (127.0.0.1) to prevent LAN exposure.

Constants§

DNS_TCP_RESPONSE_BUFFER_SIZE 🔒
Buffer capacity for outgoing DNS TCP responses per connection. 65 535 is the upper bound a single DNS message can reach over TCP (the 16-bit length prefix cap from RFC 1035 §4.2.2). Picking the cap avoids any truncation for zone-transfer or large TXT responses while staying well within memory for the dozen-or-so concurrent connections a local editor.land catalog ever sees.

Functions§

BuildCatalog
Builds a DNS catalog for the CodeEditorLand private network.
Serve
Serves DNS queries on the specified loopback port (async).
ServeSync
Serves DNS queries synchronously (blocking convenience wrapper).