mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-06 09:50:01 +00:00
Put Unpacker read loop back into buffer read loop
So it works for streaming as intended.
This commit is contained in:
parent
30233a5a99
commit
d025d90882
1 changed files with 4 additions and 4 deletions
|
|
@ -52,15 +52,15 @@ stream.
|
|||
|
||||
buf.seek(0)
|
||||
|
||||
unpacker = msgpack.Unpacker()
|
||||
while True:
|
||||
unpacker = msgpack.Unpacker()
|
||||
while True:
|
||||
data = buf.read(16)
|
||||
if not data:
|
||||
break
|
||||
unpacker.feed(data)
|
||||
|
||||
for unpacked in unpacker:
|
||||
print unpacked
|
||||
for unpacked in unpacker:
|
||||
print unpacked
|
||||
|
||||
packing/unpacking of custom data type
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue