Options
All
  • Public
  • Public/Protected
  • All
Menu

接口继承自ISocket, 通过STOMP协议进行消息交换, 使用stompjs库覆盖WebSocket。

Hierarchy

Implemented by

Index

Properties

signalDestinations

signalDestinations: StompSocketDestinations

state

实例的连接状态

Methods

close

  • close(code: number, reason?: string): Promise<void>
  • 关闭连接

    Parameters

    • code: number
    • Optional reason: string

    Returns Promise<void>

send

  • 发送消息, 传入的非字符串类型将会通过{@link JSON.stringify}转化为JSON字符串.

    Parameters

    Returns Promise<void>

sendTo

  • 集成 stompjs , 可指定消息发送的地址.

    Parameters

    Returns Promise<void>

Generated using TypeDoc