ATLAS Offline Software
Loading...
Searching...
No Matches
VP1TcpServer.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
6// //
7// Header file for class VP1TcpServer //
8// //
9// Author: Thomas Kittelmann <Thomas.Kittelmann@cern.ch> //
10// //
11// Initial version: April 2007 //
12// //
14
15#ifndef VP1TCPSERVER_H
16#define VP1TCPSERVER_H
17
18#include <QObject>
19#include <QAbstractSocket>
21
22class VP1TcpServer : public QObject {
23
24 Q_OBJECT
25
26public:
27
31
33 virtual ~VP1TcpServer();
34
35 bool listen(QString& err, const quint16& port = 4747);//Returns false (and fills the err string) if not successful.
36 quint16 port() const;
37 bool isListening();
38public Q_SLOTS:
39 void close();
40
41signals:
43 void listenStateChanged(bool);//Might be emitted up to 2 seconds after the state really changed
44
48
49private:
50 class Imp;
52private Q_SLOTS:
53 void acceptConnection();
54 void readData();
55 void handleError(QAbstractSocket::SocketError);
56 void socketDestroyed(QObject*);
58};
59
60#endif
void socketDestroyed(QObject *)
void listenStateChanged(bool)
void acceptConnection()
void handleError(QAbstractSocket::SocketError)
void receivedExternalRequest(VP1ExternalRequest)
quint16 port() const
bool listen(QString &err, const quint16 &port=4747)
void listenStateMightHaveChanged()
virtual ~VP1TcpServer()