''

def sendAndReceive(self, msg, ip='<broadcast>', trycount=0, timeout=1, callback=None):

    self.send(msg, ip)
    self.udp_socket.settimeout(timeout)
    dectrycount = trycount
    recvDatas = []
    while True:
        try:
            (datas, address) = self.udp_socket.recvfrom(10240)
            recvDatas.append(datas)
            if callable(callback):
                try:
                    if callback(datas, address):
                        return recvDatas
                except:
                    traceback.print_exc()
        except socket.timeout:
            if (dectrycount <= 0):
                break
            dectrycount -= 1
        except (KeyboardInterrupt, SystemExit):
            raise
        except:
            traceback.print_exc()
            break
    return recvDatas
