I have a standalone Java program which uses sockets to get some data. The program should be able to recover from the communication medium (modem, LAN etc) failing or from the other end stopping for some reason. The program loops waiting for the other end or the communication medium to be reestablished. Now, all this works fine IF the communications medium - in my case the modem connection, is up to start with. If then, it fails, then error recovery works fine. If the communication connection is DOWN to start with, then the socket connection never establishes. I would appreciate any help. Following are some code snippets: s = new Socket( host, port ); out = [login to view URL](); in = [login to view URL](); inCmd = new DataInputStream(in); [login to view URL](); [login to view URL](); [login to view URL](); [login to view URL](); [login to view URL](); [login to view URL]();
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Complete ownership and distribution copyrights to all work purchased.
## Platform
Windows Linux