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

    类型别名 UtsTcpClientMessage

    TCP客户端发送的消息实体

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

    属性

    connectionId: string

    TCP客户端链接的唯一标识

    dataType: string

    数据类型

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

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

    byteData?: number[]

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