login about faq

-Start Port Forward:

tunnel.BeginAccepting(1080);

-Run Browser use proxy: 127.0.0.1:1080.

-After page load tunnel port forward stop. How to continue port forward until i stop it?

asked Jan 31 at 03:34

pikeman20's gravatar image

pikeman20
11

edited Jan 31 at 03:35


What programming language, operating system, etc. (32-bit/64-bit, .NET Framework version, Visual Studio version etc..) do you use? There is a fix that may solve the problem.

link

answered Jan 31 at 14:56

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

My programming language is C# 32bit, NetFrame v4.0

link

answered Jan 31 at 18:10

pikeman20's gravatar image

pikeman20
11

edited Jan 31 at 18:21

link

answered Jan 31 at 19:27

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Can you show me how to use BeginAcceptingAsync. It's always stop after run. My code

        Chilkat.Task task = tunnel.BeginAcceptingAsync(1080);
        success = task.Run();
link

answered Feb 01 at 06:31

pikeman20's gravatar image

pikeman20
11

BeginAccepting starts a background thread to begin listening and servicing incoming connections. A process is composed of threads. If your program starts the background "accept" thread, and then exits, this means the entire process is exiting -- including all threads.

Your program would need to keep running, even if in a simple infinite loop:

while (true)
{
    Sleep(100);
    }
    

link

answered Feb 01 at 08:26

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

My Thread not stop. After BeginAcceptingAsync

While(!task.Finished) { Sleep(100); }

link

answered Feb 01 at 08:49

pikeman20's gravatar image

pikeman20
11

I'm not finding any problem. Here's my test code:

            Chilkat.SshTunnel tunnel = new Chilkat.SshTunnel();

        Chilkat.Task task = tunnel.BeginAcceptingAsync(1080);
        if (task == null)
            {
            textBox2.Text = tunnel.LastErrorText;
            return;
            }

        bool success = task.Run();
        if (success != true)
            {
            textBox2.Text = task.LastErrorText;

            return;
            }

        while (task.Finished != true)
            {
            task.SleepMs(100);
            }

        textBox2.Text = "Task Finished!";
link

answered Feb 01 at 09:14

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Still not work :(. Chilkat Dll version is 9.5.0.56 ?

Check this: link text

link

answered Feb 01 at 10:22

pikeman20's gravatar image

pikeman20
11

edited Feb 01 at 10:58

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×24

Asked: Jan 31 at 03:34

Seen: 680 times

Last updated: Feb 01 at 10:58

powered by OSQA