Cosmetic edits.
Move recv_chunk() into a stand alone function. Further minimize memory use by using a chunk sized bytearray.
Move variables out of the iterator class and into the generator function. This slightly improves locality of code and data.