code: def input(self, data):
          
          self.buf += data
          while len(self.buf) > HEADER_SIZE:
              data_len = struct.unpack('i', self.buf[0:HEADER_SIZE])[0]
              if len(self.buf) >= data_len + HEADER_SIZE:
                  content = self.buf[HEADER_SIZE:data_len + HEADER_SIZE]
                  self.buf = self.buf[data_len + HEADER_SIZE:]
                  yield content
              else:
                  break
docs: 小数据片段拼接成完整数据包
              如果内容足够则yield数据包