View Single Post
  (#3 (permalink)) Old
ad64105 ad64105 is offline
Member
 
Posts: 5
Thanks: 0
Thanked 1 Time in 1 Post
Join Date: Jun 2008
Default 06-16-2008, 06:10 PM

Hi ya

as micro_lecnuj says, the server is waiting for you to send something to it. Because its HTTP, you need to send a GET message to get the page.

Two things you should do are:
1. set the timeout on the socket (setsoTimeout) so that the socket will timeout if the server doesn't send anything (so that the code doesn't hang if you have a comms prombem)
2. get hold of the the output stream from the socket and send a string like "GET /X" remember to add a blank line at the end of the response.

Hope that this helps

Andy
Reply With Quote