PySide6.QtNetwork.QTcpSocket¶
- class QTcpSocket¶
- The - QTcpSocketclass provides a TCP socket. More…- Inherited by: - QSslSocket- Synopsis¶- Methods¶- def - __init__()
- def - bind()
 - Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - Detailed Description¶- TCP (Transmission Control Protocol) is a reliable, stream-oriented, connection-oriented transport protocol. It is especially well suited for continuous transmission of data. - QTcpSocketis a convenience subclass of- QAbstractSocketthat allows you to establish a TCP connection and transfer streams of data. See the- QAbstractSocketdocumentation for details.- Note - TCP sockets cannot be opened in QIODeviceBase::Unbuffered mode. - See also - QTcpServer- QUdpSocket- QNetworkAccessManagerFortune Server Fortune Client Threaded Fortune Server Blocking Fortune Client Torrent Example- Creates a - QTcpSocketobject in state- UnconnectedState.- parentis passed on to the QObject constructor.- See also - bind(addr[, port=0[, mode=QAbstractSocket.BindFlag.DefaultForPlatform]])¶
- Parameters:
- addr – - SpecialAddress
- port – int 
- mode – Combination of - BindFlag
 
- Return type:
- bool