QTfrontend/net/netudpserver.cpp
changeset 8609 3f6c08223aa1
parent 6952 7f70f37bbf08
child 9080 9b42757d7e71
equal deleted inserted replaced
8608:50cc0131b109 8609:3f6c08223aa1
    18  */
    18  */
    19 
    19 
    20 #include <QUdpSocket>
    20 #include <QUdpSocket>
    21 
    21 
    22 #include "netudpserver.h"
    22 #include "netudpserver.h"
       
    23 #include "hwconsts.h"
    23 
    24 
    24 HWNetUdpServer::HWNetUdpServer(QObject *parent, const QString & descr, quint16 port) :
    25 HWNetUdpServer::HWNetUdpServer(QObject *parent, const QString & descr, quint16 port) :
    25     HWNetRegisterServer(parent, descr, port),
    26     HWNetRegisterServer(parent, descr, port),
    26     m_descr(descr)
    27     m_descr(descr)
    27 {
    28 {
    28     pUdpSocket = new QUdpSocket(this);
    29     pUdpSocket = new QUdpSocket(this);
    29     pUdpSocket->bind(46631);
    30     pUdpSocket->bind(NETGAME_DEFAULT_PORT);
    30     connect(pUdpSocket, SIGNAL(readyRead()), this, SLOT(onClientRead()));
    31     connect(pUdpSocket, SIGNAL(readyRead()), this, SLOT(onClientRead()));
    31 }
    32 }
    32 
    33 
    33 void HWNetUdpServer::onClientRead()
    34 void HWNetUdpServer::onClientRead()
    34 {
    35 {