code: def decode(self, poll_interval, buf=None):
          
          if buf is None:
              buf = self.receive(poll_interval)
          if buf is None:
              return None
          return decode_network_packet(buf)
docs: Decodes a given buffer or the next received packet.