Class DNSOverHTTP

DNSOverHTTP is a network interface for handling DNS requests over HTTP(S).

Hierarchy

  • EventEmitter
    • DNSOverHTTP

Implements

Constructors

Properties

address: string
handler?: NetworkHandler

The handler is responsible for processing incoming requests and sending outgoing responses.

maxConnections: number
networkType: HTTP | HTTPS

The type of network being used

port: number
serializer: DNSPacketSerializer = ...

The serializer is responsible for encoding and decoding packets. This is the piece of logic responsible for communicating directly with the wire format for whatever network protocol is used by the network interface.

server: Http2Server<typeof IncomingMessage, typeof ServerResponse, typeof Http2ServerRequest, typeof Http2ServerResponse>
ssl?: SSLConfig

Methods

  • Begin listening for incoming requests.

    The listen method should be able to effectively bootstrap the network interface without accepting additional parameters. This is to support polymorphic startups across a variety of network interfaces without needing to know the specifics of each.

    For example, some network interfaces may bind an array of ports, while others may bind to a single port and address. The listen method should be able to simply call without needing to know the specifics of the network interface.

    Parameters

    • Optionalcallback: (() => void)

      The callback to call when the network interface is ready to receive requests

        • (): void
        • Returns void

    Returns Promise<void>