PythonQt.QtNetwork.QSslSocket
QSslSocket
PythonQtInstanceWrapper object
Native bases: PythonQtInstanceWrapper
Supplemental documentation: Qt 5 reference:
Detailed Description
QSslSocket establishes a secure, encrypted TCP connection you can use for transmitting encrypted data. It can operate in both client and server mode, and it supports modern SSL protocols, including SSL 3 and TLS 1.2. By default, QSslSocket uses only SSL protocols which are considered to be secure (QSsl::SecureProtocols), but you can change the SSL protocol by calling setProtocol() as long as you do it before the handshake has started.
SSL encryption operates on top of the existing TCP stream after the socket enters the ConnectedState. There are two simple ways to establish a secure connection using QSslSocket: With an immediate SSL handshake, or with a delayed SSL handshake occurring after the connection has been established in unencrypted mode.
The most common way to use QSslSocket is to construct an object and start a secure connection by calling connectToHostEncrypted(). This method starts an immediate SSL handshake once the connection has been established.
QSslSocket *socket = new QSslSocket(this);
connect(socket, SIGNAL(encrypted()), this, SLOT(ready()));
socket->connectToHostEncrypted("imap.example.com", 993);
As with a plain QTcpSocket, QSslSocket enters the HostLookupState, ConnectingState, and finally the ConnectedState, if the connection is successful. The handshake then starts automatically, and if it succeeds, the encrypted() signal is emitted to indicate the socket has entered the encrypted state and is ready for use.
Note that data can be written to the socket immediately after the return from connectToHostEncrypted() (i.e., before the encrypted() signal is emitted). The data is queued in QSslSocket until after the encrypted() signal is emitted.
An example of using the delayed SSL handshake to secure an existing connection is the case where an SSL server secures an incoming connection. Suppose you create an SSL server class as a subclass of QTcpServer. You would override QTcpServer::incomingConnection() with something like the example below, which first constructs an instance of QSslSocket and then calls setSocketDescriptor() to set the new socket's descriptor to the existing one passed in. It then initiates the SSL handshake by calling startServerEncryption().
void SslServer::incomingConnection(qintptr socketDescriptor)
{
QSslSocket *serverSocket = new QSslSocket;
if (serverSocket->setSocketDescriptor(socketDescriptor)) {
addPendingConnection(serverSocket);
connect(serverSocket, &QSslSocket::encrypted, this, &SslServer::ready);
serverSocket->startServerEncryption();
} else {
delete serverSocket;
}
}
If an error occurs, QSslSocket emits the sslErrors() signal. In this case, if no action is taken to ignore the error(s), the connection is dropped. To continue, despite the occurrence of an error, you can call ignoreSslErrors(), either from within this slot after the error occurs, or any time after construction of the QSslSocket and before the connection is attempted. This will allow QSslSocket to ignore the errors it encounters when establishing the identity of the peer. Ignoring errors during an SSL handshake should be used with caution, since a fundamental characteristic of secure connections is that they should be established with a successful handshake.
Once encrypted, you use QSslSocket as a regular QTcpSocket. When readyRead() is emitted, you can call read(), canReadLine() and readLine(), or getChar() to read decrypted data from QSslSocket's internal buffer, and you can call write() or putChar() to write data back to the peer. QSslSocket will automatically encrypt the written data for you, and emit encryptedBytesWritten() once the data has been written to the peer.
As a convenience, QSslSocket supports QTcpSocket's blocking functions waitForConnected(), waitForReadyRead(), waitForBytesWritten(), and waitForDisconnected(). It also provides waitForEncrypted(), which will block the calling thread until an encrypted connection has been established.
QSslSocket socket;
socket.connectToHostEncrypted("http.example.com", 443);
if (!socket.waitForEncrypted()) {
qDebug() << socket.errorString();
return false;
}
socket.write("GET / HTTP/1.0\r\n\r\n");
while (socket.waitForReadyRead())
qDebug() << socket.readAll().data();
QSslSocket provides an extensive, easy-to-use API for handling cryptographic ciphers, private keys, and local, peer, and Certification Authority (CA) certificates. It also provides an API for handling errors that occur during the handshake phase.
The following features can also be customized:
- The socket's cryptographic cipher suite can be customized before the handshake phase with QSslConfiguration::setCiphers() and QSslConfiguration::setDefaultCiphers().
- The socket's local certificate and private key can be customized before the handshake phase with setLocalCertificate() and setPrivateKey().
- The CA certificate database can be extended and customized with QSslConfiguration::addCaCertificate(), QSslConfiguration::addCaCertificates().
To extend the list of default CA certificates used by the SSL sockets during the SSL handshake you must update the default configuration, as in the snippet below:
QList<QSslCertificate> certificates = getCertificates();
QSslConfiguration configuration = QSslConfiguration::defaultConfiguration();
configuration.addCaCertificates(certificates);
QSslConfiguration::setDefaultConfiguration(configuration);
Note: If available, root certificates on Unix (excluding macOS) will be loaded on demand from the standard certificate directories. If you do not want to load root certificates on demand, you need to call either QSslConfiguration::defaultConfiguration().setCaCertificates() before the first SSL handshake is made in your application (for example, via passing QSslSocket::systemCaCertificates() to it), or call QSslConfiguration::defaultConfiguration()::setCaCertificates() on your QSslSocket instance prior to the SSL handshake.
For more information about ciphers and certificates, refer to QSslCipher and QSslCertificate.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/).
Note: Be aware of the difference between the bytesWritten() signal and the encryptedBytesWritten() signal. For a QTcpSocket, bytesWritten() will get emitted as soon as data has been written to the TCP socket. For a QSslSocket, bytesWritten() will get emitted when the data is being encrypted and encryptedBytesWritten() will get emitted as soon as data has been written to the TCP socket.
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.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 |
|---|---|---|---|
AddressInUseError |
attribute | Any |
(shared captured text) |
AnyIPProtocol |
attribute | Any |
(shared captured text) |
Append |
attribute | Any |
(shared captured text) |
AutoVerifyPeer |
attribute | Any |
|
BindFlag |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
BindMode |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
BoundState |
attribute | Any |
(shared captured text) |
ClosingState |
attribute | Any |
(shared captured text) |
ConnectedState |
attribute | Any |
(shared captured text) |
ConnectingState |
attribute | Any |
(shared captured text) |
ConnectionRefusedError |
attribute | Any |
(shared captured text) |
DatagramTooLargeError |
attribute | Any |
(shared captured text) |
DefaultForPlatform |
attribute | Any |
(shared captured text) |
DontShareAddress |
attribute | Any |
(shared captured text) |
HostLookupState |
attribute | Any |
(shared captured text) |
HostNotFoundError |
attribute | Any |
(shared captured text) |
IPv4Protocol |
attribute | Any |
(shared captured text) |
IPv6Protocol |
attribute | Any |
(shared captured text) |
KeepAliveOption |
attribute | Any |
(shared captured text) |
ListeningState |
attribute | Any |
(shared captured text) |
LowDelayOption |
attribute | Any |
(shared captured text) |
MulticastLoopbackOption |
attribute | Any |
(shared captured text) |
MulticastTtlOption |
attribute | Any |
(shared captured text) |
NetworkError |
attribute | Any |
(shared captured text) |
NetworkLayerProtocol |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
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) |
PathMtuSocketOption |
attribute | Any |
(shared captured text) |
PauseMode |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
PauseModes |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
PauseNever |
attribute | Any |
(shared captured text) |
PauseOnSslErrors |
attribute | Any |
(shared captured text) |
PeerVerifyMode |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. |
ProxyAuthenticationRequiredError |
attribute | Any |
(shared captured text) |
ProxyConnectionClosedError |
attribute | Any |
(shared captured text) |
ProxyConnectionRefusedError |
attribute | Any |
(shared captured text) |
ProxyConnectionTimeoutError |
attribute | Any |
(shared captured text) |
ProxyNotFoundError |
attribute | Any |
(shared captured text) |
ProxyProtocolError |
attribute | Any |
(shared captured text) |
QueryPeer |
attribute | Any |
|
ReadOnly |
attribute | Any |
(shared captured text) |
ReadWrite |
attribute | Any |
(shared captured text) |
ReceiveBufferSizeSocketOption |
attribute | Any |
(shared captured text) |
RemoteHostClosedError |
attribute | Any |
(shared captured text) |
ReuseAddressHint |
attribute | Any |
(shared captured text) |
SctpSocket |
attribute | Any |
(shared captured text) |
SendBufferSizeSocketOption |
attribute | Any |
(shared captured text) |
ShareAddress |
attribute | Any |
(shared captured text) |
SocketAccessError |
attribute | Any |
(shared captured text) |
SocketAddressNotAvailableError |
attribute | Any |
(shared captured text) |
SocketError |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
SocketOption |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
SocketResourceError |
attribute | Any |
(shared captured text) |
SocketState |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
SocketTimeoutError |
attribute | Any |
(shared captured text) |
SocketType |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
SslClientMode |
attribute | Any |
|
SslHandshakeFailedError |
attribute | Any |
(shared captured text) |
SslInternalError |
attribute | Any |
(shared captured text) |
SslInvalidUserDataError |
attribute | Any |
(shared captured text) |
SslMode |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. |
SslServerMode |
attribute | Any |
|
TcpSocket |
attribute | Any |
(shared captured text) |
TemporaryError |
attribute | Any |
(shared captured text) |
Text |
attribute | Any |
(shared captured text) |
Truncate |
attribute | Any |
(shared captured text) |
TypeOfServiceOption |
attribute | Any |
(shared captured text) |
UdpSocket |
attribute | Any |
(shared captured text) |
Unbuffered |
attribute | Any |
(shared captured text) |
UnconnectedState |
attribute | Any |
(shared captured text) |
UnencryptedMode |
attribute | Any |
|
UnfinishedSocketOperationError |
attribute | Any |
(shared captured text) |
UnknownNetworkLayerProtocol |
attribute | Any |
(shared captured text) |
UnknownSocketError |
attribute | Any |
(shared captured text) |
UnknownSocketType |
attribute | Any |
(shared captured text) |
UnsupportedSocketOperationError |
attribute | Any |
(shared captured text) |
VerifyNone |
attribute | Any |
|
VerifyPeer |
attribute | Any |
|
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.QSslSocket.aboutToClose; argument details are not documented. |
addCaCertificate |
function | (self, certificate: Any) -> None |
|
addCaCertificates |
function | (self, path: Any, format: Any, syntax: Any) -> Any |
X.addCaCertificates(path, format, syntax) |
addDefaultCaCertificate |
function | (self, certificate: Any) -> None |
|
addDefaultCaCertificates |
function | (self, path: Any, format: Any, syntax: Any) -> Any |
X.addDefaultCaCertificates(path, format, syntax) |
atEnd |
function | (self) -> bool |
X.atEnd() -> bool |
bind |
function | (self, address: Any, port: Any, mode: Any) -> bool |
X.bind(address, port, mode) -> bool |
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.QSslSocket.bytesWritten; argument details are not documented. |
caCertificates |
function | (self) -> tuple |
X.caCertificates() -> tuple |
canReadLine |
function | (self) -> bool |
X.canReadLine() -> bool |
channelBytesWritten |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.QtNetwork.QSslSocket.channelBytesWritten; argument details are not documented. |
channelReadyRead |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.QtNetwork.QSslSocket.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) |
ciphers |
function | (self) -> tuple |
X.ciphers() -> tuple |
className |
function | (self, *args: Any, **kwargs: Any) -> Any |
Return the classname of the object (shared captured text) |
close |
function | (self) -> None |
Reimplements: [QAbstractSocket::close](https://doc.qt.io/archives/qt-5.15/qabstractsocket.html#close)(). |
connect |
function | (self, signal: Any, receiver: Any, slot: Any, type: Any) -> bool |
X.connect(signal, receiver, slot, type) -> bool (shared captured text) |
connectToHost |
function | (self, hostName: Any, port: int, openMode: Any, protocol: Any) -> None |
X.connectToHost(hostName, port, openMode, protocol) |
connectToHostEncrypted |
function | (self, hostName: str, port: int, sslPeerName: Any, mode: Any, protocol: Any) -> None |
X.connectToHostEncrypted(hostName, port, sslPeerName, mode, protocol) |
connected |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.QtNetwork.QSslSocket.connected; argument details are not documented. |
customEvent |
function | (self, event: Any) -> Any |
(shared captured text) |
defaultCaCertificates |
function | (self) -> tuple |
X.defaultCaCertificates() -> tuple |
defaultCiphers |
function | (self) -> tuple |
X.defaultCiphers() -> tuple |
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.QSslSocket.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) |
disconnectFromHost |
function | (self) -> None |
|
disconnected |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.QtNetwork.QSslSocket.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) |
encrypted |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.QtNetwork.QSslSocket.encrypted; argument details are not documented. |
encryptedBytesAvailable |
function | (self) -> int |
X.encryptedBytesAvailable() -> int |
encryptedBytesToWrite |
function | (self) -> int |
X.encryptedBytesToWrite() -> int |
encryptedBytesWritten |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.QtNetwork.QSslSocket.encryptedBytesWritten; argument details are not documented. |
error |
function | (self) -> Any |
(shared captured text) |
errorOccurred |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.QtNetwork.QSslSocket.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 |
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) |
hostFound |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.QtNetwork.QSslSocket.hostFound; argument details are not documented. |
ignoreSslErrors |
function | (self, errors: Any) -> None |
This slot tells [QSslSocket](https://doc.qt.io/archives/qt-5.15/qsslsocket.html) to ignore errors during [QSslSocket](https://doc.qt.io/archives/qt-5.15/qsslsocket.html)'s handshake phase and… |
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) |
isEncrypted |
function | (self) -> bool |
X.isEncrypted() -> bool |
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 (shared captured text) |
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) |
localAddress |
function | (self) -> Any |
X.localAddress() -> PythonQt.QtNetwork.QHostAddress |
localCertificate |
function | (self) -> Any |
X.localCertificate() -> PythonQt.QtNetwork.QSslCertificate |
localCertificateChain |
function | (self) -> tuple |
X.localCertificateChain() -> tuple |
localPort |
function | (self) -> int |
X.localPort() -> int |
metaObject |
function | (self) -> Any |
X.metaObject() -> PythonQt.QtCore.QMetaObject (shared captured text) |
mode |
function | (self) -> Any |
Returns the current mode for the socket; either [UnencryptedMode](https://doc.qt.io/archives/qt-5.15/qsslsocket.html#SslMode-enum), where… |
modeChanged |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.QtNetwork.QSslSocket.modeChanged; argument details are not documented. |
moveToThread |
function | (self, thread: Any) -> Any |
(shared captured text) |
newSessionTicketReceived |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.QtNetwork.QSslSocket.newSessionTicketReceived; argument details are not documented. |
objectName |
attribute | Any |
(shared captured text) |
objectNameChanged |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.QtNetwork.QSslSocket.objectNameChanged; argument details are not documented. |
open |
function | (self, mode: Any) -> bool |
X.open(mode) -> bool (shared captured text) |
openMode |
function | (self) -> Any |
(shared captured text) |
parent |
function | (self) -> Any |
X.parent() -> PythonQt.private.QObject (shared captured text) |
pauseMode |
function | (self) -> Any |
|
peek |
function | (self, maxlen: Any) -> Any |
X.peek(maxlen) -> PythonQt.QtCore.QByteArray (shared captured text) |
peerAddress |
function | (self) -> Any |
X.peerAddress() -> PythonQt.QtNetwork.QHostAddress |
peerCertificate |
function | (self) -> Any |
X.peerCertificate() -> PythonQt.QtNetwork.QSslCertificate |
peerCertificateChain |
function | (self) -> tuple |
X.peerCertificateChain() -> tuple |
peerName |
function | (self) -> str |
X.peerName() -> str |
peerPort |
function | (self) -> int |
X.peerPort() -> int |
peerVerifyDepth |
function | (self) -> int |
X.peerVerifyDepth() -> int |
peerVerifyError |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.QtNetwork.QSslSocket.peerVerifyError; argument details are not documented. |
peerVerifyMode |
function | (self) -> Any |
Returns the socket's verify mode. |
peerVerifyName |
function | (self) -> str |
X.peerVerifyName() -> str |
pos |
function | (self) -> int |
X.pos() -> int (shared captured text) |
preSharedKeyAuthenticationRequired |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.QtNetwork.QSslSocket.preSharedKeyAuthenticationRequired; argument details are not documented. |
privateKey |
function | (self) -> Any |
X.privateKey() -> PythonQt.QtNetwork.QSslKey |
property |
function | (self, name: Any) -> Any |
X.property(name) -> object (shared captured text) |
protocol |
function | (self) -> Any |
Returns the socket's SSL protocol. |
proxy |
function | (self) -> Any |
X.proxy() -> PythonQt.QtNetwork.QNetworkProxy |
proxyAuthenticationRequired |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.QtNetwork.QSslSocket.proxyAuthenticationRequired; argument details are not documented. |
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.QSslSocket.readChannelFinished; argument details are not documented. |
readData |
function | (self, data: str, maxlen: int) -> int |
X.readData(data, maxlen) -> 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.QSslSocket.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) |
resume |
function | (self) -> None |
Reimplements: [QAbstractSocket::resume](https://doc.qt.io/archives/qt-5.15/qabstractsocket.html#resume)(). |
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) |
sessionCipher |
function | (self) -> Any |
X.sessionCipher() -> PythonQt.QtNetwork.QSslCipher |
sessionProtocol |
function | (self) -> Any |
Returns the socket's SSL/TLS protocol or UnknownProtocol if the connection isn't encrypted. |
setCaCertificates |
function | (self, certificates: Any) -> None |
|
setCiphers |
function | (self, ciphers: Any) -> None |
|
setDefaultCaCertificates |
function | (self, certificates: Any) -> None |
|
setDefaultCiphers |
function | (self, ciphers: Any) -> None |
|
setErrorString |
function | (self, errorString: Any) -> Any |
(shared captured text) |
setLocalAddress |
function | (self, address: Any) -> Any |
|
setLocalCertificate |
function | (self, fileName: Any, format: Any) -> None |
X.setLocalCertificate(fileName, format) |
setLocalCertificateChain |
function | (self, localChain: Any) -> None |
Sets the certificate chain to be presented to the peer during the SSL handshake to be localChain. |
setLocalPort |
function | (self, port: Any) -> Any |
|
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) |
setPauseMode |
function | (self, pauseMode: Any) -> Any |
|
setPeerAddress |
function | (self, address: Any) -> Any |
|
setPeerName |
function | (self, name: Any) -> Any |
|
setPeerPort |
function | (self, port: Any) -> Any |
|
setPeerVerifyDepth |
function | (self, depth: int) -> None |
Sets the maximum number of certificates in the peer's certificate chain to be checked during the SSL handshake phase, to depth. |
setPeerVerifyMode |
function | (self, mode: Any) -> None |
Sets the socket's verify mode to mode. |
setPeerVerifyName |
function | (self, hostName: str) -> None |
Sets a different host name, given by hostName, for the certificate validation instead of the one used for the TCP connection. |
setPrivateKey |
function | (self, fileName: Any, algorithm: Any, format: Any, passPhrase: Any) -> None |
X.setPrivateKey(fileName, algorithm, format, passPhrase) |
setProperty |
function | (self, name: Any, value: Any) -> bool |
X.setProperty(name, value) -> bool (shared captured text) |
setProtocol |
function | (self, protocol: Any) -> None |
Sets the socket's SSL protocol to protocol. |
setProxy |
function | (self, networkProxy: Any) -> Any |
|
setReadBufferSize |
function | (self, size: int) -> None |
Reimplements: [QAbstractSocket::setReadBufferSize](https://doc.qt.io/archives/qt-5.15/qabstractsocket.html#setReadBufferSize)(qint64 size). |
setSocketDescriptor |
function | (self, socketDescriptor: int, state: Any, openMode: Any) -> bool |
X.setSocketDescriptor(socketDescriptor, state, openMode) -> bool |
setSocketError |
function | (self, socketError: Any) -> Any |
|
setSocketOption |
function | (self, option: Any, value: Any) -> None |
X.setSocketOption(option, value) |
setSocketState |
function | (self, state: Any) -> Any |
|
setSslConfiguration |
function | (self, config: Any) -> None |
Sets the socket's SSL configuration to be the contents of configuration. |
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 |
socketOption |
function | (self, option: Any) -> Any |
X.socketOption(option) -> object |
socketType |
function | (self) -> Any |
|
sslConfiguration |
function | (self) -> Any |
X.sslConfiguration() -> PythonQt.QtNetwork.QSslConfiguration |
sslErrors |
function | (self) -> tuple |
X.sslErrors() -> tuple |
sslLibraryBuildVersionNumber |
function | (self) -> int |
X.sslLibraryBuildVersionNumber() -> int |
sslLibraryBuildVersionString |
function | (self) -> str |
X.sslLibraryBuildVersionString() -> str |
sslLibraryVersionNumber |
function | (self) -> int |
X.sslLibraryVersionNumber() -> int |
sslLibraryVersionString |
function | (self) -> str |
X.sslLibraryVersionString() -> str |
startClientEncryption |
function | (self) -> None |
Starts a delayed SSL handshake for a client connection. |
startServerEncryption |
function | (self) -> None |
Starts a delayed SSL handshake for a server connection. |
startTimer |
function | (self, interval: Any, timerType: Any) -> int |
X.startTimer(interval, timerType) -> int (shared captured text) |
state |
function | (self) -> Any |
|
stateChanged |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.QtNetwork.QSslSocket.stateChanged; argument details are not documented. |
supportedCiphers |
function | (self) -> tuple |
X.supportedCiphers() -> tuple |
supportsSsl |
function | (self) -> bool |
X.supportsSsl() -> bool |
systemCaCertificates |
function | (self) -> tuple |
X.systemCaCertificates() -> tuple |
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 |
waitForEncrypted |
function | (self, msecs: int) -> bool |
X.waitForEncrypted(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, data: str, len: int) -> int |
X.writeData(data, len) -> int |