M
Marcelo
Dear programmers,
I have some trouble while doing a connection with a java application to
a web server. I would like to limit the time of the opening connection
when there is reception bytes (the server allows connection, but there
is no information)
Actually, in my code, the application stands for ever when I ask for
information from the remote url.
How can I fix this connection problem? Is there a way to limit the time
of the first stablished connection?
thanks a lot
Marcelo
part of the code,
urlObject = new URL(url);
URLConnection con = urlObject.openConnection();
//The problem is in this line
//The application waits here un indeterminated time...
int length = con.getContentLength();
I have some trouble while doing a connection with a java application to
a web server. I would like to limit the time of the opening connection
when there is reception bytes (the server allows connection, but there
is no information)
Actually, in my code, the application stands for ever when I ask for
information from the remote url.
How can I fix this connection problem? Is there a way to limit the time
of the first stablished connection?
thanks a lot
Marcelo
part of the code,
urlObject = new URL(url);
URLConnection con = urlObject.openConnection();
//The problem is in this line
//The application waits here un indeterminated time...
int length = con.getContentLength();