Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BaseListener"/> class.
        /// </summary>
        /// <param name="port">The port to use on this listener.</param>
        /// <param name="protocol">The protocol to use in this listener.</param>
        /// <param name="dosDefender">A reference to the DoS defender service implementation.</param>
        protected BaseListener(int port, IProtocol protocol, IDoSDefender dosDefender)
            : base(IPAddress.Any, port)
        {
            protocol.ThrowIfNull(nameof(protocol));
            dosDefender.ThrowIfNull(nameof(dosDefender));

            this.protocol = protocol;
            this.defender = dosDefender;
        }