Hi NickKovach and Peter!
After fighting several weeks with TCP/UDP connections, in a real test I noticed that my MIDlet didn't connect to a ServerSocket that was running in a Servlet in a remote PC. The URL was perfect: "socket://host

ort" and the "host" and "port" values were correctly too.
My problem was that the implementation noticed that the phone didn't have a real connection established at the same time that the socket was open! Finally, the code threw an Exception because the socket connection wasn't really open. If the Exception is thrown, no more attempts to open the socket are made!

I used a WLAN connection and it took one minute or two until getting the connection!
To sum up: You need to use a "loop" where you try to connect to your particular server socket (with the correct URL) and repeat this operation until you get it! If an Exception occurs, close the connections. Don't forget to close the connections previously to reopen them!
One of these attempts will work your socket connection!
I hope this explanation would be useful for you!
Summerman.

--