QTfrontend/netserver.cpp
changeset 658 a7e625f5d9d0
parent 569 4e41c9e9e4d1
child 672 08ed55ea1e2a
equal deleted inserted replaced
657:b34fc518a48a 658:a7e625f5d9d0
    21 
    21 
    22 #include <QTcpServer>
    22 #include <QTcpServer>
    23 #include <QTcpSocket>
    23 #include <QTcpSocket>
    24 #include <QMessageBox>
    24 #include <QMessageBox>
    25 
    25 
    26 const quint16 HWNetServer::ds_port=46631;
       
    27 
       
    28 extern char delimeter;
    26 extern char delimeter;
    29 
    27 
    30 void HWNetServer::StartServer()
    28 void HWNetServer::StartServer(quint16 port)
    31 {
    29 {
       
    30   ds_port = port;
    32   hhnum=0;
    31   hhnum=0;
    33   IPCServer = new QTcpServer(this);
    32   IPCServer = new QTcpServer(this);
    34   if (!IPCServer->listen(QHostAddress::Any, ds_port)) {
    33   if (!IPCServer->listen(QHostAddress::Any, ds_port)) {
    35     QMessageBox::critical(0, tr("Error"),
    34     QMessageBox::critical(0, tr("Error"),
    36 			  tr("Unable to start the server: %1.")
    35 			  tr("Unable to start the server: %1.")