nerses
04/24/2020, 4:44 PMtypedef struct rd_kafka_message_s {
...
void *payload; /**< Producer: original message payload.
* Consumer: Depends on the value of \c err :
* - \c err==0: Message payload.
* - \c err!=0: Error string */
size_t len; /**< Depends on the value of \c err :
* - \c err==0: Message payload length
* - \c err!=0: Error string length */
...
} rd_kafka_message_t;
I am struggling to figure out how to read the payload to a bytearray from Kotlin
the interop binding gives me
public final var payload: kotlinx.cinterop.COpaquePointer? /* = kotlinx.cinterop.CPointer<out kotlinx.cinterop.CPointed>? */
public final var len: platform.posix.size_t /* = kotlin.ULong */
Dominaezzz
04/24/2020, 4:55 PMCPointer<Byte>
. Then index it like you would an array.nerses
04/24/2020, 4:57 PM.reinterpret<ByteVar>()
?Dominaezzz
04/24/2020, 5:04 PM