QSslSocket

#include <QtNetwork/QSslSocket>

More information will be added here shortly. For now, you'll find more extensive information about this class in the Qt reference for QSslSocket


Overview

Inheritance

Public Functions Index

QSslSocket (QObject *parent=0)
~QSslSocket ()
voidabort ()
voidaddCaCertificate (const QSslCertificate &certificate)
booladdCaCertificates (const QString &path, QSsl::EncodingFormat format=QSsl::Pem, QRegExp::PatternSyntax syntax=QRegExp::FixedString)
voidaddCaCertificates (const QList< QSslCertificate > &certificates)
virtual boolatEnd () const
virtual qint64bytesAvailable () const
virtual qint64bytesToWrite () const
QList< QSslCertificate >caCertificates () const
virtual boolcanReadLine () const
QList< QSslCipher >ciphers () const
virtual voidclose ()
voidconnectToHostEncrypted (const QString &hostName, quint16 port, OpenMode mode=ReadWrite)
voidconnectToHostEncrypted (const QString &hostName, quint16 port, const QString &sslPeerName, OpenMode mode=ReadWrite)
qint64encryptedBytesAvailable () const
qint64encryptedBytesToWrite () const
boolflush ()
voidignoreSslErrors (const QList< QSslError > &errors)
boolisEncrypted () const
QSslCertificatelocalCertificate () const
SslModemode () const
QSslCertificatepeerCertificate () const
QList< QSslCertificate >peerCertificateChain () const
intpeerVerifyDepth () const
QSslSocket::PeerVerifyModepeerVerifyMode () const
QStringpeerVerifyName () const
QSslKeyprivateKey () const
QSsl::SslProtocolprotocol () const
QSslCiphersessionCipher () const
voidsetCaCertificates (const QList< QSslCertificate > &certificates)
voidsetCiphers (const QList< QSslCipher > &ciphers)
voidsetCiphers (const QString &ciphers)
voidsetLocalCertificate (const QSslCertificate &certificate)
voidsetLocalCertificate (const QString &fileName, QSsl::EncodingFormat format=QSsl::Pem)
voidsetPeerVerifyDepth (int depth)
voidsetPeerVerifyMode (QSslSocket::PeerVerifyMode mode)
voidsetPeerVerifyName (const QString &hostName)
voidsetPrivateKey (const QSslKey &key)
voidsetPrivateKey (const QString &fileName, QSsl::KeyAlgorithm algorithm=QSsl::Rsa, QSsl::EncodingFormat format=QSsl::Pem, const QByteArray &passPhrase=QByteArray())
voidsetProtocol (QSsl::SslProtocol protocol)
voidsetReadBufferSize (qint64 size)
boolsetSocketDescriptor (int socketDescriptor, SocketState state=ConnectedState, OpenMode openMode=ReadWrite)
voidsetSocketOption (QAbstractSocket::SocketOption option, const QVariant &value)
voidsetSslConfiguration (const QSslConfiguration &config)
QVariantsocketOption (QAbstractSocket::SocketOption option)
QSslConfigurationsslConfiguration () const
QList< QSslError >sslErrors () const
virtual boolwaitForBytesWritten (int msecs=30000)
boolwaitForConnected (int msecs=30000)
boolwaitForDisconnected (int msecs=30000)
boolwaitForEncrypted (int msecs=30000)
virtual boolwaitForReadyRead (int msecs=30000)
voidconnectToHost (const QString &hostName, quint16 port, OpenMode mode=ReadWrite)Inherited
voidconnectToHost (const QHostAddress &address, quint16 port, OpenMode mode=ReadWrite)Inherited
voiddisconnectFromHost ()Inherited
SocketErrorerror () const Inherited
QStringerrorString () const Inherited
boolgetChar (char *c)Inherited
boolisOpen () const Inherited
boolisReadable () const Inherited
virtual boolisSequential () const Inherited
boolisTextModeEnabled () const Inherited
boolisValid () const Inherited
boolisWritable () const Inherited
QHostAddresslocalAddress () const Inherited
quint16localPort () const Inherited
virtual boolopen (OpenMode mode)Inherited
OpenModeopenMode () const Inherited
qint64peek (char *data, qint64 maxlen)Inherited
QByteArraypeek (qint64 maxlen)Inherited
QHostAddresspeerAddress () const Inherited
QStringpeerName () const Inherited
quint16peerPort () const Inherited
virtual qint64pos () const Inherited
QNetworkProxyproxy () const Inherited
boolputChar (char c)Inherited
QAbstractSocket (SocketType socketType, QObject *parent)Inherited
QIODevice ()Inherited
QIODevice (QObject *parent)Inherited
QTcpSocket (QObject *parent=0)Inherited
qint64read (char *data, qint64 maxlen)Inherited
QByteArrayread (qint64 maxlen)Inherited
QByteArrayreadAll ()Inherited
qint64readBufferSize () const Inherited
qint64readLine (char *data, qint64 maxlen)Inherited
QByteArrayreadLine (qint64 maxlen=0)Inherited
virtual boolreset ()Inherited
virtual boolseek (qint64 pos)Inherited
voidsetProxy (const QNetworkProxy &networkProxy)Inherited
voidsetTextModeEnabled (bool enabled)Inherited
virtual qint64size () const Inherited
intsocketDescriptor () const Inherited
SocketTypesocketType () const Inherited
SocketStatestate () const Inherited
voidungetChar (char c)Inherited
qint64write (const char *data, qint64 len)Inherited
qint64write (const char *data)Inherited
qint64write (const QByteArray &data)Inherited

Static Public Functions Index

voidaddDefaultCaCertificate (const QSslCertificate &certificate)
booladdDefaultCaCertificates (const QString &path, QSsl::EncodingFormat format=QSsl::Pem, QRegExp::PatternSyntax syntax=QRegExp::FixedString)
voidaddDefaultCaCertificates (const QList< QSslCertificate > &certificates)
QList< QSslCertificate >defaultCaCertificates ()
QList< QSslCipher >defaultCiphers ()
voidsetDefaultCaCertificates (const QList< QSslCertificate > &certificates)
voidsetDefaultCiphers (const QList< QSslCipher > &ciphers)
QList< QSslCipher >supportedCiphers ()
boolsupportsSsl ()
QList< QSslCertificate >systemCaCertificates ()

Protected Functions Index

virtual qint64readData (char *data, qint64 maxlen)
virtual qint64writeData (const char *data, qint64 len)
QAbstractSocket (SocketType socketType, QAbstractSocketPrivate &dd, QObject *parent=0)Inherited
QIODevice (QIODevicePrivate &dd, QObject *parent=0)Inherited
QTcpSocket (QTcpSocketPrivate &dd, QObject *parent=0)Inherited
virtual qint64readLineData (char *data, qint64 maxlen)Inherited
voidsetErrorString (const QString &errorString)Inherited
voidsetLocalAddress (const QHostAddress &address)Inherited
voidsetLocalPort (quint16 port)Inherited
voidsetOpenMode (OpenMode openMode)Inherited
voidsetPeerAddress (const QHostAddress &address)Inherited
voidsetPeerName (const QString &name)Inherited
voidsetPeerPort (quint16 port)Inherited
voidsetSocketError (SocketError socketError)Inherited
voidsetSocketState (SocketState state)Inherited

Public Slots Index

Signals Index

voidencrypted ()
voidencryptedBytesWritten (qint64 totalBytes)
voidmodeChanged (QSslSocket::SslMode newMode)
voidpeerVerifyError (const QSslError &error)
voidsslErrors (const QList< QSslError > &errors)
voidaboutToClose ()Inherited
voidbytesWritten (qint64 bytes)Inherited
voidconnected ()Inherited
voiddisconnected ()Inherited
voiderror (QAbstractSocket::SocketError)Inherited
voidhostFound ()Inherited
voidproxyAuthenticationRequired (const QNetworkProxy &proxy, QAuthenticator *authenticator)Inherited
voidreadChannelFinished ()Inherited
voidreadyRead ()Inherited
voidstateChanged (QAbstractSocket::SocketState)Inherited

Public Types

PeerVerifyMode

VerifyNone
QueryPeer
VerifyPeer
AutoVerifyPeer

SslMode

UnencryptedMode
SslClientMode
SslServerMode

NetworkLayerProtocol Inherited

IPv4Protocol
IPv6Protocol
UnknownNetworkLayerProtocol -1

OpenModeFlag Inherited

NotOpen 0x0000
ReadOnly 0x0001
WriteOnly 0x0002
ReadWrite ReadOnly | WriteOnly
Append 0x0004
Truncate 0x0008
Text 0x0010
Unbuffered 0x0020

SocketError Inherited

ConnectionRefusedError
RemoteHostClosedError
HostNotFoundError
SocketAccessError
SocketResourceError
SocketTimeoutError
DatagramTooLargeError
NetworkError
AddressInUseError
SocketAddressNotAvailableError
UnsupportedSocketOperationError
UnfinishedSocketOperationError
ProxyAuthenticationRequiredError
SslHandshakeFailedError
ProxyConnectionRefusedError
ProxyConnectionClosedError
ProxyConnectionTimeoutError
ProxyNotFoundError
ProxyProtocolError
UnknownSocketError -1

SocketOption Inherited

LowDelayOption
KeepAliveOption
MulticastTtlOption
MulticastLoopbackOption

SocketState Inherited

UnconnectedState
HostLookupState
ConnectingState
ConnectedState
BoundState
ListeningState
ClosingState

SocketType Inherited

TcpSocket
UdpSocket
UnknownSocketType -1

Public Functions

QSslSocket (

~QSslSocket ()

Destructor.

void abort ()

void addCaCertificate (

bool addCaCertificates (
  • const QString &path,
  • QSsl::EncodingFormatformat,
  • QRegExp::PatternSyntaxsyntax )

void addCaCertificates (

virtual bool atEnd ()

virtual qint64 bytesAvailable ()

virtual qint64 bytesToWrite ()

QList< QSslCertificate > caCertificates ()

virtual bool canReadLine ()

QList< QSslCipher > ciphers ()

virtual void close ()

void connectToHostEncrypted (
  • const QString &hostName,
  • quint16port,
  • OpenModemode )

void connectToHostEncrypted (
  • const QString &hostName,
  • quint16port,
  • const QString &sslPeerName,
  • OpenModemode )

qint64 encryptedBytesAvailable ()

qint64 encryptedBytesToWrite ()

bool flush ()

void ignoreSslErrors (

bool isEncrypted ()

QSslCertificate localCertificate ()

SslMode mode ()

QSslCertificate peerCertificate ()

QList< QSslCertificate > peerCertificateChain ()

int peerVerifyDepth ()

QSslSocket::PeerVerifyMode peerVerifyMode ()

QString peerVerifyName ()

QSslKey privateKey ()

QSsl::SslProtocol protocol ()

QSslCipher sessionCipher ()

void setCaCertificates (

void setCiphers (

void setCiphers (

void setLocalCertificate (

void setLocalCertificate (
  • const QString &fileName,
  • QSsl::EncodingFormatformat )

void setPeerVerifyDepth (
  • intdepth)

void setPeerVerifyMode (
  • QSslSocket::PeerVerifyModemode)

void setPeerVerifyName (

void setPrivateKey (

void setPrivateKey (
  • const QString &fileName,
  • QSsl::KeyAlgorithmalgorithm,
  • QSsl::EncodingFormatformat,
  • const QByteArray &passPhrase )

void setProtocol (
  • QSsl::SslProtocolprotocol)

void setReadBufferSize (
  • qint64size)

bool setSocketDescriptor (
  • intsocketDescriptor,
  • SocketStatestate,
  • OpenModeopenMode )

void setSocketOption (
  • QAbstractSocket::SocketOptionoption,
  • const QVariant &value )

void setSslConfiguration (

QVariant socketOption (
  • QAbstractSocket::SocketOptionoption)

QSslConfiguration sslConfiguration ()

QList< QSslError > sslErrors ()

virtual bool waitForBytesWritten (
  • intmsecs)

bool waitForConnected (
  • intmsecs)

bool waitForDisconnected (
  • intmsecs)

bool waitForEncrypted (
  • intmsecs)

virtual bool waitForReadyRead (
  • intmsecs)

void connectToHost (
  • const QString &hostName,
  • quint16port,
  • OpenModemode )
Inherited

void connectToHost (Inherited

void disconnectFromHost ()Inherited

SocketError error ()Inherited

QString errorString ()Inherited

bool getChar (
  • char *c)
Inherited

bool isOpen ()Inherited

bool isReadable ()Inherited

virtual bool isSequential ()Inherited

bool isTextModeEnabled ()Inherited

bool isValid ()Inherited

bool isWritable ()Inherited

QHostAddress localAddress ()Inherited

quint16 localPort ()Inherited

virtual bool open (
  • OpenModemode)
Inherited

OpenMode openMode ()Inherited

qint64 peek (
  • char *data,
  • qint64maxlen )
Inherited

QByteArray peek (
  • qint64maxlen)
Inherited

QHostAddress peerAddress ()Inherited

QString peerName ()Inherited

quint16 peerPort ()Inherited

virtual qint64 pos ()Inherited

QNetworkProxy proxy ()Inherited

bool putChar (
  • charc)
Inherited

QAbstractSocket (
  • SocketTypesocketType,
  • QObject *parent )
Inherited

QIODevice ()Inherited

QIODevice (Inherited

QTcpSocket (Inherited

qint64 read (
  • char *data,
  • qint64maxlen )
Inherited

QByteArray read (
  • qint64maxlen)
Inherited

QByteArray readAll ()Inherited

qint64 readBufferSize ()Inherited

qint64 readLine (
  • char *data,
  • qint64maxlen )
Inherited

QByteArray readLine (
  • qint64maxlen)
Inherited

virtual bool reset ()Inherited

virtual bool seek (
  • qint64pos)
Inherited

void setProxy (Inherited

void setTextModeEnabled (
  • boolenabled)
Inherited

virtual qint64 size ()Inherited

int socketDescriptor ()Inherited

SocketType socketType ()Inherited

SocketState state ()Inherited

void ungetChar (
  • charc)
Inherited

qint64 write (
  • const char *data,
  • qint64len )
Inherited

qint64 write (
  • const char *data)
Inherited

qint64 write (Inherited

Static Public Functions

void addDefaultCaCertificate (

bool addDefaultCaCertificates (
  • const QString &path,
  • QSsl::EncodingFormatformat,
  • QRegExp::PatternSyntaxsyntax )

void addDefaultCaCertificates (

QList< QSslCertificate > defaultCaCertificates ()

QList< QSslCipher > defaultCiphers ()

void setDefaultCaCertificates (

void setDefaultCiphers (

QList< QSslCipher > supportedCiphers ()

bool supportsSsl ()

QList< QSslCertificate > systemCaCertificates ()

Protected Functions

virtual qint64 readData (
  • char *data,
  • qint64maxlen )

virtual qint64 writeData (
  • const char *data,
  • qint64len )

QAbstractSocket (
  • SocketTypesocketType,
  • QAbstractSocketPrivate &dd,
  • QObject *parent )
Inherited

QIODevice (
  • QIODevicePrivate &dd,
  • QObject *parent )
Inherited

QTcpSocket (
  • QTcpSocketPrivate &dd,
  • QObject *parent )
Inherited

virtual qint64 readLineData (
  • char *data,
  • qint64maxlen )
Inherited

void setErrorString (Inherited

void setLocalAddress (Inherited

void setLocalPort (
  • quint16port)
Inherited

void setOpenMode (
  • OpenModeopenMode)
Inherited

void setPeerAddress (Inherited

void setPeerName (Inherited

void setPeerPort (
  • quint16port)
Inherited

void setSocketError (
  • SocketErrorsocketError)
Inherited

void setSocketState (
  • SocketStatestate)
Inherited

Public Slots

void ignoreSslErrors ()

void startClientEncryption ()

void startServerEncryption ()

Signals

void encrypted ()

void encryptedBytesWritten (
  • qint64totalBytes)

void modeChanged (
  • QSslSocket::SslModenewMode)

void peerVerifyError (

void sslErrors (

void aboutToClose ()Inherited

void bytesWritten (
  • qint64bytes)
Inherited

void connected ()Inherited

void disconnected ()Inherited

void error (
  • QAbstractSocket::SocketError)
Inherited

void hostFound ()Inherited

void proxyAuthenticationRequired (Inherited

void readChannelFinished ()Inherited

void readyRead ()Inherited

void stateChanged (
  • QAbstractSocket::SocketState)
Inherited

Last modified: 2015-07-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus