OK now for some reason the SessionRequestCallback object is working, and I was able to fix the problem.

Csaba


On 03/18/2010 11:58 AM, Gajo Csaba wrote:
Hello,

I was suing the asynchronous client example from [1] to write a simple client. The problem is, when the server is not online, the connection just halts and waits, due to the CountDownLatch. I thought that the SessionRequestCallback object was supposed to deal with this? However, when I try to connect, the completed() method immediately returns success is true, and I'm left hanging. The failed() method is never invoked. Why is that?

Basically, what I want to do is, if the server is not available, to just print out some message. How to do that?

Thanks, Csaba

[1] - http://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to