WebSocket connection close handler

414 views
Skip to first unread message

Phil T.

unread,
Aug 30, 2012, 9:14:46 AM8/30/12
to ve...@googlegroups.com
Hello everybody!

Does vert.x provide an onClose() handler for WebSocket connections?

According to the docs I can react on new connections and on data the client has sent (ws.dataHandler).

But can I also execute some logic when the connection is closed?


Thanks in advance!

Bye,
Phil

Randall Richard

unread,
Aug 30, 2012, 9:59:06 AM8/30/12
to ve...@googlegroups.com
Implement a ws.endHandler().  That should fire on the server when the connection closes.

-Randall


--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/vertx/-/45PS9xDxxUsJ.
To post to this group, send an email to ve...@googlegroups.com.
To unsubscribe from this group, send email to vertx+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/vertx?hl=en-GB.

Phil T.

unread,
Aug 30, 2012, 3:20:31 PM8/30/12
to ve...@googlegroups.com
Thank you! This was exactly what I was looking for. :-)

Bye,
Phil
Reply all
Reply to author
Forward
0 new messages