KDECore
klocalsocket.cpp
Go to the documentation of this file.
29void KLocalSocketPrivate::emitError(QAbstractSocket::SocketError error, const QString &errorString)
38void KLocalSocketServerPrivate::emitError(QAbstractSocket::SocketError an_error, const QString &an_errorString)
Definition: klocalsocket_p.h:31
void connectToPath(const QString &path, KLocalSocket::LocalSocketType type, QAbstractSocket::OpenMode openMode)
Definition: klocalsocket_unix.cpp:171
void emitError(QAbstractSocket::SocketError, const QString &errorString)
Definition: klocalsocket.cpp:29
static KLocalSocketPrivate * d(KLocalSocket *aq)
Definition: klocalsocket_p.h:47
Definition: klocalsocket_p.h:52
QQueue< KLocalSocket * > pendingConnections
Definition: klocalsocket_p.h:66
int maxPendingConnections
Definition: klocalsocket_p.h:58
KLocalSocketServerPrivate(KLocalSocketServer *qq)
Definition: klocalsocket.cpp:111
void emitError(QAbstractSocket::SocketError, const QString &errorString)
Definition: klocalsocket.cpp:38
bool waitForNewConnection(int msec, bool *timedOut)
Definition: klocalsocket_unix.cpp:337
QSocketNotifier * readNotifier
Definition: klocalsocket_p.h:65
bool listen(const QString &path, KLocalSocket::LocalSocketType type)
Definition: klocalsocket_unix.cpp:238
KLocalSocketServer allows one to create a listening local socket and accept incoming connections.
Definition: klocalsocket.h:160
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
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 ~KLocalSocketServer()
Destroys the KLocalSocketServer object and frees up any resource associated.
Definition: klocalsocket.cpp:125
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
virtual ~KLocalSocket()
Destroys the KLocalSocket object and frees up any resources associated.
Definition: klocalsocket.cpp:49
void connectToPath(const QString &path, OpenMode mode=ReadWrite)
Opens a connection to a listening Unix socket at path.
Definition: klocalsocket.cpp:55
KLocalSocket(QObject *parent=0)
Creates a KLocalSocket object with parent as the parent object.
Definition: klocalsocket.cpp:44
QString localPath() const
Returns the local address of this socket, when connected.
Definition: klocalsocket.cpp:101
void disconnectFromHostImplementation()
Definition: klocalsocket.cpp:81
LocalSocketType localSocketType() const
Returns the socket type for this socket, when connected.
Definition: klocalsocket.cpp:96
void connectToHostImplementation(const QString &hostName, quint16 port, OpenMode mode)
Definition: klocalsocket.cpp:67
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.