Exemple #1
0
        public void Init(DnsResponderTCP responder)
        {
            if (responder == null)
            {
                throw new ArgumentNullException();
            }

            this.Clear();
            m_responder = responder;
            this.ReserveCapacity(responder.Settings.TcpServerSettings.ReadBufferSize);
        }
Exemple #2
0
        public DnsServer(IDnsStore store, DnsServerSettings settings)
        {
            if (store == null || settings == null)
            {
                throw new ArgumentNullException();
            }

            m_settings = settings;
            m_store    = store;

            m_tcpResponder = new DnsResponderTCP(this.Store, this.Settings);
            m_udpResponder = new DnsResponderUDP(this.Store, this.Settings);

            m_tcpResponder.Server.Error += InvokeError;
            m_udpResponder.Server.Error += InvokeError;
        }