Exemple #1
0
        public void run()
        {
            Buffer buf    = new Buffer(300); // ??
            Packet packet = new Packet(buf);

            thread = this;

            try
            {
                while (thread != null)
                {
                    Socket socket = new Socket(ss.AcceptSocket());

                    socket.setTcpNoDelay(true);

                    Stream In  = socket.getInputStream();
                    Stream Out = socket.getOutputStream();

                    ChannelDirectTCPIP channel = new ChannelDirectTCPIP();

                    channel.init();
                    channel.setInputStream(In);
                    channel.setOutputStream(Out);

                    session.addChannel(channel);

                    ((ChannelDirectTCPIP)channel).setHost(host);
                    ((ChannelDirectTCPIP)channel).setPort(rport);
                    ((ChannelDirectTCPIP)channel).setOrgIPAddress(socket.getInetAddress().getHostAddress());
                    ((ChannelDirectTCPIP)channel).setOrgPort(socket.getPort());

                    channel.connect();

                    if (channel.exitstatus != -1)
                    {
                    }
                }
            }
            catch (Exception) { }

            Delete();
        }
Exemple #2
0
        public void run()
        {
            Buffer buf    = new Buffer(300);        // ??
            Packet packet = new Packet(buf);

            thread = this;
            try
            {
                while (thread != null)
                {
                    Socket socket = ss.AcceptSocket();
                    socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.NoDelay, true);
                    Stream             In      = new NetworkStream(socket);
                    Stream             Out     = new NetworkStream(socket);
                    ChannelDirectTCPIP channel = new ChannelDirectTCPIP();
                    channel.init();
                    channel.setInputStream(In);
                    channel.setOutputStream(Out);
                    session.addChannel(channel);
                    ((ChannelDirectTCPIP)channel).setHost(host);
                    ((ChannelDirectTCPIP)channel).setPort(rport);
                    ((ChannelDirectTCPIP)channel).setOrgIPAddress(((IPEndPoint)socket.RemoteEndPoint).Address.ToString());
                    ((ChannelDirectTCPIP)channel).setOrgPort(((IPEndPoint)socket.RemoteEndPoint).Port);
                    channel.connect();
                    if (channel.exitstatus != -1)
                    {
                    }
                }
            }
            catch (Exception)
            {
                //System.out.println("! "+e);
            }

            delete();
        }
		public void run()
		{
			Buffer buf=new Buffer(300); // ??
			Packet packet=new Packet(buf);
			thread=this;
			try
			{
				while(thread!=null)
				{
					Socket socket=ss.accept();
					socket.setTcpNoDelay(true);
					Stream In=socket.getInputStream();
					Stream Out=socket.getOutputStream();
					ChannelDirectTCPIP channel=new ChannelDirectTCPIP();
					channel.init();
					channel.setInputStream(In);
					channel.setOutputStream(Out);
					session.addChannel(channel);
					((ChannelDirectTCPIP)channel).setHost(host);
					((ChannelDirectTCPIP)channel).setPort(rport);
					((ChannelDirectTCPIP)channel).setOrgIPAddress(socket.getInetAddress().getHostAddress());
					((ChannelDirectTCPIP)channel).setOrgPort(socket.getPort());
					channel.connect();
					if(channel.exitstatus!=-1)
					{
					}
				}
			}
			catch(Exception e)
			{
				//System.out.println("! "+e);
			}

			delete();
		}
Exemple #4
0
		public void run()
		{
			Buffer buf=new Buffer(300); // ??
			Packet packet=new Packet(buf);
			thread=this;
			try
			{
				while(thread!=null)
				{
					Socket socket = ss.AcceptSocket();
					socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.NoDelay, true);
					Stream In=new NetworkStream(socket);
					Stream Out=new NetworkStream(socket);
					ChannelDirectTCPIP channel=new ChannelDirectTCPIP();
					channel.init();
					channel.setInputStream(In);
					channel.setOutputStream(Out);
					session.addChannel(channel);
					((ChannelDirectTCPIP)channel).setHost(host);
					((ChannelDirectTCPIP)channel).setPort(rport);
					((ChannelDirectTCPIP)channel).setOrgIPAddress(((IPEndPoint)socket.RemoteEndPoint).Address.ToString());
					((ChannelDirectTCPIP)channel).setOrgPort(((IPEndPoint)socket.RemoteEndPoint).Port);
					channel.connect();
					if(channel.exitstatus!=-1)
					{
					}
				}
			}
			catch(Exception)
			{
				//System.out.println("! "+e);
			}

			delete();
		}