#NEWLINE# def _read( self , data ) : #NEWLINE# #INDENT# while data : #NEWLINE# #INDENT# ( length , ) = struct . unpack ( '<H' , data [ 2 : 4 ] ) #NEWLINE# if length : #NEWLINE# #INDENT# pkt = data [ 0 : ( length + 4 ) ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# pkt = '' #NEWLINE# #UNINDENT# data = data [ ( length + 4 ) : ] #NEWLINE# ( yield pkt )