On 12 February 2015 at 08:10, Shing Wai Chan <shing.wai.chan_at_oracle.com>
wrote:
> From javadoc of #destroy, we have
> It is called when the client is disconnected.
>
But what does that mean for half closed connections and how does it relate
to async IO callbacks?
If the inputstream reads -1 or allDataRead is called, does that mean
destroy is called after that callback?
or does it wait for a close on the outputstream?
Ditto for closing the outputstream, do we wait until -1 is read before
destroy?
What if the protocol wants to force a destroy - is that done on a close of
the inputstream before -1 is read?
There is no need to start async for the case of upgrade.
> NIO will work for upgrade.
>
Ah so the setListener is used for determining async.
If somebody does call startAsync AND upgrade is that an ISE? or do we wait
for complete before calling destroy?
cheers
> Shing Wai Chan
>
>
> On 2/10/15, 9:08 PM, Greg Wilkins wrote:
>
>
>
> All,
>
> Jetty currently doesn't implement the standard upgrade mechanism and I'm
> currently looking to fix that. The spec says:
>
> When the upgrade processing is done, HttpUpgradeHandler.destroy will be
> invoked.
>
> What does "is done" mean? Does it mean both input and output streams
> have been closed?
>
> I also note that the spec says async IO can be used, so I assume that
> means that startAsync must be called before returning after the
> request.upgrade call?
>
> thanks
>
> --
> Greg Wilkins <gregw_at_intalio.com> @ Webtide - *an Intalio subsidiary*
> http://eclipse.org/jetty HTTP, SPDY, Websocket server and client that
> scales
> http://www.webtide.com advice and support for jetty and cometd.
>
>
--
Greg Wilkins <gregw_at_intalio.com> @ Webtide - *an Intalio subsidiary*
http://eclipse.org/jetty HTTP, SPDY, Websocket server and client that scales
http://www.webtide.com advice and support for jetty and cometd.