PythonQt.QtNetwork.QLocalSocket · declarations 002
Back to PythonQt.QtNetwork.QLocalSocket
waitForDisconnected
waitForDisconnected(msecs: int) -> bool
X.waitForDisconnected(msecs) -> bool
Supplemental documentation: Qt 5 reference:
bool QLocalSocket::waitForDisconnected(int msecs \= 30000)
Waits until the socket has disconnected, up to msecs milliseconds. If the connection
was successfully disconnected, this function returns true; otherwise it returns
false (if the operation timed out, if an error occurred, or if this
QLocalSocket is already
disconnected). In the case where it returns false, you can call
error() to determine the
cause of the error.
The following example waits up to one second for a connection to be closed:
socket->disconnectFromServer();
if (socket->state() == QLocalSocket::UnconnectedState
|| socket->waitForDisconnected(1000)) {
qDebug("Disconnected!");
}
If msecs is -1, this function will not time out.
See also disconnectFromServer() and close().
Upstream PySide2 reference signatures (binding differences may apply):
waitForDisconnected(self, msecs: int=...) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qlocalsocket.html#waitForDisconnected
waitForReadyRead
waitForReadyRead(msecs: int) -> bool
X.waitForReadyRead(msecs) -> bool
Supplemental documentation: Qt 5 reference:
[override virtual] bool QLocalSocket::waitForReadyRead(int msecs \= 30000)
Reimplements: QIODevice::waitForReadyRead(int msecs).
This function blocks until data is available for reading and the readyRead() signal has been emitted. The function will timeout after msecs milliseconds; the default timeout is 30000 milliseconds.
The function returns true if data is available for reading; otherwise it returns
false (if an error occurred or the operation timed out).
See also waitForBytesWritten().
Upstream PySide2 reference signatures (binding differences may apply):
waitForReadyRead(self, msecs: int=...) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qlocalsocket.html#waitForReadyRead
writeData
writeData(arg__1: str, arg__2: int) -> int
X.writeData(arg__1, arg__2) -> int
Supplemental documentation: Qt 5 reference:
[override virtual protected] qint64 QLocalSocket::writeData(const char *data, qint64 c)
Reimplements: QIODevice::writeData(const char *data, qint64 maxSize).
Upstream PySide2 reference signatures (binding differences may apply):
writeData(self, arg__1: str, arg__2: int) -> int
Source: https://doc.qt.io/archives/qt-5.15/qlocalsocket.html#writeData