QTfrontend/netudpwidget.cpp
changeset 414 52e6be3a0985
parent 413 523f1769f2bc
child 416 595d8663254d
equal deleted inserted replaced
413:523f1769f2bc 414:52e6be3a0985
    10 {
    10 {
    11   serversList = new QListWidget(this);
    11   serversList = new QListWidget(this);
    12   mainLayout.addWidget(serversList);
    12   mainLayout.addWidget(serversList);
    13   pUdpSocket = new QUdpSocket(this);
    13   pUdpSocket = new QUdpSocket(this);
    14 
    14 
    15   pUdpSocket->bind();//46632);
    15   pUdpSocket->bind(46632);
    16   connect(pUdpSocket, SIGNAL(readyRead()), this, SLOT(onClientRead()));
    16   connect(pUdpSocket, SIGNAL(readyRead()), this, SLOT(onClientRead()));
    17   pUdpSocket->writeDatagram("hedgewars client", QHostAddress::Broadcast, 46631);
    17   pUdpSocket->writeDatagram("hedgewars client", QHostAddress::Broadcast, 46631);
    18 }
    18 }
    19 
    19 
    20 void HWNetUdpWidget::onClientRead()
    20 void HWNetUdpWidget::onClientRead()