19class TcpServerBalancer final :
public QTcpServer
23 TcpServerBalancer(
Server *parent);
24 ~TcpServerBalancer()
override;
26 bool listen(
const QString &address,
Protocol *protocol,
bool secure);
28 void setBalancer(
bool enable);
29 QByteArray serverName()
const {
return m_serverName; }
31 void incomingConnection(qintptr handle)
override;
36 QHostAddress m_address;
38 QByteArray m_serverName;
39 std::vector<TcpServer *> m_servers;
42 QSslConfiguration *m_sslConfiguration =
nullptr;
43 int m_currentServer = 0;
44 bool m_balancer =
false;