Interface WebSocket.CloseHandler

Enclosing class:
WebSocket

public static interface WebSocket.CloseHandler
Handler for the close event.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onClose(WebSocket ws, int statusCode, String reason)
    Called once when the connection closes.
  • Method Details

    • onClose

      void onClose(WebSocket ws, int statusCode, String reason)
      Called once when the connection closes.
      Parameters:
      ws - the socket that closed
      statusCode - the RFC 6455 close status code (1000 = normal, etc.)
      reason - the human-readable reason, or empty string