server.h 489 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#ifndef SERVER_H
#define SERVER_H

#include <QTcpServer>

#include "connection.h"

class Server : public QTcpServer
{
    Q_OBJECT
public:
    explicit Server(QObject *parent = 0);
    
signals:
    void newConnection(Connection *connection);
    void disconnected();
17
    void newMessage(quint64, Connection::LogLevel level, const QString &message);
18 19 20 21 22 23 24 25 26
    
protected:
    void incomingConnection(qintptr socketDescriptor);

private:
    static const int Port = 38954;
};

#endif // SERVER_H