Closed alexanderwwagner closed 1 year ago
Hey @alexanderwwagner ZMessages are made up of one or more ZFrames, which in turn are UInt8Lists containing the payload. To turn the payload back into a string use UTF8.decode(message.first.payload)
. For further info just take a look at the code documentation 🙂
Hey enwi,
UTF8.decode(message.first.payload)
works, thank you! But can you specify which code documentation you mean?
I have not found any example or something else to get it working... Maybe I searched on the wrong place...
Glad that it works 🙂
I meant the code itself. All classes and functions should be documented inside the code base.
Question At the moment I try to use your library for a pub/sub setup. I try to get string messages of my python publisher. If I try to write a subscriber with your dart library I have problems to get out the message as string. I tried your provided example too. But there I have the same problem... I do not get the string message, instead of a string I get some ZFrame... Can you help me with my problem? (Look at "To Reproduce") Thank you!
Setup with python publisher and subscriber: Publisher:
Subscriber:
Environment OS: Archlinux 6.0.12-arch1-1 Android x86 emulator: Pixel 5 API 30 flutter: 3.3.9 compileSdkVersion 33 ndkVersion flutter.ndkVersion
To Reproduce Subscriber with dart:
Output:
I/flutter (31175): ZMessage[ZFrame[[77, 76, 32, 104, 101, 108, 108, 111]]]