cutelyst
4.3.0
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
tcpserver.h
1
/*
2
* SPDX-FileCopyrightText: (C) 2016-2017 Daniel Nicoletti <dantti12@gmail.com>
3
* SPDX-License-Identifier: BSD-3-Clause
4
*/
5
#ifndef TCPSERVER_H
6
#define TCPSERVER_H
7
8
#include <QTcpServer>
9
10
namespace
Cutelyst
{
11
12
class
Server;
13
class
Protocol;
14
class
TcpSocket;
15
class
ServerEngine;
16
class
TcpServer
:
public
QTcpServer
17
{
18
Q_OBJECT
19
public
:
20
explicit
TcpServer
(
const
QByteArray
&
serverAddress
,
21
Protocol
*protocol,
22
Server
*wsgi,
23
QObject
*
parent
=
nullptr
);
24
25
Q_INVOKABLE
26
virtual
void
incomingConnection(qintptr handle)
override
;
27
28
virtual
void
shutdown();
29
virtual
void
timeoutConnections();
30
31
Protocol
*protocol()
const
;
32
void
setProtocol(
Protocol
*protocol);
33
34
Q_SIGNALS
:
35
void
createConnection(qintptr handle);
36
37
protected
:
38
friend
class
TcpServerBalancer
;
39
40
QByteArray
m_serverAddress;
41
ServerEngine
*m_engine;
42
Server
*m_wsgi;
43
44
std::vector<std::pair<QAbstractSocket::SocketOption, QVariant>> m_socketOptions;
45
Protocol
*m_protocol;
46
int
m_processing = 0;
47
};
48
49
}
// namespace Cutelyst
50
51
#endif
// TCPSERVER_H
Cutelyst::Protocol
Definition
protocol.h:70
Cutelyst::ServerEngine
Definition
serverengine.h:25
Cutelyst::Server
Implements a web server.
Definition
server.h:60
Cutelyst::TcpServerBalancer
Definition
tcpserverbalancer.h:20
Cutelyst::TcpServer
Definition
tcpserver.h:17
Cutelyst
The Cutelyst namespace holds all public Cutelyst API.
Definition
group-core-actions.dox:1
QByteArray
QObject
QObject::Q_INVOKABLE
Q_INVOKABLEQ_INVOKABLE
QObject::Q_OBJECT
Q_OBJECTQ_OBJECT
QObject::Q_SIGNALS
Q_SIGNALSQ_SIGNALS
QObject::parent
QObject * parent() const const
QTcpServer
QTcpServer::serverAddress
QHostAddress serverAddress() const const
Cutelyst
Server
tcpserver.h
Generated by
1.9.8