Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public interface WebSocket.CloseHandler

Handler for the close event.

Methods

public abstract void onClose(WebSocket ws, int statusCode, String reason)Called once when the connection closes.

Method details

onClose

public abstract void onClose(WebSocket ws, int statusCode, String reason)
Called once when the connection closes.

Parameters

ws WebSocket
the socket that closed
statusCode int
the RFC 6455 close status code (1000 = normal, etc.)
reason String
the human-readable reason, or empty string