QTfrontend/netserver.h
changeset 658 a7e625f5d9d0
parent 486 7ea71cd3acd5
child 672 08ed55ea1e2a
equal deleted inserted replaced
657:b34fc518a48a 658:a7e625f5d9d0
    33 class HWNetServer : public QObject
    33 class HWNetServer : public QObject
    34 {
    34 {
    35   Q_OBJECT
    35   Q_OBJECT
    36 
    36 
    37  public:
    37  public:
    38   void StartServer();
    38   void StartServer(quint16 port);
    39   void StopServer();
    39   void StopServer();
    40   bool isChiefClient(HWConnectedClient* cl) const;
    40   bool isChiefClient(HWConnectedClient* cl) const;
    41   QMap<QString, QStringList> getGameCfg() const;
    41   QMap<QString, QStringList> getGameCfg() const;
    42   void sendAll(QString gameCfg);
    42   void sendAll(QString gameCfg);
    43   void sendOthers(HWConnectedClient* this_cl, QString gameCfg);
    43   void sendOthers(HWConnectedClient* this_cl, QString gameCfg);
    54   QMap<QString, QStringList> m_gameCfg; // config_param - value
    54   QMap<QString, QStringList> m_gameCfg; // config_param - value
    55   int hhnum;
    55   int hhnum;
    56 
    56 
    57  private:
    57  private:
    58   HWConnectedClient* getChiefClient() const;
    58   HWConnectedClient* getChiefClient() const;
    59   static const quint16 ds_port;
    59   quint16 ds_port;
    60   QTcpServer* IPCServer;
    60   QTcpServer* IPCServer;
    61   QList<HWConnectedClient*> connclients;
    61   QList<HWConnectedClient*> connclients;
    62 
    62 
    63  private slots:
    63  private slots:
    64   void NewConnection();
    64   void NewConnection();