onWsClosed method
Invoked when both peers have indicated that no more messages will be transmitted and the connection has been successfully released. No further send/receive calls is possible. All resources like WebSocketConnection should be released after this.
Implementation
@override
void onWsClosed(int code, String reason) {
_onWsClosed(code, reason);
}