19class TcpServerBalancer final :
public QTcpServer
23 explicit 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; }
30 QString bindError()
const {
return m_bindError; }
32 void incomingConnection(qintptr handle)
override;
37 QHostAddress m_address;
39 QByteArray m_serverName;
40 std::vector<TcpServer *> m_servers;
43 QSslConfiguration *m_sslConfiguration =
nullptr;
44 int m_currentServer = 0;
45 bool m_balancer =
false;