42 #ifndef QLOCALSOCKET_H 43 #define QLOCALSOCKET_H 45 #include <QtCore/qiodevice.h> 46 #include <QtNetwork/qabstractsocket.h> 54 #ifndef QT_NO_LOCALSOCKET 89 void connectToServer(
const QString &
name, OpenMode openMode = ReadWrite);
90 void disconnectFromServer();
100 virtual void close();
103 bool isValid()
const;
104 qint64 readBufferSize()
const;
105 void setReadBufferSize(
qint64 size);
107 bool setSocketDescriptor(
quintptr socketDescriptor,
109 OpenMode openMode = ReadWrite);
114 bool waitForConnected(
int msecs = 30000);
115 bool waitForDisconnected(
int msecs = 30000);
130 #if defined(QT_LOCALSOCKET_TCP) 133 #elif defined(Q_OS_WIN) 146 #ifndef QT_NO_DEBUG_STREAM 147 #include <QtCore/qdebug.h> 152 #endif // QT_NO_LOCALSOCKET 158 #endif // QLOCALSOCKET_H The QDebug class provides an output stream for debugging information.
QIntegerForSizeof< void * >::Unsigned quintptr
#define QT_END_NAMESPACE
This macro expands to.
LocalSocketState
This enum describes the different states in which a socket can be.
Q_NETWORK_EXPORT QDebug operator<<(QDebug, QLocalSocket::LocalSocketError)
virtual bool waitForReadyRead(int msecs)
Blocks until new data is available for reading and the readyRead() signal has been emitted...
virtual void close()
First emits aboutToClose(), then closes the device and sets its OpenMode to NotOpen.
virtual qint64 writeData(const char *data, qint64 len)=0
Writes up to maxSize bytes from data to the device.
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
#define Q_PRIVATE_SLOT(d, signature)
The QString class provides a Unicode character string.
The QObject class is the base class of all Qt objects.
The QLocalSocket class provides a local socket.
SocketState
This enum describes the different states in which a socket can be.
virtual qint64 bytesToWrite() const
For buffered devices, this function returns the number of bytes waiting to be written.
#define QT_BEGIN_NAMESPACE
This macro expands to.
static QIntfbScreen * connected
SocketError
This enum describes the socket errors that can occur.
virtual bool isSequential() const
Returns true if this device is sequential; otherwise returns false.
virtual qint64 readData(char *data, qint64 maxlen)=0
Reads up to maxSize bytes from the device into data, and returns the number of bytes read or -1 if an...
virtual qint64 bytesAvailable() const
Returns the number of bytes that are available for reading.
virtual bool waitForBytesWritten(int msecs)
For buffered devices, this function waits until a payload of buffered written data has been written t...
Q_CORE_EXPORT QTextStream & flush(QTextStream &s)
#define Q_DECLARE_PRIVATE(Class)
virtual bool canReadLine() const
Returns true if a complete line of data can be read from the device; otherwise returns false...
The QIODevice class is the base interface class of all I/O devices in Qt.
LocalSocketError
The LocalServerError enumeration represents the errors that can occur.