Hi, On Fri, Jun 3, 2016 at 3:36 PM, Pavel Rappo <[email protected]> wrote: > The implication is that you won't be able to do this (for example): > > void onClose(WebSocket webSocket, int statusCode, String reason) { > webSocket.sendClose(statusCode, reason); > } > > Just because the received statusCode might be one of the special ones.
The implementation should reply to a Close frame with a Close frame with the same code. Applications do not need to call sendClose() from within onClose(). In the case above, if the status code is - say - 1002, I would fail the CS returned by sendClose() and be done with it. But onClose() should return a CS, or you decided not to ? If so, can you detail why, FTR ? Thanks ! -- Simone Bordet http://bordet.blogspot.com --- Finally, no matter how good the architecture and design are, to deliver bug-free software with optimal performance and reliability, the implementation technique must be flawless. Victoria Livschitz
