Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (19 sloc) 439 Bytes
#ifndef SERVER_H
#define SERVER_H
#include <QtNetwork>
#include "player.h"
class server : public QObject
{
Q_OBJECT
public:
server(QString host, quint16 port);
private slots:
void processPendingDatagrams();
private:
QUdpSocket udpSocket;
QList<player*> players;
void registerPlayer(player *p);
void sendPlayerList(QHostAddress host, quint16 port);
player *getPlayer(QString nick);
};
#endif // SERVER_H