接口 BaseWebSocketHandler


public interface BaseWebSocketHandler
BaseWebSocketHandler 基本接口 请与 ScxWebSocketRoute 配合使用
版本:
1.0.10
作者:
scx567888
  • 方法概要

    修饰符和类型
    方法
    说明
    default void
    onBinaryMessage(io.vertx.core.buffer.Buffer binaryData, io.vertx.core.http.WebSocketFrame frame, io.vertx.core.http.ServerWebSocket webSocket, OnFrameRoutingContext context)
    发送 二进制数据 时
    default void
    onClose(io.vertx.core.http.ServerWebSocket webSocket, OnCloseRoutingContext context)
    连接 关闭 时
    default void
    onError(Throwable event, io.vertx.core.http.ServerWebSocket webSocket, OnExceptionRoutingContext context)
    连接 错误 时
    default void
    onOpen(io.vertx.core.http.ServerWebSocket webSocket, OnOpenRoutingContext context)
    连接 打开 时
    default void
    onTextMessage(String textData, io.vertx.core.http.WebSocketFrame frame, io.vertx.core.http.ServerWebSocket webSocket, OnFrameRoutingContext context)
    发送 文本数据 时
  • 方法详细资料

    • onOpen

      default void onOpen(io.vertx.core.http.ServerWebSocket webSocket, OnOpenRoutingContext context) throws Exception
      连接 打开 时
      参数:
      webSocket - ServerWebSocket 连接对象
      context - s
      抛出:
      Exception - e
    • onTextMessage

      default void onTextMessage(String textData, io.vertx.core.http.WebSocketFrame frame, io.vertx.core.http.ServerWebSocket webSocket, OnFrameRoutingContext context) throws Exception
      发送 文本数据 时
      参数:
      textData - 文本数据
      frame - 帧对象
      webSocket - ServerWebSocket 连接对象
      context - a
      抛出:
      Exception - e
    • onBinaryMessage

      default void onBinaryMessage(io.vertx.core.buffer.Buffer binaryData, io.vertx.core.http.WebSocketFrame frame, io.vertx.core.http.ServerWebSocket webSocket, OnFrameRoutingContext context) throws Exception
      发送 二进制数据 时
      参数:
      binaryData - 二进制数据
      frame - 帧对象
      webSocket - ServerWebSocket 连接对象
      context - a
      抛出:
      Exception - e
    • onClose

      default void onClose(io.vertx.core.http.ServerWebSocket webSocket, OnCloseRoutingContext context) throws Exception
      连接 关闭 时
      参数:
      webSocket - ServerWebSocket 连接对象
      context - a
      抛出:
      Exception - e
    • onError

      default void onError(Throwable event, io.vertx.core.http.ServerWebSocket webSocket, OnExceptionRoutingContext context) throws Exception
      连接 错误 时
      参数:
      event - 发生的错误
      webSocket - ServerWebSocket 连接对象
      context - s
      抛出:
      Exception - e