39class QLocalServerPrivate :
public QObjectPrivate
41 Q_DECLARE_PUBLIC(QLocalServer)
44 QLocalServerPrivate() :
45#if !defined(QT_LOCALSOCKET_TCP) && !defined(Q_OS_WIN)
46 listenSocket(-1), socketNotifier(
nullptr),
48 maxPendingConnections(30), error(QAbstractSocket::UnknownSocketError),
49 socketOptions(QLocalServer::NoOptions)
54 bool listen(
const QString &name);
55 bool listen(qintptr socketDescriptor);
56 static bool removeServer(
const QString &name);
58 void waitForNewConnection(
int msec,
bool *timedOut);
59 void _q_onNewConnection();
61#if defined(QT_LOCALSOCKET_TCP)
64 QMap<quintptr, QTcpSocket*> socketMap;
65#elif defined(Q_OS_WIN)
68 HANDLE handle =
nullptr;
69 OVERLAPPED overlapped;
70 bool connected =
false;
72 Q_DISABLE_COPY(Listener)
75 void setError(
const QString &function);
78 std::vector<std::unique_ptr<Listener>> listeners;
79 HANDLE eventHandle =
nullptr;
80 QWinEventNotifier *connectionEventNotifier;
82 void setError(
const QString &function);
85 QSocketNotifier *socketNotifier;
89 QString fullServerName;
90 int maxPendingConnections;
91 QQueue<QLocalSocket*> pendingConnections;
93 QAbstractSocket::SocketError error;
94 int listenBacklog = 50;
96 Q_OBJECT_BINDABLE_PROPERTY(QLocalServerPrivate, QLocalServer::SocketOptions, socketOptions)