diff options
| author | Spiros Eliopoulos <seliopou@gmail.com> | 2012-11-01 11:28:11 -0400 |
|---|---|---|
| committer | Spiros Eliopoulos <seliopou@gmail.com> | 2012-11-01 11:29:33 -0400 |
| commit | d025d908821f60423fd4ad20f04500f3a289783a (patch) | |
| tree | 7dd3c4108659a73d595016fbfe744ce767689b03 | |
| parent | 30233a5a995e23b72319598d11ebba084497a18b (diff) | |
| download | msgpack-python-d025d908821f60423fd4ad20f04500f3a289783a.tar.gz | |
Put Unpacker read loop back into buffer read loop
So it works for streaming as intended.
| -rw-r--r-- | README.rst | 8 |
1 files changed, 4 insertions, 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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
