WebsocketChannel.addCloseTask() should do what you are after (this is actually provided by
the base AbstractFramedChannel class).
Stuart
----- Original Message -----
From: "Vladimir Tsukur" <flushdia(a)gmail.com>
To: undertow-dev(a)lists.jboss.org
Sent: Tuesday, 21 October, 2014 7:20:54 AM
Subject: [undertow-dev] Handling termination of WebSocket connection
Let's imagine user closed browser tab and thus terminated WebSocket
connection. Is there any way to run a callback method on the server-side to
handle this case?
The requirement is to perform necessary cleanup actions when connection is
closed, regardless of the type of disconnect (normal, forced termination,
etc.).
(Ideally using lower level API, and not JSR 356)
--
Vladimir Tsukur
Software Architect, Design Engineer
_______________________________________________
undertow-dev mailing list
undertow-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/undertow-dev