Closed
Description
The docstring for processIncomingFrame
still documents the old callback-based interface.
Also, looking at that code it seems that there is no way _processIncomingFrame
could ever return a (nbytes>0, None)
tuple. Thus the split between process…
and _process…
is outdated and should be reverted.
Also I'd like to propose adding a usage example to the docstring, along the lines of
buffer = bytearray()
while True:
more = read_more_data()
if not more:
break
buffer += more
while True:
used,pdu = decoder.processIncomingFrame(buffer)
del buffer[:used]
if pdu is None:
break
process(pdu)
Metadata
Metadata
Assignees
Labels
No labels