QTfrontend/netudpwidget.cpp
changeset 416 595d8663254d
parent 414 52e6be3a0985
child 417 bc7fea9abd9c
--- a/QTfrontend/netudpwidget.cpp	Thu Feb 08 16:29:33 2007 +0000
+++ b/QTfrontend/netudpwidget.cpp	Thu Feb 08 19:03:23 2007 +0000
@@ -12,8 +12,14 @@
   mainLayout.addWidget(serversList);
   pUdpSocket = new QUdpSocket(this);
 
-  pUdpSocket->bind(46632);
+  pUdpSocket->bind(46632, QUdpSocket::ShareAddress);
   connect(pUdpSocket, SIGNAL(readyRead()), this, SLOT(onClientRead()));
+  updateList();
+}
+
+void HWNetUdpWidget::updateList()
+{
+  serversList->clear();
   pUdpSocket->writeDatagram("hedgewars client", QHostAddress::Broadcast, 46631);
 }