Hi,
I'm trying for days now to get the socket example to work on the emulator and allways get "connection failed (-34)".
I'm able to connect to www.google.com using the services on the emulator.
Pleassssssssssssssse, help me on this.
Thanks, nmnir
Hi,
I'm trying for days now to get the socket example to work on the emulator and allways get "connection failed (-34)".
I'm able to connect to www.google.com using the services on the emulator.
Pleassssssssssssssse, help me on this.
Thanks, nmnir
Then that means you might be connecting to something invalid.... This is my first impression about this.
Thanks Ryan,
It seems that you are right, that example may not work on the emulator.
Nahum.
I don't have source code for that socket example but I guess it's trying to open some simple TCP connection to specified destination. Is it also doing some domain name resolution for the destination name (using RHostResolver)? Or does it support only plain ip addresses?
Services application is most probably connecting to www.google.com by using HTTP protocol. There could be even firewall running on your computer which allows such HTTP communication (normally TCP to port 80) but not TCP to some different port (which could be case when using the example).
One good way to test the socket example could be running some simple TCP server on your local machine and connecting it with emulator's sockets example. You could code a TCP server listening for incoming connections very easily with Perl. Or you can pick up ready made code from Internet: http://www.rocketaware.com/perl/perl..._IO_Socket.htm