Provides data for Renci.SshNet.ForwardedPort.RequestReceived event.
Inheritance: System.EventArgs
Exemplo n.º 1
0
        public void ConstructorShouldNotThrowExceptionWhenHostIsInvalidDnsName()
        {
            const string host = "in_valid_host.";

            var eventArgs = new PortForwardEventArgs(host, 80);

            Assert.AreSame(host, eventArgs.OriginatorHost);
        }
Exemplo n.º 2
0
        public void ConstructorShouldNotThrowExceptionWhenHostIsEmpty()
        {
            var host = string.Empty;

            var eventArgs = new PortForwardEventArgs(host, 80);

            Assert.AreSame(host, eventArgs.OriginatorHost);
        }
 public void Test_PortForwardEventArgs_Host_Null()
 {
     var args = new PortForwardEventArgs(null, 80);
 }
 public void Test_PortForwardEventArgs_Host_Empty()
 {
     var args = new PortForwardEventArgs(string.Empty, 80);
 }
 public void Test_PortForwardEventArgs_Port_Invalid()
 {
     var args = new PortForwardEventArgs("string", IPEndPoint.MaxPort + 1);
 }
Exemplo n.º 6
0
 /// <summary>
 /// Handle some tunnel request.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void port_RequestReceived(object sender, PortForwardEventArgs e)
 {
     // We could keep a record of connections
 }