You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by webtekie <we...@gmail.com> on 2006/08/03 18:37:47 UTC

simulating connection timeout

Hello,

So with very helpful people from this mailing list I was able to
successfully implement HttpClient. I do checking for connection timeout, but
how can I actually "create" or mimic timeout on the server?

thanks,
webtekie

Re: simulating connection timeout

Posted by Roland Weber <ht...@dubioso.net>.
webtekie wrote:
> I do checking for connection timeout, but
> how can I actually "create" or mimic timeout on the server?

Implement a server that doesn't accept the connection.
java.net.ServerSocket is not that tricky to use, especially
if you're not accepting connections in the first place :-)

There is a simple minimal HTTP server in the test classes
for HttpClient, and another one in HttpComponents HttpCore.
You could patch that code to not accept some connections,
but serve other requests.

hope that helps,
  Roland


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org