def feed(self, data):
        """
        Add new incoming data to buffer and try to process
        """
        self.buffer += data
        while len(self.buffer) >= 6:
            self.next_packet()
def feed ( self , data ) : self . buffer += data while len ( self . buffer ) >= 6 : self . next_packet ( )
Add new incoming data to buffer and try to process