def data_received(self, data):
self._received_data += data<EOL>h_size = RTheader.size<EOL>data = self._received_data<EOL>size, type_ = RTheader.unpack_from(data, <NUM_LIT:0>)<EOL>while len(data) >= size:<EOL><INDENT>self._parse_received(data[h_size:size], type_)<EOL>data = data[size:]<EOL>if len(data) < h_size:<EOL><INDENT>break<EOL><DEDENT>size, type_ = RTheader.unpack_from(data, <NUM_LIT:0>)<EOL><DEDENT>self._received_data = data<EOL>
Received from QTM and route accordingly