23 Q_DECLARE_PRIVATE(QLocalServer)
24 Q_PROPERTY(SocketOptions socketOptions READ socketOptions WRITE setSocketOptions
25 BINDABLE bindableSocketOptions)
33 UserAccessOption = 0x01,
34 GroupAccessOption = 0x2,
35 OtherAccessOption = 0x4,
36 WorldAccessOption = 0x7,
37 AbstractNamespaceOption = 0x8
40 Q_DECLARE_FLAGS(SocketOptions, SocketOption)
43 explicit QLocalServer(QObject *parent =
nullptr);
47 QString errorString()
const;
48 virtual bool hasPendingConnections()
const;
49 bool isListening()
const;
50 bool listen(
const QString &name);
51 bool listen(qintptr socketDescriptor);
52 int maxPendingConnections()
const;
53 virtual QLocalSocket *nextPendingConnection();
54 QString serverName()
const;
55 QString fullServerName()
const;
56 static bool removeServer(
const QString &name);
57 QAbstractSocket::SocketError serverError()
const;
58 void setMaxPendingConnections(
int numConnections);
59 bool waitForNewConnection(
int msec = 0,
bool *timedOut =
nullptr);
61 void setListenBacklogSize(
int size);
62 int listenBacklogSize()
const;
64 void setSocketOptions(SocketOptions options);
65 SocketOptions socketOptions()
const;
66 QBindable<SocketOptions> bindableSocketOptions();
68 qintptr socketDescriptor()
const;
71 virtual void incomingConnection(quintptr socketDescriptor);
72 void addPendingConnection(QLocalSocket *socket);
75 Q_DISABLE_COPY(QLocalServer)
76 Q_PRIVATE_SLOT(d_func(),
void _q_onNewConnection())