Closed lifeofguenter closed 4 years ago
in python you can do something like this:
unpacker = Unpacker() while True: buf = sock.recv(1024**2) if not buf: break unpacker.feed(buf) for o in unpacker: process(o)
in c, you can do something similar: https://github.com/msgpack/msgpack-c/blob/master/example/c/lib_buffer_unpack.c#L71
ruby also has something similar.
How do I do it with this package though? E.g. I am receiving a constant stream of msgpack over the wire - how can I "feed" it into the decoder and loop through the results?
resolved :)
in python you can do something like this:
in c, you can do something similar: https://github.com/msgpack/msgpack-c/blob/master/example/c/lib_buffer_unpack.c#L71
ruby also has something similar.
How do I do it with this package though? E.g. I am receiving a constant stream of msgpack over the wire - how can I "feed" it into the decoder and loop through the results?