On Fri, 2007-11-16 at 06:29 -0800, tjmcsorley wrote: 
> I've taken the example code in NHTTPClient.java and modified only the TCP
> port refereneced on the 3 requests that are made to port 80... I changed the
> port to 1080 instead... so that the Connection attempt will fail since
> nobody is listening on this port at the server the request is sent to...
> 
> I expect the connectionTimeout() method in the EventLogger class to be
> called in 10000ms... but it appears to never be called...  Am I missing
> something?  Should this be called in 10 seconds when the connection attempt
> fails?
> 

Hi Tom,

No, it should not. The I/O reactor fires events on the IOEventDispatch
interface [1] for _established_ connections only (as it needs to pass
the connection that caused the event as a parameter). 

If you want to be notified about events for connection _requests_ you
should be using SessionRequestCallback interface [2]

Hope this helps

Oleg

[1]
http://jakarta.apache.org/httpcomponents/httpcomponents-core/httpcore-nio/apidocs/org/apache/http/nio/reactor/IOEventDispatch.html
[2]
http://jakarta.apache.org/httpcomponents/httpcomponents-core/httpcore-nio/apidocs/org/apache/http/nio/reactor/SessionRequestCallback.html


> Thanks,
> 
> - tom
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to