예제 #1
0
        internal PortWatcher(Session session,
			string address, int lport,
			string host, int rport,
			ServerSocketFactory factory)
        {
            this.session = session;
            this.lport = lport;
            this.host = host;
            this.rport = rport;
            try
            {
                boundaddress = InetAddress.getByName(address);
                ss = (factory == null) ?
                    new ServerSocket(lport, 0, boundaddress) :
                    factory.createServerSocket(lport, 0, boundaddress);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                throw new JSchException("PortForwardingL: local port " + address + ":" + lport + " cannot be bound.");
            }
        }
예제 #2
0
 public ServerSocket(int port, int arg, InetAddress addr)
     : base(addr.IPAddress, port)
 {
     Start();
 }
예제 #3
0
 public bool equals(InetAddress addr)
 {
     return addr.ToString().Equals(addr.ToString());
 }