TCP插件API文档(Uniapp)
    正在准备搜索索引...

    类型别名 UtsClientUnicastMessage

    给客户端发送的消息。

    type UtsClientUnicastMessage = {
        sessionId: string;
        dataType: string;
        data?: string;
        byteData?: number[];
    }
    索引

    属性

    sessionId: string

    客户端会话ID,唯一标识

    dataType: string

    数据类型

    • text : 文本,使用UTF-8编码
    • hex : 十六进制HEX字符串格式
    • byte : byte数组
    data?: string

    字符串数据,当dataType为texthex类型的时候使用

    byteData?: number[]

    byte数组数据,当dataType为byte类型的时候使用