http connection time out

Hi all,

in my application i send a request to a server and then wait for the response and once i get the response i process it. in a case where any exception occurs at the server side and i don't receive a response back, my application hangs at the

httpConnection.openInputStream();

i want to give a time out for the connection ie, if the application does not recieve any response within the specified time i want to close the connection. What can i do for that?

please help.

[510 byte] By [bindiamariama] at [2007-11-27 9:12:29]
# 1
check out thishttps://www6.software.ibm.com/developerworks/education/wi-threads/section2.htmlbut you must be registered at IBM (it's free)
suparenoa at 2007-7-12 21:59:02 > top of Java-index,Java Mobility Forums,Java ME Technologies...