code: protected void onClose(final int closeCode, final String reason) {
          postCloseEvent(WebSocketCloseCode.getByCodeOrElse(closeCode, WebSocketCloseCode.ABNORMAL), reason);
      }
docs: Invoked by native listener.
  
  @param closeCode see {@link WebSocketCloseCode}.
  @param reason optional closing reason.