'Listen over udp for MessagePack strings'

def listen_udp(self):

    while 1:
        try:
            s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
            s.bind((self.ip, self.port))
            logger.info(('listening    over    udp    for    messagepack    on    %s' % self.port))
            chunk = []
            while 1:
                self.check_if_parent_is_alive()
                (data, addr) = s.recvfrom(1024)
                metric = unpackb(data)
                chunk.append(metric)
                if (len(chunk) > settings.CHUNK_SIZE):
                    try:
                        self.q.put(list(chunk), block=False)
                        chunk[:] = []
                    except Full:
                        logger.info('queue    is    full,    dropping    datapoints')
                        chunk[:] = []
        except Exception as e:
            logger.info(("can't    connect    to    socket:    " + str(e)))
            break
