Exemplo n.º 1
0
        public DnsServerSettings AsDnsServerSettings()
        {
            DnsServerSettings settings = new DnsServerSettings();

            settings.Address           = this.Address;
            settings.Port              = this.Port;
            settings.MaxQuestionCount  = this.MaxQuestionCount;
            settings.MaxRequestSize    = this.MaxRequestSize;
            settings.DefaultTTL        = this.DefaultTTL;
            settings.ResolutionMode    = this.ResolutionMode;
            settings.TcpServerSettings = this.TcpServerSettings.AsSocketServerSettings();
            settings.UdpServerSettings = this.UdpServerSettings.AsSocketServerSettings();
            return(settings);
        }
Exemplo n.º 2
0
 public DnsResponder(IDnsStore store, DnsServerSettings settings)
 {
     if (store == null)
     {
         throw new ArgumentNullException("store");
     }
     if (settings == null)
     {
         throw new ArgumentNullException("settings");
     }
     
     m_store = store;
     m_settings = settings;
 }
Exemplo n.º 3
0
        public DnsServerSettings AsDnsServerSettings()
        {
            DnsServerSettings settings = new DnsServerSettings();
            settings.Address = this.Address;
            settings.Port = this.Port;
            settings.MaxQuestionCount = this.MaxQuestionCount;
            settings.MaxRequestSize = this.MaxRequestSize;
            settings.DefaultTTL = this.DefaultTTL;
            settings.ResolutionMode = this.ResolutionMode;
            settings.TcpServerSettings = this.TcpServerSettings.AsSocketServerSettings();
            settings.UdpServerSettings = this.UdpServerSettings.AsSocketServerSettings();
            return settings;

        }
Exemplo n.º 4
0
        public DnsResponder(IDnsStore store, DnsServerSettings settings)
        {
            if (store == null)
            {
                throw new ArgumentNullException("store");
            }
            if (settings == null)
            {
                throw new ArgumentNullException("settings");
            }

            m_store    = store;
            m_settings = settings;
        }
Exemplo n.º 5
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;
        }
Exemplo n.º 6
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;
        }
Exemplo n.º 7
0
 public DnsResponderUDP(IDnsStore store, DnsServerSettings settings)
     : base(store, settings)
 {
     m_server = new DnsUdpServer(this.Settings.Endpoint, this.Settings.UdpServerSettings, this);
 }
Exemplo n.º 8
0
 public DnsResponderTCP(IDnsStore store, DnsServerSettings settings)
     : base(store, settings)
 {
     m_tcpServer = new TcpServer <DnsTcpContext>(this.Settings.Endpoint, this.Settings.TcpServerSettings, this);
 }