Exemplo n.º 1
0
        /// <summary>
        /// Initialize new instance of the type
        /// </summary>
        /// <param name="address">The IP Address to listen on</param>
        /// <param name="port">The port number to listen on all IPv4 endpoints</param>
        /// <param name="processedHandler">The handler that is invoked when a connection is received</param>
        /// <param name="receivedHandler">The handler that is invoked when a connection is processed successfully</param>
        public TcpProbeEndpoint(IPAddress address, ushort port, ProbeReceivedHandler receivedHandler, ProbeProcessedHandler processedHandler)
        {
            Guard.NotLessThan(nameof(port), port, 1);

            _address          = address;
            _port             = port;
            _receivedHandler  = receivedHandler;
            _processedHandler = processedHandler;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initialize new instance of the type
 /// </summary>
 /// <param name="port">The port number to listen on all IPv4 endpoints</param>
 /// <param name="processedHandler">The handler that is invoked when a connection is received</param>
 /// <param name="receivedHandler">The handler that is invoked when a connection is processed successfully</param>
 public TcpProbeEndpoint(ushort port, ProbeReceivedHandler receivedHandler, ProbeProcessedHandler processedHandler) : this(IPAddress.Any, port, receivedHandler, processedHandler)
 {
 }