Longtime (10+ years) C++ programmer here, just getting into protocol-based wx classes.
Some info:
- Windows XP SP2
- app will eventually be used in Linux and Mac OS X
- wxWidgets version is 2.6.3 installed from wxPack (had problems getting a wx build environment set up, so opted for the simpler install)
- haven't tried the below code on other OS in order to see if I could duplicate these problems
- I'm not running firewall or antivirus software; none have been installed on this desktop
- Desktop PC connects to the internet via an iptables firewall running on Ubuntu 6.10, which permits NAT'd outbound connections (which incidentally work fine )
I've been trying to download a HTML file from my webserver for parsing, and it seems anytime I use a wx class which touches the network, the application halts, and the CPU hangs at around 99%.
I followed the documented wxFTP tutorial, using the following code to make a connection to my FTP server ...
Code: Select all
wxFTP ftp;
ftp.SetUser(_("user"));
ftp.SetPassword(_("pass"));
if (ftp.Connect(_("host.com")))
{
ftp.Close();
}
I also tried making a HTTP connection, as follows ...
Code: Select all
wxURL url(_("http://someurl.com/index.html"));
url.GetInputStream();
I've tried using fully qualified domain names as well as IP addresses, so I know the problem is not with DNS. I haven't really tested much to see if there's a timeout period which is not being reached for whatever reason (though I have let the app hang for about a minute, it doesn't return).
Not sure what to do at this point; could there be something broken internally on my system?