[undertow-dev] Handling termination of WebSocket connection

Stuart Douglas sdouglas at redhat.com
Mon Oct 20 19:08:54 EDT 2014


WebsocketChannel.addCloseTask() should do what you are after (this is actually provided by the base AbstractFramedChannel class).

Stuart

----- Original Message -----
> From: "Vladimir Tsukur" <flushdia at gmail.com>
> To: undertow-dev at 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 at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/undertow-dev


More information about the undertow-dev mailing list