KDECore
klocalsocket.cpp
Go to the documentation of this file.
29 void KLocalSocketPrivate::emitError(QAbstractSocket::SocketError error, const QString &errorString)
38 void KLocalSocketServerPrivate::emitError(QAbstractSocket::SocketError an_error, const QString &an_errorString)
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
virtual ~KLocalSocketServer()
Destroys the KLocalSocketServer object and frees up any resource associated.
Definition: klocalsocket.cpp:125
virtual bool hasPendingConnections() const
Returns true if a new socket can be received with nextPendingConnection().
Definition: klocalsocket.cpp:188
KLocalSocketServer(QObject *parent=0)
Creates a KLocalSocketServer object with parent as the parent object.
Definition: klocalsocket.cpp:120
int maxPendingConnections() const
Returns the value set with setMaxPendingConnections().
Definition: klocalsocket.cpp:165
virtual KLocalSocket * nextPendingConnection()
Returns a new socket if one is available or 0 if none is.
Definition: klocalsocket.cpp:193
LocalSocketType localSocketType() const
Returns the socket type for this socket, when connected.
Definition: klocalsocket.cpp:96
QSocketNotifier * readNotifier
Definition: klocalsocket_p.h:65
QAbstractSocket::SocketError serverError() const
If an error occurred, return the error code.
Definition: klocalsocket.cpp:215
KLocalSocket(QObject *parent=0)
Creates a KLocalSocket object with parent as the parent object.
Definition: klocalsocket.cpp:44
QQueue< KLocalSocket * > pendingConnections
Definition: klocalsocket_p.h:66
KLocalSocketServerPrivate(KLocalSocketServer *qq)
Definition: klocalsocket.cpp:111
bool listen(const QString &path, KLocalSocket::LocalSocketType type)
Definition: klocalsocket_unix.cpp:238
QString errorString() const
If an error occurred, return the error message.
Definition: klocalsocket.cpp:220
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
void disconnectFromHostImplementation()
Definition: klocalsocket.cpp:81
QTcpSocket * connectToHost(const QString &protocol, const QString &host, quint16 port, QObject *parent=0)
Initiates a TCP/IP socket connection to remote node (host) host, using the protocol.
Definition: ksocketfactory.cpp:69
Definition: klocalsocket_p.h:51
QString localPath() const
Returns the local address of this socket, when connected.
Definition: klocalsocket.cpp:101
void connectToPath(const QString &path, KLocalSocket::LocalSocketType type, QAbstractSocket::OpenMode openMode)
Definition: klocalsocket_unix.cpp:171
KLocalSocket::LocalSocketType localSocketType() const
Returns the socket type that this socket is listening on.
Definition: klocalsocket.cpp:170
void emitError(QAbstractSocket::SocketError, const QString &errorString)
Definition: klocalsocket.cpp:29
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:51
KLocalSocketServer allows one to create a listening local socket and accept incoming connections...
Definition: klocalsocket.h:159
int maxPendingConnections
Definition: klocalsocket_p.h:58
bool isListening() const
Returns true if the socket is listening, false otherwise.
Definition: klocalsocket.cpp:131
static KLocalSocketPrivate * d(KLocalSocket *aq)
Definition: klocalsocket_p.h:47
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
void connectToHostImplementation(const QString &hostName, quint16 port, OpenMode mode)
Definition: klocalsocket.cpp:67
Definition: klocalsocket_p.h:30
virtual void incomingConnection(int handle)
Definition: klocalsocket.cpp:202
void emitError(QAbstractSocket::SocketError, const QString &errorString)
Definition: klocalsocket.cpp:38
void setMaxPendingConnections(int numConnections)
Sets the maximum number of connections that KLocalSocketServer will accept on your behalf and keep qu...
Definition: klocalsocket.cpp:155
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
bool waitForNewConnection(int msec, bool *timedOut)
Definition: klocalsocket_unix.cpp:337
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.