Function obj2buf

  • object to buffer

    Parameters

    • data: any

      object 数据

    • transfer: any

      转换器

    Returns any

    const _protoBuffer = _proto.lookupType('MonitorMessage');
    const bufferData = obj2buf(obj, _protoBuffer);
    console.log(bufferData);
    webSocket.send(bufferData);