30 const auto prefix =
"QLocalServer/"_L1;
38 qWarning(
"QLocalServer::listen: server name is already in use.");
49 return tcpServer.setSocketDescriptor(socketDescriptor);
65 tcpServer.waitForNewConnection(msec, timedOut);
73 QTcpSocket* tcpSocket = tcpServer.nextPendingConnection();
75 qWarning(
"QLocalServer: no pending connection");
81 q->incomingConnection(socketDescriptor);
86 const auto prefix =
"QLocalServer/"_L1;
88 if (
name.startsWith(prefix))
virtual qintptr socketDescriptor() const
Returns the native socket descriptor of the QAbstractSocket object if this is available; otherwise re...
bool isEmpty() const noexcept
void waitForNewConnection(int msec, bool *timedOut)
static bool removeServer(const QString &name)
QQueue< QLocalSocket * > pendingConnections
void _q_onNewConnection()
bool listen(const QString &name)
The QLocalServer class provides a local socket based server.
void setParent(QObject *parent)
Makes the object a child of parent.
bool contains(QAnyStringView key) const
Returns true if there exists a setting called key; returns false otherwise.
void setValue(QAnyStringView key, const QVariant &value)
Sets the value of setting key to value.
void remove(QAnyStringView key)
Removes the setting key and any sub-settings of key.
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
The QTcpSocket class provides a TCP socket.
Combined button and popup list for selecting options.
GLdouble GLdouble GLdouble GLdouble q
QSettings settings("MySoft", "Star Runner")
[0]