Archived Forum Post

Index of archived forum posts

Question:

SSH Tunnel with Dynamic Port Forwarding - C++

Apr 01 '16 at 18:33

Using 9.5.0.56-x86-vc9 lib, registered an account from create.sshgoogle.com and tried the above-mentioned example code.

The problem is :

const char *html = http.quickGetStr(url); // <== Intermittently successful ???

if (html == 0 ) { // debug run breakpoint till here, success rate is very low
    std::cout << http.lastErrorText() << "\r\n";
    return;
}

If I did a debug stepping mode, the success rate is higher.

If I did a debug run to breakpoint, the success rate is very low.

Furthermore, I create a loop, out of 10 run, 3-4 times unsuccessful :

for (i=0;i<10;i++)

{

     const char *html = http.quickGetStr(url); // <== Intermittently successful ???

     if (html == 0 ) { // debug run breakpoint till here, success rate is very low
        failcount++;
     }

}

failcount can be 3 or 4 or more.

you can registered an account to verify it.

Thanks.