public function __construct(DomainConfiguration $config, TcpSocket $tcp = null, Dns $dns = null) { $this->config = $config; $this->tcp = $tcp ?: new TcpSocket(); $this->dns = $dns ?: new Dns(); }