Skip to content

PythonQt.QtNetwork.QLocalSocket

QLocalSocket

PythonQtInstanceWrapper object

Native bases: PythonQtInstanceWrapper

Supplemental documentation: Qt 5 reference:

Detailed Description

On Windows this is a named pipe and on Unix this is a local domain socket.

If an error occurs, error() returns the type of error, and errorString() can be called to get a human readable description of what happened.

Although QLocalSocket is designed for use with an event loop, it's possible to use it without one. In that case, you must use waitForConnected(), waitForReadyRead(), waitForBytesWritten(), and waitForDisconnected() which blocks until the operation is complete or the timeout expires.

Source: https://doc.qt.io/archives/qt-5.15/qlocalsocket.html

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
Append attribute Any (shared captured text)
ClosingState attribute Any (shared captured text)
ConnectedState attribute Any (shared captured text)
ConnectingState attribute Any (shared captured text)
ConnectionError attribute Any
ConnectionRefusedError attribute Any (shared captured text)
DatagramTooLargeError attribute Any (shared captured text)
LocalSocketError attribute type Convert a number or string to an integer, or return 0 if no arguments are given.
LocalSocketState attribute type Convert a number or string to an integer, or return 0 if no arguments are given.
NotOpen attribute Any (shared captured text)
OpenMode attribute type Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text)
OpenModeFlag attribute type Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text)
OperationError attribute Any (shared captured text)
PeerClosedError attribute Any
ReadOnly attribute Any (shared captured text)
ReadWrite attribute Any (shared captured text)
ServerNotFoundError attribute Any
SocketAccessError attribute Any (shared captured text)
SocketResourceError attribute Any (shared captured text)
SocketTimeoutError attribute Any (shared captured text)
Text attribute Any (shared captured text)
Truncate attribute Any (shared captured text)
Unbuffered attribute Any (shared captured text)
UnconnectedState attribute Any (shared captured text)
UnknownSocketError attribute Any (shared captured text)
UnsupportedSocketOperationError attribute Any (shared captured text)
WriteOnly attribute Any (shared captured text)
__init__ function (self, *args: Any, **kwargs: Any) -> None Native constructor; consult class documentation for supported overloads. (shared captured text)
abort function (self) -> None Aborts the current connection and resets the socket.
aboutToClose function (self, *args: Any, **kwargs: Any) -> Any Native PythonQt.QtNetwork.QLocalSocket.aboutToClose; argument details are not documented.
atEnd function (self) -> bool X.atEnd() -> bool (shared captured text)
blockSignals function (self, b: Any) -> bool X.blockSignals(b) -> bool (shared captured text)
bytesAvailable function (self) -> int X.bytesAvailable() -> int
bytesToWrite function (self) -> int X.bytesToWrite() -> int
bytesWritten function (self, *args: Any, **kwargs: Any) -> Any Native PythonQt.QtNetwork.QLocalSocket.bytesWritten; argument details are not documented.
canReadLine function (self) -> bool X.canReadLine() -> bool
channelBytesWritten function (self, *args: Any, **kwargs: Any) -> Any Native PythonQt.QtNetwork.QLocalSocket.channelBytesWritten; argument details are not documented.
channelReadyRead function (self, *args: Any, **kwargs: Any) -> Any Native PythonQt.QtNetwork.QLocalSocket.channelReadyRead; argument details are not documented.
childEvent function (self, event: Any) -> Any (shared captured text)
children function (self) -> tuple X.children() -> tuple (shared captured text)
className function (self, *args: Any, **kwargs: Any) -> Any Return the classname of the object (shared captured text)
close function (self) -> None Reimplements: [QIODevice::close](https://doc.qt.io/archives/qt-5.15/qiodevice.html#close)().
connect function (self, signal: Any, receiver: Any, slot: Any, type: Any) -> bool X.connect(signal, receiver, slot, type) -> bool (shared captured text)
connectToServer function (self, name: Any, openMode: Any) -> None X.connectToServer(name, openMode)
connected function (self, *args: Any, **kwargs: Any) -> Any Native PythonQt.QtNetwork.QLocalSocket.connected; argument details are not documented.
customEvent function (self, event: Any) -> Any (shared captured text)
delete function (self, *args: Any, **kwargs: Any) -> Any Deletes the C++ object (at your own risk, my friend!) (shared captured text)
deleteLater function (self) -> Any (shared captured text)
destroyed function (self, *args: Any, **kwargs: Any) -> Any Native PythonQt.QtNetwork.QLocalSocket.destroyed; argument details are not documented.
disconnect function (self, signal: Any, receiver: Any, slot: Any) -> bool X.disconnect(signal, receiver, slot) -> bool (shared captured text)
disconnectFromServer function (self) -> None Attempts to close the socket.
disconnected function (self, *args: Any, **kwargs: Any) -> Any Native PythonQt.QtNetwork.QLocalSocket.disconnected; argument details are not documented.
dumpObjectInfo function (self) -> Any (shared captured text)
dumpObjectTree function (self) -> Any (shared captured text)
dynamicPropertyNames function (self) -> Any (shared captured text)
error function (self) -> Any Returns the type of error that last occurred.
errorOccurred function (self, *args: Any, **kwargs: Any) -> Any Native PythonQt.QtNetwork.QLocalSocket.errorOccurred; argument details are not documented.
errorString function (self) -> str X.errorString() -> str (shared captured text)
event function (self, event: Any) -> bool X.event(event) -> bool (shared captured text)
eventFilter function (self, watched: Any, event: Any) -> bool X.eventFilter(watched, event) -> bool (shared captured text)
findChild function (self, type: Any, name: Any) -> Any X.findChild(type, name) -> PythonQt.private.QObject (shared captured text)
findChildren function (self, type: Any, name: Any) -> tuple X.findChildren(type, name) -> tuple (shared captured text)
flush function (self) -> bool X.flush() -> bool
fullServerName function (self) -> str X.fullServerName() -> str
getChar function (self, c: Any) -> bool X.getChar(c) -> bool (shared captured text)
help function (self, *args: Any, **kwargs: Any) -> Any Shows the help of available methods for this class (shared captured text)
inherits function (self, *args: Any, **kwargs: Any) -> Any Returns if the class inherits or is of given type name (shared captured text)
installEventFilter function (self, filterObj: Any) -> Any (shared captured text)
isOpen function (self) -> bool X.isOpen() -> bool (shared captured text)
isReadable function (self) -> bool X.isReadable() -> bool (shared captured text)
isSequential function (self) -> bool X.isSequential() -> bool
isSignalConnected function (self, signal: Any) -> bool X.isSignalConnected(signal) -> bool (shared captured text)
isTextModeEnabled function (self) -> bool X.isTextModeEnabled() -> bool (shared captured text)
isValid function (self) -> bool X.isValid() -> bool
isWidgetType function (self) -> bool X.isWidgetType() -> bool (shared captured text)
isWindowType function (self) -> bool X.isWindowType() -> bool (shared captured text)
isWritable function (self) -> bool X.isWritable() -> bool (shared captured text)
killTimer function (self, id: Any) -> Any (shared captured text)
metaObject function (self) -> Any X.metaObject() -> PythonQt.QtCore.QMetaObject (shared captured text)
moveToThread function (self, thread: Any) -> Any (shared captured text)
objectName attribute Any (shared captured text)
objectNameChanged function (self, *args: Any, **kwargs: Any) -> Any Native PythonQt.QtNetwork.QLocalSocket.objectNameChanged; argument details are not documented.
open function (self, openMode: Any) -> bool X.open(openMode) -> bool
openMode function (self) -> Any (shared captured text)
parent function (self) -> Any X.parent() -> PythonQt.private.QObject (shared captured text)
peek function (self, maxlen: Any) -> Any X.peek(maxlen) -> PythonQt.QtCore.QByteArray (shared captured text)
pos function (self) -> int X.pos() -> int (shared captured text)
property function (self, name: Any) -> Any X.property(name) -> object (shared captured text)
putChar function (self, c: Any) -> bool X.putChar(c) -> bool (shared captured text)
read function (self, maxlen: Any) -> Any X.read(maxlen) -> PythonQt.QtCore.QByteArray (shared captured text)
readAll function (self) -> Any X.readAll() -> PythonQt.QtCore.QByteArray (shared captured text)
readBufferSize function (self) -> int X.readBufferSize() -> int
readChannelFinished function (self, *args: Any, **kwargs: Any) -> Any Native PythonQt.QtNetwork.QLocalSocket.readChannelFinished; argument details are not documented.
readData function (self, arg__1: str, arg__2: int) -> int X.readData(arg__1, arg__2) -> int
readLine function (self, maxlen: Any) -> Any X.readLine(maxlen) -> PythonQt.QtCore.QByteArray (shared captured text)
readLineData function (self, data: Any, maxlen: Any) -> int X.readLineData(data, maxlen) -> int (shared captured text)
readyRead function (self, *args: Any, **kwargs: Any) -> Any Native PythonQt.QtNetwork.QLocalSocket.readyRead; argument details are not documented.
removeEventFilter function (self, obj: Any) -> Any (shared captured text)
reset function (self) -> bool X.reset() -> bool (shared captured text)
seek function (self, pos: Any) -> bool X.seek(pos) -> bool (shared captured text)
sender function (self) -> Any X.sender() -> PythonQt.private.QObject (shared captured text)
senderSignalIndex function (self) -> int X.senderSignalIndex() -> int (shared captured text)
serverName function (self) -> str X.serverName() -> str
setErrorString function (self, errorString: Any) -> Any (shared captured text)
setObjectName function (self, name: Any) -> Any (shared captured text)
setOpenMode function (self, openMode: Any) -> Any (shared captured text)
setParent function (self, parent: Any) -> Any (shared captured text)
setProperty function (self, name: Any, value: Any) -> bool X.setProperty(name, value) -> bool (shared captured text)
setReadBufferSize function (self, size: int) -> None Sets the size of [QLocalSocket](https://doc.qt.io/archives/qt-5.15/qlocalsocket.html)'s internal read buffer to be size bytes.
setServerName function (self, name: str) -> None Set the name of the peer to connect to.
setSocketDescriptor function (self, socketDescriptor: int, socketState: Any, openMode: Any) -> bool X.setSocketDescriptor(socketDescriptor, socketState, openMode) -> bool
setTextModeEnabled function (self, enabled: Any) -> Any (shared captured text)
signalsBlocked function (self) -> bool X.signalsBlocked() -> bool (shared captured text)
size function (self) -> int X.size() -> int (shared captured text)
socketDescriptor function (self) -> int X.socketDescriptor() -> int
startTimer function (self, interval: Any, timerType: Any) -> int X.startTimer(interval, timerType) -> int (shared captured text)
state function (self) -> Any Returns the state of the socket.
stateChanged function (self, *args: Any, **kwargs: Any) -> Any Native PythonQt.QtNetwork.QLocalSocket.stateChanged; argument details are not documented.
thread function (self) -> Any (shared captured text)
timerEvent function (self, event: Any) -> Any (shared captured text)
tr function (self, text: Any, ambig: Any, n: Any) -> str X.tr(text, ambig, n) -> str (shared captured text)
ungetChar function (self, c: Any) -> Any (shared captured text)
waitForBytesWritten function (self, msecs: int) -> bool X.waitForBytesWritten(msecs) -> bool
waitForConnected function (self, msecs: int) -> bool X.waitForConnected(msecs) -> bool
waitForDisconnected function (self, msecs: int) -> bool X.waitForDisconnected(msecs) -> bool
waitForReadyRead function (self, msecs: int) -> bool X.waitForReadyRead(msecs) -> bool
write function (self, data: Any) -> int X.write(data) -> int (shared captured text)
writeData function (self, arg__1: str, arg__2: int) -> int X.writeData(arg__1, arg__2) -> int