Question:
-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?
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.
My programming language is C# 32bit, NetFrame v4.0
Please try this new build:
32-bit Download: http://www.chilkatsoft.com/download/preRelease/ChilkatDotNet4-9.5.0-win32.zip
64-bit Download: http://www.chilkatsoft.com/download/preRelease/ChilkatDotNet4-9.5.0-x64.zip
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();
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); }
My Thread not stop. After BeginAcceptingAsync
While(!task.Finished) { Sleep(100); }
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!";