def decode(self, poll_interval, buf=None):
        """Decodes a given buffer or the next received packet.
        """
        if buf is None:
            buf = self.receive(poll_interval)
        if buf is None:
            return None
        return decode_network_packet(buf)
Decodes a given buffer or the next received packet.
        
src/collectors/jcollectd/collectd_network.py