Optional
handlerThe handler is responsible for processing incoming requests and sending outgoing responses.
The type of network being used
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.
Private
Optional
sslBegin 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.
Optional
callback: (() => void)The callback to call when the network interface is ready to receive requests
Private
to
DNSOverTCP is a network interface for handling DNS requests over TCP.