# Class Protocols.DNS.tcp_server

Inheritance graph

Description

  Base class for implementing a Domain Name Service (DNS) server operating over TCP.

  This class is typically used by inheriting it, and overloading reply_query() and handle_response().

Inherit server_base

  `inherit server_base : server_base`

Method create

  `Protocols.DNS.tcp_server Protocols.DNS.tcp_server()`
  `Protocols.DNS.tcp_server Protocols.DNS.tcp_server(`int` `port`)`
  `Protocols.DNS.tcp_server Protocols.DNS.tcp_server(`string` `ip`)`
  `Protocols.DNS.tcp_server Protocols.DNS.tcp_server(`string` `ip`, `int` `port`)`
  `Protocols.DNS.tcp_server Protocols.DNS.tcp_server(`string` `ip`, `int` `port`, `string`|`int` ... `more`)`

Description

  Open one or more new DNS server ports.

Parameter `ip`

  The IP to bind to. Defaults to `"::"` or `0` (ie ANY) depending on whether IPv6 support is present or not.

Parameter `port`

  The port number to bind to. Defaults to `53`.

Parameter `more`

  Optional further DNS server ports to open. Must be a set of ip, port argument pairs.