ConnectionStatistics will allow you to get stats on Connections, but doesn't keep a list of them. https://www.eclipse.org/jetty/javadoc/jetty-10/org/eclipse/jetty/io/ConnectionStatistics.html
Or you could implement your own Connection.Listener. On Thu, Oct 13, 2022 at 12:45 PM Dung Nguyen <[email protected]> wrote: > Thanks for that information, any idea how to list all connections (and > count them)? > > Vào Th 4, 12 thg 10, 2022 vào lúc 10:50 Lachlan Roberts < > [email protected]> đã viết: > >> You should be able to use sendError(-1) which will immediately abort the >> HttpChannel and close the connection/stream. >> >> see >> https://www.eclipse.org/jetty/javadoc/jetty-10/org/eclipse/jetty/server/Response.html#sendError(int,java.lang.String) >> >> On Wed, Oct 12, 2022 at 12:13 PM Dung Nguyen <[email protected]> >> wrote: >> >>> Connection : close doesn't solve the problem. >>> >>> Vào Th 4, 12 thg 10, 2022 vào lúc 05:00 Greg Wilkins < >>> [email protected]> đã viết: >>> >>>> >>>> >>>> On Wed, 12 Oct 2022 at 05:13, Simone Bordet <[email protected]> >>>> wrote: >>>> >>>>> For other protocols such as HTTP/2 or HTTP/3, adding the `Connection: >>>>> close` header will have no effect. >>>>> >>>> >>>> Thinking out loud here... >>>> >>>> Whilst there is no requirement to close a HTTP/2 or HTTP/3 connection >>>> when a "Connection: close" header is seen, I wonder if we could perhaps use >>>> that as a hint to shutdown the connection (well reduce the number of >>>> streams to 0 and let other streams complete and then close). This would >>>> be useful in graceful shutdown scenarios... but perhaps the header is the >>>> wrong way to signal that? >>>> >>>> -- >>>> Greg Wilkins <[email protected]> CTO http://webtide.com >>>> _______________________________________________ >>>> jetty-users mailing list >>>> [email protected] >>>> To unsubscribe from this list, visit >>>> https://www.eclipse.org/mailman/listinfo/jetty-users >>>> >>> _______________________________________________ >>> jetty-users mailing list >>> [email protected] >>> To unsubscribe from this list, visit >>> https://www.eclipse.org/mailman/listinfo/jetty-users >>> >> _______________________________________________ >> jetty-users mailing list >> [email protected] >> To unsubscribe from this list, visit >> https://www.eclipse.org/mailman/listinfo/jetty-users >> > _______________________________________________ > jetty-users mailing list > [email protected] > To unsubscribe from this list, visit > https://www.eclipse.org/mailman/listinfo/jetty-users >
_______________________________________________ jetty-users mailing list [email protected] To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-users
