KDECore
klocalsocket.h
Go to the documentation of this file.
207 bool listen(const QString &path, KLocalSocket::LocalSocketType type = KLocalSocket::UnixSocket);
Definition klocalsocket_p.h:31
Definition klocalsocket_p.h:52
KLocalSocket::LocalSocketType localSocketType() const
Returns the socket type that this socket is listening on.
Definition klocalsocket.cpp:170
void setMaxPendingConnections(int numConnections)
Sets the maximum number of connections that KLocalSocketServer will accept on your behalf and keep qu...
Definition klocalsocket.cpp:155
virtual bool hasPendingConnections() const
Returns true if a new socket can be received with nextPendingConnection().
Definition klocalsocket.cpp:188
friend class KLocalSocketServerPrivate
Definition klocalsocket.h:315
bool isListening() const
Returns true if the socket is listening, false otherwise.
Definition klocalsocket.cpp:131
QString errorString() const
If an error occurred, return the error message.
Definition klocalsocket.cpp:220
bool listen(const QString &path, KLocalSocket::LocalSocketType type=KLocalSocket::UnixSocket)
Binds this socket to the address path and starts listening there.
Definition klocalsocket.cpp:136
int maxPendingConnections() const
Returns the value set with setMaxPendingConnections().
Definition klocalsocket.cpp:165
QString localPath() const
Returns the address of this socket if it is listening on, or QString() if it is not listening.
Definition klocalsocket.cpp:175
virtual KLocalSocket * nextPendingConnection()
Returns a new socket if one is available or 0 if none is.
Definition klocalsocket.cpp:193
QAbstractSocket::SocketError serverError() const
If an error occurred, return the error code.
Definition klocalsocket.cpp:215
virtual void incomingConnection(int handle)
Definition klocalsocket.cpp:202
KLocalSocketServer(QObject *parent=0)
Creates a KLocalSocketServer object with parent as the parent object.
Definition klocalsocket.cpp:120
bool waitForNewConnection(int msec=0, bool *timedOut=0)
Suspends the execution of the calling thread for at most msec milliseconds and wait for a new socket ...
Definition klocalsocket.cpp:180
void newConnection()
The newConnection() signal is emitted whenever a new connection is ready and has been accepted.
KLocalSocket allows one to create and use local (Unix) sockets.
Definition klocalsocket.h:52
KLocalSocket(QObject *parent=0)
Creates a KLocalSocket object with parent as the parent object.
Definition klocalsocket.cpp:44
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.