Torc  0.1
torchttpserverlistener.h
Go to the documentation of this file.
1 #ifndef TORCHTTPSERVERADDRESS_H
2 #define TORCHTTPSERVERADDRESS_H
3 
4 // Qt
5 #include <QTcpServer>
6 
7 // Torc
8 #include "torchttpserver.h"
9 
10 class TorcHTTPServerListener final : public QTcpServer
11 {
12  Q_OBJECT
13 
14  public:
15  TorcHTTPServerListener(TorcHTTPServer *Parent, const QHostAddress &Address, int Port = 0);
17 
18  bool Listen(const QHostAddress &Address, int Port = 0);
19 
20  signals:
21  void NewConnection(qintptr SocketDescriptor);
22 
23  protected:
24  void incomingConnection (qintptr SocketDescriptor) override final;
25 };
26 
27 #endif // TORCHTTPSERVERADDRESS_H
bool Listen(const QHostAddress &Address, int Port=0)
void incomingConnection(qintptr SocketDescriptor) overridefinal
TorcHTTPServerListener(TorcHTTPServer *Parent, const QHostAddress &Address, int Port=0)
void NewConnection(qintptr SocketDescriptor)
An HTTP server.