Interface ReverseWebsocketAdapter

提供基于 websocket client 的接口

interface ReverseWebsocketAdapter {
    destinations: {
        extraHeaders?: Record<string, string>;
        extraParameters?: Record<string, string>;
        host: string;
        method: string;
        path: string;
        port: number;
        protocol: ("ws" | "wss")[];
    };
    extraHeaders?: Record<string, string>;
    extraParameters?: Record<string, string>;
    reservedSyncId?: string;
}

Properties

destinations: {
    extraHeaders?: Record<string, string>;
    extraParameters?: Record<string, string>;
    host: string;
    method: string;
    path: string;
    port: number;
    protocol: ("ws" | "wss")[];
}

远端 server host

Type declaration

  • Optional extraHeaders?: Record<string, string>

    额外请求头,该连接有效

  • Optional extraParameters?: Record<string, string>

    额外参数,该连接有效

  • host: string
  • method: string

    请求方式,通常为 GET

  • path: string

    请求路径

  • port: number
  • protocol: ("ws" | "wss")[]

    协议

extraHeaders?: Record<string, string>

额外请求头,全 client 有效; 会被具体 destination 中的覆盖

extraParameters?: Record<string, string>

额外请求参数,全 client 有效; 会被具体 destination 中的覆盖

reservedSyncId?: string

websocket 用于消息同步的字段为 syncId, 一般值为请求时的原值,用于同步一次请求与响应 对于由 websocket client 主动发出的通知, 固定使用一个 syncId, 默认为 ”-1“

Generated using TypeDoc