equal
deleted
inserted
replaced
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 { |