hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Potapov <potapo...@gmail.com>
Subject Stale connection check in NHttpConnectionBase and DefaultListeningIOReactor
Date Thu, 05 Jul 2012 18:25:49 GMT
Hello everyone,

I develop streaming HTTP server for my project and used HttpCore NIO
for this purpose.
Interruptible heavy-weight task takes place before streaming start,
so, I'm interesting in any mechanism that provides connection status
check, because I have tons of requests which terminates connection
before I start streaming.
APIs I've already tried:

1. HttpAsyncExchange.setCallback() — doesn't work, cancel() function
of the registered callback was never called. Doesn't matter how
connection was terminated, with RST or FIN.
2. NHttpConnectionBase.isStale() — doesn't work, as it does nothing
but session.isClosed(), which significantly differs from
HttpConnection.isStale() behaviour.
3. NHttpConnectionBase.getSocket().sendUrgentData() — doesn't work, as
IOReactors configures socket with non-blocking mode, and I haven't
found way to change this (most probably this shouldn't be changed).

Is there any other ways I missed? Is there any mechanism (even
expensive one) to check connection status?

P.S. I'm using version 4.2.1.
P.P.S I'm using InputStreamEntity over PipedInputStream for streaming.

Thanks in advance,

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message