qtnetwork

package
v0.0.0-...-1f663c5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2020 License: LGPL-3.0 Imports: 7 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteQAbstractNetworkCache

func DeleteQAbstractNetworkCache(this *QAbstractNetworkCache)

func DeleteQAbstractSocket

func DeleteQAbstractSocket(this *QAbstractSocket)

func DeleteQAuthenticator

func DeleteQAuthenticator(this *QAuthenticator)

func DeleteQDnsDomainNameRecord

func DeleteQDnsDomainNameRecord(this *QDnsDomainNameRecord)

func DeleteQDnsHostAddressRecord

func DeleteQDnsHostAddressRecord(this *QDnsHostAddressRecord)

func DeleteQDnsLookup

func DeleteQDnsLookup(this *QDnsLookup)

func DeleteQDnsMailExchangeRecord

func DeleteQDnsMailExchangeRecord(this *QDnsMailExchangeRecord)

func DeleteQDnsServiceRecord

func DeleteQDnsServiceRecord(this *QDnsServiceRecord)

func DeleteQDnsTextRecord

func DeleteQDnsTextRecord(this *QDnsTextRecord)

func DeleteQDtls

func DeleteQDtls(this *QDtls)

func DeleteQDtlsClientVerifier

func DeleteQDtlsClientVerifier(this *QDtlsClientVerifier)

func DeleteQHostAddress

func DeleteQHostAddress(this *QHostAddress)

func DeleteQHostInfo

func DeleteQHostInfo(this *QHostInfo)

func DeleteQHstsPolicy

func DeleteQHstsPolicy(this *QHstsPolicy)

func DeleteQHttpMultiPart

func DeleteQHttpMultiPart(this *QHttpMultiPart)

func DeleteQHttpPart

func DeleteQHttpPart(this *QHttpPart)

func DeleteQIPv6Address

func DeleteQIPv6Address(this *QIPv6Address)

func DeleteQLocalServer

func DeleteQLocalServer(this *QLocalServer)

func DeleteQLocalSocket

func DeleteQLocalSocket(this *QLocalSocket)

func DeleteQNetworkAccessManager

func DeleteQNetworkAccessManager(this *QNetworkAccessManager)

func DeleteQNetworkAddressEntry

func DeleteQNetworkAddressEntry(this *QNetworkAddressEntry)

func DeleteQNetworkCacheMetaData

func DeleteQNetworkCacheMetaData(this *QNetworkCacheMetaData)

func DeleteQNetworkConfiguration

func DeleteQNetworkConfiguration(this *QNetworkConfiguration)

func DeleteQNetworkConfigurationManager

func DeleteQNetworkConfigurationManager(this *QNetworkConfigurationManager)

func DeleteQNetworkCookie

func DeleteQNetworkCookie(this *QNetworkCookie)

func DeleteQNetworkCookieJar

func DeleteQNetworkCookieJar(this *QNetworkCookieJar)

func DeleteQNetworkDatagram

func DeleteQNetworkDatagram(this *QNetworkDatagram)

func DeleteQNetworkDiskCache

func DeleteQNetworkDiskCache(this *QNetworkDiskCache)

func DeleteQNetworkInterface

func DeleteQNetworkInterface(this *QNetworkInterface)

func DeleteQNetworkProxy

func DeleteQNetworkProxy(this *QNetworkProxy)

func DeleteQNetworkProxyFactory

func DeleteQNetworkProxyFactory(this *QNetworkProxyFactory)

func DeleteQNetworkProxyQuery

func DeleteQNetworkProxyQuery(this *QNetworkProxyQuery)

func DeleteQNetworkReply

func DeleteQNetworkReply(this *QNetworkReply)

func DeleteQNetworkRequest

func DeleteQNetworkRequest(this *QNetworkRequest)

func DeleteQNetworkSession

func DeleteQNetworkSession(this *QNetworkSession)

func DeleteQSslCertificate

func DeleteQSslCertificate(this *QSslCertificate)

func DeleteQSslCertificateExtension

func DeleteQSslCertificateExtension(this *QSslCertificateExtension)

func DeleteQSslCipher

func DeleteQSslCipher(this *QSslCipher)

func DeleteQSslConfiguration

func DeleteQSslConfiguration(this *QSslConfiguration)

func DeleteQSslDiffieHellmanParameters

func DeleteQSslDiffieHellmanParameters(this *QSslDiffieHellmanParameters)

func DeleteQSslEllipticCurve

func DeleteQSslEllipticCurve(this *QSslEllipticCurve)

func DeleteQSslError

func DeleteQSslError(this *QSslError)

func DeleteQSslKey

func DeleteQSslKey(this *QSslKey)

func DeleteQSslPreSharedKeyAuthenticator

func DeleteQSslPreSharedKeyAuthenticator(this *QSslPreSharedKeyAuthenticator)

func DeleteQSslSocket

func DeleteQSslSocket(this *QSslSocket)

func DeleteQTcpServer

func DeleteQTcpServer(this *QTcpServer)

func DeleteQTcpSocket

func DeleteQTcpSocket(this *QTcpSocket)

func DeleteQUdpSocket

func DeleteQUdpSocket(this *QUdpSocket)

func DeriveKeyPbkdf1

func DeriveKeyPbkdf1(algorithm int, password qtcore.QByteArray_ITF, salt qtcore.QByteArray_ITF, iterations int, dkLen uint64) *qtcore.QByteArray

Returns a hash computed using the PBKDF1-algorithm as defined in RFC 8018.

The function takes the data and salt, and then hashes it repeatedly for iterations iterations using the specified hash algorithm. If the resulting hash is longer than dkLen then it is truncated before it is returned.

This function only supports SHA-1 and MD5! The max output size is 160 bits (20 bytes) when using SHA-1, or 128 bits (16 bytes) when using MD5. Specifying a value for dkLen which is greater than this results in a warning and an empty QByteArray is returned. To programmatically check this limit you can use QCryptographicHash::hashLength. Furthermore: the salt must always be 8 bytes long!

Note: This function is provided for use with legacy applications and all new applications are recommended to use PBKDF2.

This function was introduced in Qt 5.12.

See also deriveKeyPbkdf2, QCryptographicHash, and QCryptographicHash::hashLength.

func DeriveKeyPbkdf2

func DeriveKeyPbkdf2(algorithm int, password qtcore.QByteArray_ITF, salt qtcore.QByteArray_ITF, iterations int, dkLen uint64) *qtcore.QByteArray

Derive a key using the PBKDF2-algorithm as defined in RFC 8018.

This function takes the data and salt, and then applies HMAC-X, where the X is algorithm, repeatedly. It internally concatenates intermediate results to the final output until at least dkLen amount of bytes have been computed and it will execute HMAC-X iterations times each time a concatenation is required. The total number of times it will execute HMAC-X depends on iterations, dkLen and algorithm and can be calculated as iterations * ceil(dkLen / QCryptographicHash::hashLength(algorithm)).

This function was introduced in Qt 5.12.

See also deriveKeyPbkdf1, QMessageAuthenticationCode, and QCryptographicHash.

func KeepMe

func KeepMe()

func Operator_equal_equal66

func Operator_equal_equal66(lhs QHstsPolicy_ITF, rhs QHstsPolicy_ITF) bool

func Operator_equal_equal67

func Operator_equal_equal67(address1 int, address2 QHostAddress_ITF) bool

func Operator_equal_equal68

func Operator_equal_equal68(lhs QSslEllipticCurve_ITF, rhs QSslEllipticCurve_ITF) bool

func Operator_not_equal66

func Operator_not_equal66(lhs QHstsPolicy_ITF, rhs QHstsPolicy_ITF) bool

func Operator_not_equal67

func Operator_not_equal67(lhs int, rhs QHostAddress_ITF) bool

func Operator_not_equal68

func Operator_not_equal68(lhs QSslEllipticCurve_ITF, rhs QSslEllipticCurve_ITF) bool

func Operator_or78

func Operator_or78(f1 int, f2 int) *qtcore.QIncompatibleFlag

func Operator_or79

func Operator_or79(f1 int, f2 int) *qtcore.QIncompatibleFlag

func Operator_or80

func Operator_or80(f1 int, f2 int) *qtcore.QIncompatibleFlag

func Operator_or81

func Operator_or81(f1 int, f2 int) *qtcore.QIncompatibleFlag

func Operator_or82

func Operator_or82(f1 int, f2 int) *qtcore.QIncompatibleFlag

func Operator_or83

func Operator_or83(f1 int, f2 int) *qtcore.QIncompatibleFlag

func Operator_or85

func Operator_or85(f1 int, f2 int) *qtcore.QIncompatibleFlag

func Operator_or86

func Operator_or86(f1 int, f2 int) *qtcore.QIncompatibleFlag

func QAbstractSocket_BindFlagItemName

func QAbstractSocket_BindFlagItemName(val int) string

func QAbstractSocket_NetworkLayerProtocolItemName

func QAbstractSocket_NetworkLayerProtocolItemName(val int) string

func QAbstractSocket_PauseModeItemName

func QAbstractSocket_PauseModeItemName(val int) string

func QAbstractSocket_SocketErrorItemName

func QAbstractSocket_SocketErrorItemName(val int) string

func QAbstractSocket_SocketOptionItemName

func QAbstractSocket_SocketOptionItemName(val int) string

func QAbstractSocket_SocketStateItemName

func QAbstractSocket_SocketStateItemName(val int) string

func QAbstractSocket_SocketTypeItemName

func QAbstractSocket_SocketTypeItemName(val int) string

func QDnsLookup_ErrorItemName

func QDnsLookup_ErrorItemName(val int) string

func QDnsLookup_TypeItemName

func QDnsLookup_TypeItemName(val int) string

func QDtls_HandshakeStateItemName

func QDtls_HandshakeStateItemName(val int) string

func QHash45

func QHash45(key QSslError_ITF, seed uint) uint

func QHash46

func QHash46(dhparam QSslDiffieHellmanParameters_ITF, seed uint) uint

Returns an hash value for dhparam, using seed to seed the calculation.

This function was introduced in Qt 5.8.

func QHash47

func QHash47(key QSslCertificate_ITF, seed uint) uint

func QHash48

func QHash48(key QHostAddress_ITF, seed uint) uint

Returns a hash of the host address key, using seed to seed the calculation.

This function was introduced in Qt 5.0.

func QHash49

func QHash49(curve QSslEllipticCurve_ITF, seed uint) uint

func QHash50

func QHash50(curve QSslEllipticCurve_ITF, seed uint) uint

func QHostAddress_ConversionModeFlagItemName

func QHostAddress_ConversionModeFlagItemName(val int) string

func QHostAddress_SpecialAddressItemName

func QHostAddress_SpecialAddressItemName(val int) string

func QHostInfo_AbortHostLookup

func QHostInfo_AbortHostLookup(lookupId int)

func QHostInfo_HostInfoErrorItemName

func QHostInfo_HostInfoErrorItemName(val int) string

func QHostInfo_LocalDomainName

func QHostInfo_LocalDomainName() string

func QHostInfo_LocalHostName

func QHostInfo_LocalHostName() string

func QHostInfo_LookupHost

func QHostInfo_LookupHost(name string, receiver qtcore.QObject_ITF, member string) int

func QHstsPolicy_PolicyFlagItemName

func QHstsPolicy_PolicyFlagItemName(val int) string

func QHttpMultiPart_ContentTypeItemName

func QHttpMultiPart_ContentTypeItemName(val int) string

func QLocalServer_RemoveServer

func QLocalServer_RemoveServer(name string) bool

func QLocalServer_SocketOptionItemName

func QLocalServer_SocketOptionItemName(val int) string

func QLocalSocket_LocalSocketErrorItemName

func QLocalSocket_LocalSocketErrorItemName(val int) string

func QLocalSocket_LocalSocketStateItemName

func QLocalSocket_LocalSocketStateItemName(val int) string

func QNetworkAccessManager_NetworkAccessibilityItemName

func QNetworkAccessManager_NetworkAccessibilityItemName(val int) string

func QNetworkAccessManager_OperationItemName

func QNetworkAccessManager_OperationItemName(val int) string

func QNetworkAddressEntry_DnsEligibilityStatusItemName

func QNetworkAddressEntry_DnsEligibilityStatusItemName(val int) string

func QNetworkConfigurationManager_CapabilityItemName

func QNetworkConfigurationManager_CapabilityItemName(val int) string

func QNetworkConfiguration_BearerTypeItemName

func QNetworkConfiguration_BearerTypeItemName(val int) string

func QNetworkConfiguration_PurposeItemName

func QNetworkConfiguration_PurposeItemName(val int) string

func QNetworkConfiguration_StateFlagItemName

func QNetworkConfiguration_StateFlagItemName(val int) string

func QNetworkConfiguration_TypeItemName

func QNetworkConfiguration_TypeItemName(val int) string

func QNetworkCookie_RawFormItemName

func QNetworkCookie_RawFormItemName(val int) string

func QNetworkInterface_InterfaceFlagItemName

func QNetworkInterface_InterfaceFlagItemName(val int) string

func QNetworkInterface_InterfaceIndexFromName

func QNetworkInterface_InterfaceIndexFromName(name string) int

func QNetworkInterface_InterfaceNameFromIndex

func QNetworkInterface_InterfaceNameFromIndex(index int) string

func QNetworkInterface_InterfaceTypeItemName

func QNetworkInterface_InterfaceTypeItemName(val int) string

func QNetworkProxyFactory_SetApplicationProxyFactory

func QNetworkProxyFactory_SetApplicationProxyFactory(factory QNetworkProxyFactory_ITF)

func QNetworkProxyFactory_SetUseSystemConfiguration

func QNetworkProxyFactory_SetUseSystemConfiguration(enable bool)

func QNetworkProxyFactory_UsesSystemConfiguration

func QNetworkProxyFactory_UsesSystemConfiguration() bool

func QNetworkProxyQuery_QueryTypeItemName

func QNetworkProxyQuery_QueryTypeItemName(val int) string

func QNetworkProxy_CapabilityItemName

func QNetworkProxy_CapabilityItemName(val int) string

func QNetworkProxy_ProxyTypeItemName

func QNetworkProxy_ProxyTypeItemName(val int) string

func QNetworkProxy_SetApplicationProxy

func QNetworkProxy_SetApplicationProxy(proxy QNetworkProxy_ITF)

func QNetworkReply_NetworkErrorItemName

func QNetworkReply_NetworkErrorItemName(val int) string

func QNetworkRequest_AttributeItemName

func QNetworkRequest_AttributeItemName(val int) string

func QNetworkRequest_CacheLoadControlItemName

func QNetworkRequest_CacheLoadControlItemName(val int) string

func QNetworkRequest_KnownHeadersItemName

func QNetworkRequest_KnownHeadersItemName(val int) string

func QNetworkRequest_LoadControlItemName

func QNetworkRequest_LoadControlItemName(val int) string

func QNetworkRequest_PriorityItemName

func QNetworkRequest_PriorityItemName(val int) string

func QNetworkRequest_RedirectPolicyItemName

func QNetworkRequest_RedirectPolicyItemName(val int) string

func QNetworkSession_SessionErrorItemName

func QNetworkSession_SessionErrorItemName(val int) string

func QNetworkSession_StateItemName

func QNetworkSession_StateItemName(val int) string

func QNetworkSession_UsagePolicyItemName

func QNetworkSession_UsagePolicyItemName(val int) string

func QSslCertificate_SubjectInfoItemName

func QSslCertificate_SubjectInfoItemName(val int) string

func QSslConfiguration_NextProtocolNegotiationStatusItemName

func QSslConfiguration_NextProtocolNegotiationStatusItemName(val int) string

func QSslConfiguration_SetDefaultConfiguration

func QSslConfiguration_SetDefaultConfiguration(configuration QSslConfiguration_ITF)

func QSslConfiguration_SetDefaultDtlsConfiguration

func QSslConfiguration_SetDefaultDtlsConfiguration(configuration QSslConfiguration_ITF)

func QSslDiffieHellmanParameters_ErrorItemName

func QSslDiffieHellmanParameters_ErrorItemName(val int) string

func QSslError_SslErrorItemName

func QSslError_SslErrorItemName(val int) string

func QSslSocket_AddDefaultCaCertificate

func QSslSocket_AddDefaultCaCertificate(certificate QSslCertificate_ITF)

func QSslSocket_AddDefaultCaCertificates

func QSslSocket_AddDefaultCaCertificates(path string, format int, syntax int) bool

func QSslSocket_PeerVerifyModeItemName

func QSslSocket_PeerVerifyModeItemName(val int) string

func QSslSocket_SslLibraryBuildVersionNumber

func QSslSocket_SslLibraryBuildVersionNumber() int

func QSslSocket_SslLibraryBuildVersionString

func QSslSocket_SslLibraryBuildVersionString() string

func QSslSocket_SslLibraryVersionNumber

func QSslSocket_SslLibraryVersionNumber() int

func QSslSocket_SslLibraryVersionString

func QSslSocket_SslLibraryVersionString() string

func QSslSocket_SslModeItemName

func QSslSocket_SslModeItemName(val int) string

func QSslSocket_SupportsSsl

func QSslSocket_SupportsSsl() bool

func Swap62

func Swap62(value1 QSslError_ITF, value2 QSslError_ITF)

Swaps this error instance with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

func Swap64

func Swap64(value1 QHostInfo_ITF, value2 QHostInfo_ITF)

Swaps host-info other with this host-info. This operation is very fast and never fails.

This function was introduced in Qt 5.10.

func Swap65

func Swap65(value1 QSslKey_ITF, value2 QSslKey_ITF)

Swaps this ssl key with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

func Swap67

Swaps this QSslDiffieHellmanParameters with other. This function is very fast and never fails.

func Swap68

Swaps this certificate extension instance with other. This function is very fast and never fails.

func Swap70

Swaps this network configuration with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

func Swap73

Swaps this network interface instance with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

func Swap75

func Swap75(value1 QNetworkProxyQuery_ITF, value2 QNetworkProxyQuery_ITF)

Swaps this network proxy instance with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

func Swap76

func Swap76(value1 QSslConfiguration_ITF, value2 QSslConfiguration_ITF)

Swaps this SSL configuration instance with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

func Swap77

func Swap77(value1 QNetworkInterface_ITF, value2 QNetworkInterface_ITF)

Swaps this network interface instance with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

func Swap79

func Swap79(value1 QNetworkDatagram_ITF, value2 QNetworkDatagram_ITF)

Swaps this instance with other.

func Swap80

func Swap80(value1 QSslCertificate_ITF, value2 QSslCertificate_ITF)

Swaps this certificate instance with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

func Swap81

func Swap81(value1 QNetworkRequest_ITF, value2 QNetworkRequest_ITF)

Swaps this network request with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

func Swap82

func Swap82(value1 QNetworkCookie_ITF, value2 QNetworkCookie_ITF)

Swaps this cookie with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

func Swap84

func Swap84(value1 QNetworkProxy_ITF, value2 QNetworkProxy_ITF)

Swaps this network proxy instance with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

func Swap85

func Swap85(value1 QHostAddress_ITF, value2 QHostAddress_ITF)

Swaps this host address with other. This operation is very fast and never fails.

This function was introduced in Qt 5.6.

func Swap86

func Swap86(value1 QHstsPolicy_ITF, value2 QHstsPolicy_ITF)

Swaps this policy with the other policy.

func Swap87

func Swap87(value1 QSslCipher_ITF, value2 QSslCipher_ITF)

Swaps this cipher instance with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

Types

type QAbstractNetworkCache

type QAbstractNetworkCache struct {
	*qtcore.QObject
}

func NewQAbstractNetworkCache

func NewQAbstractNetworkCache(parent qtcore.QObject_ITF) *QAbstractNetworkCache

func NewQAbstractNetworkCacheFromPointer

func NewQAbstractNetworkCacheFromPointer(cthis unsafe.Pointer) *QAbstractNetworkCache

func NewQAbstractNetworkCachep

func NewQAbstractNetworkCachep() *QAbstractNetworkCache

func (*QAbstractNetworkCache) CacheSize

func (this *QAbstractNetworkCache) CacheSize() int64

Returns the current size taken up by the cache. Depending upon the cache implementation this might be disk or memory size.

In the base class this is a pure virtual function.

See also clear().

func (*QAbstractNetworkCache) Clear

func (this *QAbstractNetworkCache) Clear()

Removes all items from the cache. Unless there was failures clearing the cache cacheSize() should return 0 after a call to clear.

In the base class this is a pure virtual function.

See also cacheSize() and remove().

func (*QAbstractNetworkCache) Data

Returns the data associated with url.

It is up to the application that requests the data to delete the QIODevice when done with it.

If there is no cache for url, the url is invalid, or if there is an internal cache error 0 is returned.

In the base class this is a pure virtual function.

See also metaData() and prepare().

func (*QAbstractNetworkCache) GetCthis

func (this *QAbstractNetworkCache) GetCthis() unsafe.Pointer

func (*QAbstractNetworkCache) MetaData

Returns the meta data for the url url.

If the url is valid and the cache contains the data for url, a valid QNetworkCacheMetaData is returned.

In the base class this is a pure virtual function.

See also updateMetaData() and data().

func (*QAbstractNetworkCache) MetaObject

func (this *QAbstractNetworkCache) MetaObject() *qtcore.QMetaObject

func (*QAbstractNetworkCache) NewForInherit

Constructs an abstract network cache with the given parent.

func (*QAbstractNetworkCache) NewForInheritp

func (*QAbstractNetworkCache) NewForInheritp() *QAbstractNetworkCache

Constructs an abstract network cache with the given parent.

func (*QAbstractNetworkCache) NewFromPointer

func (*QAbstractNetworkCache) Prepare

Returns the device that should be populated with the data for the cache item metaData. When all of the data has been written insert() should be called. If metaData is invalid or the url in the metadata is invalid 0 is returned.

The cache owns the device and will take care of deleting it when it is inserted or removed.

To cancel a prepared inserted call remove() on the metadata's url.

In the base class this is a pure virtual function.

See also remove(), updateMetaData(), and insert().

func (*QAbstractNetworkCache) QAbstractNetworkCache_PTR

func (ptr *QAbstractNetworkCache) QAbstractNetworkCache_PTR() *QAbstractNetworkCache

func (*QAbstractNetworkCache) Remove

func (this *QAbstractNetworkCache) Remove(url qtcore.QUrl_ITF) bool

Removes the cache entry for url, returning true if success otherwise false.

In the base class this is a pure virtual function.

See also clear() and prepare().

func (*QAbstractNetworkCache) SetCthis

func (this *QAbstractNetworkCache) SetCthis(cthis unsafe.Pointer)

func (*QAbstractNetworkCache) UpdateMetaData

func (this *QAbstractNetworkCache) UpdateMetaData(metaData QNetworkCacheMetaData_ITF)

Updates the cache meta date for the metaData's url to metaData

If the cache does not contains a cache item for the url then no action is taken.

In the base class this is a pure virtual function.

See also metaData() and prepare().

type QAbstractNetworkCache_ITF

type QAbstractNetworkCache_ITF interface {
	qtcore.QObject_ITF
	QAbstractNetworkCache_PTR() *QAbstractNetworkCache
}

type QAbstractSocket

type QAbstractSocket struct {
	*qtcore.QIODevice
}

func NewQAbstractSocket

func NewQAbstractSocket(socketType int, parent qtcore.QObject_ITF) *QAbstractSocket

func NewQAbstractSocketFromPointer

func NewQAbstractSocketFromPointer(cthis unsafe.Pointer) *QAbstractSocket

func (*QAbstractSocket) Abort

func (this *QAbstractSocket) Abort()

Aborts the current connection and resets the socket. Unlike disconnectFromHost(), this function immediately closes the socket, discarding any pending data in the write buffer.

See also disconnectFromHost() and close().

func (*QAbstractSocket) AtEnd

func (this *QAbstractSocket) AtEnd() bool

Reimplemented from QIODevice::atEnd().

Returns true if no more data is currently available for reading; otherwise returns false.

This function is most commonly used when reading data from the socket in a loop. For example:

// This slot is connected to QAbstractSocket::readyRead()
void SocketClass::readyReadSlot()
{
    while (!socket.atEnd()) {
        QByteArray data = socket.read(100);
        ....
    }
}

See also bytesAvailable() and readyRead().

func (*QAbstractSocket) Bind

func (this *QAbstractSocket) Bind(address QHostAddress_ITF, port uint16, mode int) bool

Binds to address on port port, using the BindMode mode.

For UDP sockets, after binding, the signal QUdpSocket::readyRead() is emitted whenever a UDP datagram arrives on the specified address and port. Thus, this function is useful to write UDP servers.

For TCP sockets, this function may be used to specify which interface to use for an outgoing connection, which is useful in case of multiple network interfaces.

By default, the socket is bound using the DefaultForPlatform BindMode. If a port is not specified, a random port is chosen.

On success, the function returns true and the socket enters BoundState; otherwise it returns false.

This function was introduced in Qt 5.0.

func (*QAbstractSocket) Bind1

func (this *QAbstractSocket) Bind1(port uint16, mode int) bool

Binds to address on port port, using the BindMode mode.

For UDP sockets, after binding, the signal QUdpSocket::readyRead() is emitted whenever a UDP datagram arrives on the specified address and port. Thus, this function is useful to write UDP servers.

For TCP sockets, this function may be used to specify which interface to use for an outgoing connection, which is useful in case of multiple network interfaces.

By default, the socket is bound using the DefaultForPlatform BindMode. If a port is not specified, a random port is chosen.

On success, the function returns true and the socket enters BoundState; otherwise it returns false.

This function was introduced in Qt 5.0.

func (*QAbstractSocket) Bind1p

func (this *QAbstractSocket) Bind1p() bool

Binds to address on port port, using the BindMode mode.

For UDP sockets, after binding, the signal QUdpSocket::readyRead() is emitted whenever a UDP datagram arrives on the specified address and port. Thus, this function is useful to write UDP servers.

For TCP sockets, this function may be used to specify which interface to use for an outgoing connection, which is useful in case of multiple network interfaces.

By default, the socket is bound using the DefaultForPlatform BindMode. If a port is not specified, a random port is chosen.

On success, the function returns true and the socket enters BoundState; otherwise it returns false.

This function was introduced in Qt 5.0.

func (*QAbstractSocket) Bind1p1

func (this *QAbstractSocket) Bind1p1(port uint16) bool

Binds to address on port port, using the BindMode mode.

For UDP sockets, after binding, the signal QUdpSocket::readyRead() is emitted whenever a UDP datagram arrives on the specified address and port. Thus, this function is useful to write UDP servers.

For TCP sockets, this function may be used to specify which interface to use for an outgoing connection, which is useful in case of multiple network interfaces.

By default, the socket is bound using the DefaultForPlatform BindMode. If a port is not specified, a random port is chosen.

On success, the function returns true and the socket enters BoundState; otherwise it returns false.

This function was introduced in Qt 5.0.

func (*QAbstractSocket) BindFlagItemName

func (this *QAbstractSocket) BindFlagItemName(val int) string

func (*QAbstractSocket) Bindp

func (this *QAbstractSocket) Bindp(address QHostAddress_ITF) bool

Binds to address on port port, using the BindMode mode.

For UDP sockets, after binding, the signal QUdpSocket::readyRead() is emitted whenever a UDP datagram arrives on the specified address and port. Thus, this function is useful to write UDP servers.

For TCP sockets, this function may be used to specify which interface to use for an outgoing connection, which is useful in case of multiple network interfaces.

By default, the socket is bound using the DefaultForPlatform BindMode. If a port is not specified, a random port is chosen.

On success, the function returns true and the socket enters BoundState; otherwise it returns false.

This function was introduced in Qt 5.0.

func (*QAbstractSocket) Bindp1

func (this *QAbstractSocket) Bindp1(address QHostAddress_ITF, port uint16) bool

Binds to address on port port, using the BindMode mode.

For UDP sockets, after binding, the signal QUdpSocket::readyRead() is emitted whenever a UDP datagram arrives on the specified address and port. Thus, this function is useful to write UDP servers.

For TCP sockets, this function may be used to specify which interface to use for an outgoing connection, which is useful in case of multiple network interfaces.

By default, the socket is bound using the DefaultForPlatform BindMode. If a port is not specified, a random port is chosen.

On success, the function returns true and the socket enters BoundState; otherwise it returns false.

This function was introduced in Qt 5.0.

func (*QAbstractSocket) BytesAvailable

func (this *QAbstractSocket) BytesAvailable() int64

Reimplemented from QIODevice::bytesAvailable().

Returns the number of incoming bytes that are waiting to be read.

See also bytesToWrite() and read().

func (*QAbstractSocket) BytesToWrite

func (this *QAbstractSocket) BytesToWrite() int64

Reimplemented from QIODevice::bytesToWrite().

Returns the number of bytes that are waiting to be written. The bytes are written when control goes back to the event loop or when flush() is called.

See also bytesAvailable() and flush().

func (*QAbstractSocket) CanReadLine

func (this *QAbstractSocket) CanReadLine() bool

Reimplemented from QIODevice::canReadLine().

Returns true if a line of data can be read from the socket; otherwise returns false.

See also readLine().

func (*QAbstractSocket) Close

func (this *QAbstractSocket) Close()

Reimplemented from QIODevice::close().

Closes the I/O device for the socket and calls disconnectFromHost() to close the socket's connection.

See QIODevice::close() for a description of the actions that occur when an I/O device is closed.

See also abort().

func (*QAbstractSocket) ConnectToHost

func (this *QAbstractSocket) ConnectToHost(hostName string, port uint16, mode int, protocol int)

Attempts to make a connection to hostName on the given port. The protocol parameter can be used to specify which network protocol to use (eg. IPv4 or IPv6).

The socket is opened in the given openMode and first enters HostLookupState, then performs a host name lookup of hostName. If the lookup succeeds, hostFound() is emitted and QAbstractSocket enters ConnectingState. It then attempts to connect to the address or addresses returned by the lookup. Finally, if a connection is established, QAbstractSocket enters ConnectedState and emits connected().

At any point, the socket can emit error() to signal that an error occurred.

hostName may be an IP address in string form (e.g., "43.195.83.32"), or it may be a host name (e.g., "example.com"). QAbstractSocket will do a lookup only if required. port is in native byte order.

See also state(), peerName(), peerAddress(), peerPort(), and waitForConnected().

func (*QAbstractSocket) ConnectToHost1

func (this *QAbstractSocket) ConnectToHost1(address QHostAddress_ITF, port uint16, mode int)

Attempts to make a connection to hostName on the given port. The protocol parameter can be used to specify which network protocol to use (eg. IPv4 or IPv6).

The socket is opened in the given openMode and first enters HostLookupState, then performs a host name lookup of hostName. If the lookup succeeds, hostFound() is emitted and QAbstractSocket enters ConnectingState. It then attempts to connect to the address or addresses returned by the lookup. Finally, if a connection is established, QAbstractSocket enters ConnectedState and emits connected().

At any point, the socket can emit error() to signal that an error occurred.

hostName may be an IP address in string form (e.g., "43.195.83.32"), or it may be a host name (e.g., "example.com"). QAbstractSocket will do a lookup only if required. port is in native byte order.

See also state(), peerName(), peerAddress(), peerPort(), and waitForConnected().

func (*QAbstractSocket) ConnectToHost1p

func (this *QAbstractSocket) ConnectToHost1p(address QHostAddress_ITF, port uint16)

Attempts to make a connection to hostName on the given port. The protocol parameter can be used to specify which network protocol to use (eg. IPv4 or IPv6).

The socket is opened in the given openMode and first enters HostLookupState, then performs a host name lookup of hostName. If the lookup succeeds, hostFound() is emitted and QAbstractSocket enters ConnectingState. It then attempts to connect to the address or addresses returned by the lookup. Finally, if a connection is established, QAbstractSocket enters ConnectedState and emits connected().

At any point, the socket can emit error() to signal that an error occurred.

hostName may be an IP address in string form (e.g., "43.195.83.32"), or it may be a host name (e.g., "example.com"). QAbstractSocket will do a lookup only if required. port is in native byte order.

See also state(), peerName(), peerAddress(), peerPort(), and waitForConnected().

func (*QAbstractSocket) ConnectToHostp

func (this *QAbstractSocket) ConnectToHostp(hostName string, port uint16)

Attempts to make a connection to hostName on the given port. The protocol parameter can be used to specify which network protocol to use (eg. IPv4 or IPv6).

The socket is opened in the given openMode and first enters HostLookupState, then performs a host name lookup of hostName. If the lookup succeeds, hostFound() is emitted and QAbstractSocket enters ConnectingState. It then attempts to connect to the address or addresses returned by the lookup. Finally, if a connection is established, QAbstractSocket enters ConnectedState and emits connected().

At any point, the socket can emit error() to signal that an error occurred.

hostName may be an IP address in string form (e.g., "43.195.83.32"), or it may be a host name (e.g., "example.com"). QAbstractSocket will do a lookup only if required. port is in native byte order.

See also state(), peerName(), peerAddress(), peerPort(), and waitForConnected().

func (*QAbstractSocket) ConnectToHostp1

func (this *QAbstractSocket) ConnectToHostp1(hostName string, port uint16, mode int)

Attempts to make a connection to hostName on the given port. The protocol parameter can be used to specify which network protocol to use (eg. IPv4 or IPv6).

The socket is opened in the given openMode and first enters HostLookupState, then performs a host name lookup of hostName. If the lookup succeeds, hostFound() is emitted and QAbstractSocket enters ConnectingState. It then attempts to connect to the address or addresses returned by the lookup. Finally, if a connection is established, QAbstractSocket enters ConnectedState and emits connected().

At any point, the socket can emit error() to signal that an error occurred.

hostName may be an IP address in string form (e.g., "43.195.83.32"), or it may be a host name (e.g., "example.com"). QAbstractSocket will do a lookup only if required. port is in native byte order.

See also state(), peerName(), peerAddress(), peerPort(), and waitForConnected().

func (*QAbstractSocket) Connected

func (this *QAbstractSocket) Connected()

This signal is emitted after connectToHost() has been called and a connection has been successfully established.

Note: On some operating systems the connected() signal may be directly emitted from the connectToHost() call for connections to the localhost.

See also connectToHost() and disconnected().

func (*QAbstractSocket) DisconnectFromHost

func (this *QAbstractSocket) DisconnectFromHost()

Attempts to close the socket. If there is pending data waiting to be written, QAbstractSocket will enter ClosingState and wait until all data has been written. Eventually, it will enter UnconnectedState and emit the disconnected() signal.

See also connectToHost().

func (*QAbstractSocket) Disconnected

func (this *QAbstractSocket) Disconnected()

This signal is emitted when the socket has been disconnected.

Warning: If you need to delete the sender() of this signal in a slot connected to it, use the deleteLater() function.

See also connectToHost(), disconnectFromHost(), and abort().

func (*QAbstractSocket) Error

func (this *QAbstractSocket) Error() int

Returns the type of error that last occurred.

See also state() and errorString().

func (*QAbstractSocket) Error1

func (this *QAbstractSocket) Error1(arg0 int)

Returns the type of error that last occurred.

See also state() and errorString().

func (*QAbstractSocket) Flush

func (this *QAbstractSocket) Flush() bool

This function writes as much as possible from the internal write buffer to the underlying network socket, without blocking. If any data was written, this function returns true; otherwise false is returned.

Call this function if you need QAbstractSocket to start sending buffered data immediately. The number of bytes successfully written depends on the operating system. In most cases, you do not need to call this function, because QAbstractSocket will start sending data automatically once control goes back to the event loop. In the absence of an event loop, call waitForBytesWritten() instead.

See also write() and waitForBytesWritten().

func (*QAbstractSocket) GetCthis

func (this *QAbstractSocket) GetCthis() unsafe.Pointer

func (*QAbstractSocket) HostFound

func (this *QAbstractSocket) HostFound()

This signal is emitted after connectToHost() has been called and the host lookup has succeeded.

Note: Since Qt 4.6.3 QAbstractSocket may emit hostFound() directly from the connectToHost() call since a DNS result could have been cached.

See also connected().

func (*QAbstractSocket) InheritReadData

func (this *QAbstractSocket) InheritReadData(f func(data string, maxlen int64) int64)

long long readData(char *, qint64)

func (*QAbstractSocket) InheritReadLineData

func (this *QAbstractSocket) InheritReadLineData(f func(data string, maxlen int64) int64)

long long readLineData(char *, qint64)

func (*QAbstractSocket) InheritSetLocalAddress

func (this *QAbstractSocket) InheritSetLocalAddress(f func(address *QHostAddress))

void setLocalAddress(const QHostAddress &)

func (*QAbstractSocket) InheritSetLocalPort

func (this *QAbstractSocket) InheritSetLocalPort(f func(port uint16))

void setLocalPort(quint16)

func (*QAbstractSocket) InheritSetPeerAddress

func (this *QAbstractSocket) InheritSetPeerAddress(f func(address *QHostAddress))

void setPeerAddress(const QHostAddress &)

func (*QAbstractSocket) InheritSetPeerName

func (this *QAbstractSocket) InheritSetPeerName(f func(name string))

void setPeerName(const QString &)

func (*QAbstractSocket) InheritSetPeerPort

func (this *QAbstractSocket) InheritSetPeerPort(f func(port uint16))

void setPeerPort(quint16)

func (*QAbstractSocket) InheritSetSocketError

func (this *QAbstractSocket) InheritSetSocketError(f func(socketError int))

void setSocketError(QAbstractSocket::SocketError)

func (*QAbstractSocket) InheritSetSocketState

func (this *QAbstractSocket) InheritSetSocketState(f func(state int))

void setSocketState(QAbstractSocket::SocketState)

func (*QAbstractSocket) InheritWriteData

func (this *QAbstractSocket) InheritWriteData(f func(data string, len_ int64) int64)

long long writeData(const char *, qint64)

func (*QAbstractSocket) IsSequential

func (this *QAbstractSocket) IsSequential() bool

Reimplemented from QIODevice::isSequential().

func (*QAbstractSocket) IsValid

func (this *QAbstractSocket) IsValid() bool

Returns true if the socket is valid and ready for use; otherwise returns false.

Note: The socket's state must be ConnectedState before reading and writing can occur.

See also state().

func (*QAbstractSocket) LocalAddress

func (this *QAbstractSocket) LocalAddress() *QHostAddress

Returns the host address of the local socket if available; otherwise returns QHostAddress::Null.

This is normally the main IP address of the host, but can be QHostAddress::LocalHost (127.0.0.1) for connections to the local host.

See also localPort(), peerAddress(), and setLocalAddress().

func (*QAbstractSocket) LocalPort

func (this *QAbstractSocket) LocalPort() uint16

Returns the host port number (in native byte order) of the local socket if available; otherwise returns 0.

See also localAddress(), peerPort(), and setLocalPort().

func (*QAbstractSocket) MetaObject

func (this *QAbstractSocket) MetaObject() *qtcore.QMetaObject

func (*QAbstractSocket) NetworkLayerProtocolItemName

func (this *QAbstractSocket) NetworkLayerProtocolItemName(val int) string

func (*QAbstractSocket) NewForInherit

func (*QAbstractSocket) NewForInherit(socketType int, parent qtcore.QObject_ITF) *QAbstractSocket

Creates a new abstract socket of type socketType. The parent argument is passed to QObject's constructor.

See also socketType(), QTcpSocket, and QUdpSocket.

func (*QAbstractSocket) NewFromPointer

func (*QAbstractSocket) NewFromPointer(cthis unsafe.Pointer) *QAbstractSocket

func (*QAbstractSocket) PauseMode

func (this *QAbstractSocket) PauseMode() int

Returns the pause mode of this socket.

This function was introduced in Qt 5.0.

See also setPauseMode() and resume().

func (*QAbstractSocket) PauseModeItemName

func (this *QAbstractSocket) PauseModeItemName(val int) string

func (*QAbstractSocket) PeerAddress

func (this *QAbstractSocket) PeerAddress() *QHostAddress

Returns the address of the connected peer if the socket is in ConnectedState; otherwise returns QHostAddress::Null.

See also peerName(), peerPort(), localAddress(), and setPeerAddress().

func (*QAbstractSocket) PeerName

func (this *QAbstractSocket) PeerName() string

Returns the name of the peer as specified by connectToHost(), or an empty QString if connectToHost() has not been called.

See also peerAddress(), peerPort(), and setPeerName().

func (*QAbstractSocket) PeerPort

func (this *QAbstractSocket) PeerPort() uint16

Returns the port of the connected peer if the socket is in ConnectedState; otherwise returns 0.

See also peerAddress(), localPort(), and setPeerPort().

func (*QAbstractSocket) Proxy

func (this *QAbstractSocket) Proxy() *QNetworkProxy

Returns the network proxy for this socket. By default QNetworkProxy::DefaultProxy is used, which means this socket will query the default proxy settings for the application.

This function was introduced in Qt 4.1.

See also setProxy(), QNetworkProxy, and QNetworkProxyFactory.

func (*QAbstractSocket) ProxyAuthenticationRequired

func (this *QAbstractSocket) ProxyAuthenticationRequired(proxy QNetworkProxy_ITF, authenticator QAuthenticator_ITF)

This signal can be emitted when a proxy that requires authentication is used. The authenticator object can then be filled in with the required details to allow authentication and continue the connection.

Note: It is not possible to use a QueuedConnection to connect to this signal, as the connection will fail if the authenticator has not been filled in with new information when the signal returns.

This function was introduced in Qt 4.3.

See also QAuthenticator and QNetworkProxy.

func (*QAbstractSocket) QAbstractSocket_PTR

func (ptr *QAbstractSocket) QAbstractSocket_PTR() *QAbstractSocket

func (*QAbstractSocket) ReadBufferSize

func (this *QAbstractSocket) ReadBufferSize() int64

Returns the size of the internal read buffer. This limits the amount of data that the client can receive before you call read() or readAll().

A read buffer size of 0 (the default) means that the buffer has no size limit, ensuring that no data is lost.

See also setReadBufferSize() and read().

func (*QAbstractSocket) ReadData

func (this *QAbstractSocket) ReadData(data string, maxlen int64) int64

Reimplemented from QIODevice::readData().

func (*QAbstractSocket) ReadLineData

func (this *QAbstractSocket) ReadLineData(data string, maxlen int64) int64

Reimplemented from QIODevice::readLineData().

func (*QAbstractSocket) Resume

func (this *QAbstractSocket) Resume()

Continues data transfer on the socket. This method should only be used after the socket has been set to pause upon notifications and a notification has been received. The only notification currently supported is QSslSocket::sslErrors(). Calling this method if the socket is not paused results in undefined behavior.

This function was introduced in Qt 5.0.

See also pauseMode() and setPauseMode().

func (*QAbstractSocket) SetCthis

func (this *QAbstractSocket) SetCthis(cthis unsafe.Pointer)

func (*QAbstractSocket) SetLocalAddress

func (this *QAbstractSocket) SetLocalAddress(address QHostAddress_ITF)

Sets the address on the local side of a connection to address.

You can call this function in a subclass of QAbstractSocket to change the return value of the localAddress() function after a connection has been established. This feature is commonly used by proxy connections for virtual connection settings.

Note that this function does not bind the local address of the socket prior to a connection (e.g., QAbstractSocket::bind()).

This function was introduced in Qt 4.1.

See also localAddress(), setLocalPort(), and setPeerAddress().

func (*QAbstractSocket) SetLocalPort

func (this *QAbstractSocket) SetLocalPort(port uint16)

Sets the port on the local side of a connection to port.

You can call this function in a subclass of QAbstractSocket to change the return value of the localPort() function after a connection has been established. This feature is commonly used by proxy connections for virtual connection settings.

Note that this function does not bind the local port of the socket prior to a connection (e.g., QAbstractSocket::bind()).

This function was introduced in Qt 4.1.

See also localPort(), localAddress(), setLocalAddress(), and setPeerPort().

func (*QAbstractSocket) SetPauseMode

func (this *QAbstractSocket) SetPauseMode(pauseMode int)

Controls whether to pause upon receiving a notification. The pauseMode parameter specifies the conditions in which the socket should be paused. The only notification currently supported is QSslSocket::sslErrors(). If set to PauseOnSslErrors, data transfer on the socket will be paused and needs to be enabled explicitly again by calling resume(). By default this option is set to PauseNever. This option must be called before connecting to the server, otherwise it will result in undefined behavior.

This function was introduced in Qt 5.0.

See also pauseMode() and resume().

func (*QAbstractSocket) SetPeerAddress

func (this *QAbstractSocket) SetPeerAddress(address QHostAddress_ITF)

Sets the address of the remote side of the connection to address.

You can call this function in a subclass of QAbstractSocket to change the return value of the peerAddress() function after a connection has been established. This feature is commonly used by proxy connections for virtual connection settings.

This function was introduced in Qt 4.1.

See also peerAddress(), setPeerPort(), and setLocalAddress().

func (*QAbstractSocket) SetPeerName

func (this *QAbstractSocket) SetPeerName(name string)

Sets the host name of the remote peer to name.

You can call this function in a subclass of QAbstractSocket to change the return value of the peerName() function after a connection has been established. This feature is commonly used by proxy connections for virtual connection settings.

This function was introduced in Qt 4.1.

See also peerName().

func (*QAbstractSocket) SetPeerPort

func (this *QAbstractSocket) SetPeerPort(port uint16)

Sets the port of the remote side of the connection to port.

You can call this function in a subclass of QAbstractSocket to change the return value of the peerPort() function after a connection has been established. This feature is commonly used by proxy connections for virtual connection settings.

This function was introduced in Qt 4.1.

See also peerPort(), setPeerAddress(), and setLocalPort().

func (*QAbstractSocket) SetProxy

func (this *QAbstractSocket) SetProxy(networkProxy QNetworkProxy_ITF)

Sets the explicit network proxy for this socket to networkProxy.

To disable the use of a proxy for this socket, use the QNetworkProxy::NoProxy proxy type:

socket->setProxy(QNetworkProxy::NoProxy);

The default value for the proxy is QNetworkProxy::DefaultProxy, which means the socket will use the application settings: if a proxy is set with QNetworkProxy::setApplicationProxy, it will use that; otherwise, if a factory is set with QNetworkProxyFactory::setApplicationProxyFactory, it will query that factory with type QNetworkProxyQuery::TcpSocket.

This function was introduced in Qt 4.1.

See also proxy(), QNetworkProxy, and QNetworkProxyFactory::queryProxy().

func (*QAbstractSocket) SetReadBufferSize

func (this *QAbstractSocket) SetReadBufferSize(size int64)

Sets the size of QAbstractSocket's internal read buffer to be size bytes.

If the buffer size is limited to a certain size, QAbstractSocket won't buffer more than this size of data. Exceptionally, a buffer size of 0 means that the read buffer is unlimited and all incoming data is buffered. This is the default.

This option is useful if you only read the data at certain points in time (e.g., in a real-time streaming application) or if you want to protect your socket against receiving too much data, which may eventually cause your application to run out of memory.

Only QTcpSocket uses QAbstractSocket's internal buffer; QUdpSocket does not use any buffering at all, but rather relies on the implicit buffering provided by the operating system. Because of this, calling this function on QUdpSocket has no effect.

See also readBufferSize() and read().

func (*QAbstractSocket) SetSocketDescriptor

func (this *QAbstractSocket) SetSocketDescriptor(socketDescriptor int64, state int, openMode int) bool

Initializes QAbstractSocket with the native socket descriptor socketDescriptor. Returns true if socketDescriptor is accepted as a valid socket descriptor; otherwise returns false. The socket is opened in the mode specified by openMode, and enters the socket state specified by socketState. Read and write buffers are cleared, discarding any pending data.

Note: It is not possible to initialize two abstract sockets with the same native socket descriptor.

See also socketDescriptor().

func (*QAbstractSocket) SetSocketDescriptorp

func (this *QAbstractSocket) SetSocketDescriptorp(socketDescriptor int64) bool

Initializes QAbstractSocket with the native socket descriptor socketDescriptor. Returns true if socketDescriptor is accepted as a valid socket descriptor; otherwise returns false. The socket is opened in the mode specified by openMode, and enters the socket state specified by socketState. Read and write buffers are cleared, discarding any pending data.

Note: It is not possible to initialize two abstract sockets with the same native socket descriptor.

See also socketDescriptor().

func (*QAbstractSocket) SetSocketDescriptorp1

func (this *QAbstractSocket) SetSocketDescriptorp1(socketDescriptor int64, state int) bool

Initializes QAbstractSocket with the native socket descriptor socketDescriptor. Returns true if socketDescriptor is accepted as a valid socket descriptor; otherwise returns false. The socket is opened in the mode specified by openMode, and enters the socket state specified by socketState. Read and write buffers are cleared, discarding any pending data.

Note: It is not possible to initialize two abstract sockets with the same native socket descriptor.

See also socketDescriptor().

func (*QAbstractSocket) SetSocketError

func (this *QAbstractSocket) SetSocketError(socketError int)

Sets the type of error that last occurred to socketError.

See also setSocketState() and setErrorString().

func (*QAbstractSocket) SetSocketOption

func (this *QAbstractSocket) SetSocketOption(option int, value qtcore.QVariant_ITF)

Sets the given option to the value described by value.

Note: On Windows Runtime, QAbstractSocket::KeepAliveOption must be set before the socket is connected.

This function was introduced in Qt 4.6.

See also socketOption().

func (*QAbstractSocket) SetSocketState

func (this *QAbstractSocket) SetSocketState(state int)

Sets the state of the socket to state.

See also state().

func (*QAbstractSocket) SocketDescriptor

func (this *QAbstractSocket) SocketDescriptor() int64

Returns the native socket descriptor of the QAbstractSocket object if this is available; otherwise returns -1.

If the socket is using QNetworkProxy, the returned descriptor may not be usable with native socket functions.

The socket descriptor is not available when QAbstractSocket is in UnconnectedState.

See also setSocketDescriptor().

func (*QAbstractSocket) SocketErrorItemName

func (this *QAbstractSocket) SocketErrorItemName(val int) string

func (*QAbstractSocket) SocketOption

func (this *QAbstractSocket) SocketOption(option int) *qtcore.QVariant

Returns the value of the option option.

This function was introduced in Qt 4.6.

See also setSocketOption().

func (*QAbstractSocket) SocketOptionItemName

func (this *QAbstractSocket) SocketOptionItemName(val int) string

func (*QAbstractSocket) SocketStateItemName

func (this *QAbstractSocket) SocketStateItemName(val int) string

func (*QAbstractSocket) SocketType

func (this *QAbstractSocket) SocketType() int

Returns the socket type (TCP, UDP, or other).

See also QTcpSocket and QUdpSocket.

func (*QAbstractSocket) SocketTypeItemName

func (this *QAbstractSocket) SocketTypeItemName(val int) string

func (*QAbstractSocket) State

func (this *QAbstractSocket) State() int

Returns the state of the socket.

See also error().

func (*QAbstractSocket) StateChanged

func (this *QAbstractSocket) StateChanged(arg0 int)

This signal is emitted whenever QAbstractSocket's state changes. The socketState parameter is the new state.

QAbstractSocket::SocketState is not a registered metatype, so for queued connections, you will have to register it with Q_DECLARE_METATYPE() and qRegisterMetaType().

See also state() and Creating Custom Qt Types.

func (*QAbstractSocket) WaitForBytesWritten

func (this *QAbstractSocket) WaitForBytesWritten(msecs int) bool

Reimplemented from QIODevice::waitForBytesWritten().

This function blocks until at least one byte has been written on the socket and the bytesWritten() signal has been emitted. The function will timeout after msecs milliseconds; the default timeout is 30000 milliseconds.

The function returns true if the bytesWritten() signal is emitted; otherwise it returns false (if an error occurred or the operation timed out).

Note: This function may fail randomly on Windows. Consider using the event loop and the bytesWritten() signal if your software will run on Windows.

See also waitForReadyRead().

func (*QAbstractSocket) WaitForBytesWrittenp

func (this *QAbstractSocket) WaitForBytesWrittenp() bool

Reimplemented from QIODevice::waitForBytesWritten().

This function blocks until at least one byte has been written on the socket and the bytesWritten() signal has been emitted. The function will timeout after msecs milliseconds; the default timeout is 30000 milliseconds.

The function returns true if the bytesWritten() signal is emitted; otherwise it returns false (if an error occurred or the operation timed out).

Note: This function may fail randomly on Windows. Consider using the event loop and the bytesWritten() signal if your software will run on Windows.

See also waitForReadyRead().

func (*QAbstractSocket) WaitForConnected

func (this *QAbstractSocket) WaitForConnected(msecs int) bool

Waits until the socket is connected, up to msecs milliseconds. If the connection has been established, this function returns true; otherwise it returns false. 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 established:

socket->connectToHost("imap", 143);
if (socket->waitForConnected(1000))
    qDebug("Connected!");

If msecs is -1, this function will not time out.

Note: This function may wait slightly longer than msecs, depending on the time it takes to complete the host lookup.

Note: Multiple calls to this functions do not accumulate the time. If the function times out, the connecting process will be aborted.

Note: This function may fail randomly on Windows. Consider using the event loop and the connected() signal if your software will run on Windows.

See also connectToHost() and connected().

func (*QAbstractSocket) WaitForConnectedp

func (this *QAbstractSocket) WaitForConnectedp() bool

Waits until the socket is connected, up to msecs milliseconds. If the connection has been established, this function returns true; otherwise it returns false. 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 established:

socket->connectToHost("imap", 143);
if (socket->waitForConnected(1000))
    qDebug("Connected!");

If msecs is -1, this function will not time out.

Note: This function may wait slightly longer than msecs, depending on the time it takes to complete the host lookup.

Note: Multiple calls to this functions do not accumulate the time. If the function times out, the connecting process will be aborted.

Note: This function may fail randomly on Windows. Consider using the event loop and the connected() signal if your software will run on Windows.

See also connectToHost() and connected().

func (*QAbstractSocket) WaitForDisconnected

func (this *QAbstractSocket) WaitForDisconnected(msecs int) bool

Waits until the socket has disconnected, up to msecs milliseconds. If the connection has been disconnected, this function returns true; otherwise it returns false. 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->disconnectFromHost();
    if (socket->state() == QAbstractSocket::UnconnectedState ||
        socket->waitForDisconnected(1000))
        qDebug("Disconnected!");

If msecs is -1, this function will not time out.

Note: This function may fail randomly on Windows. Consider using the event loop and the disconnected() signal if your software will run on Windows.

See also disconnectFromHost() and close().

func (*QAbstractSocket) WaitForDisconnectedp

func (this *QAbstractSocket) WaitForDisconnectedp() bool

Waits until the socket has disconnected, up to msecs milliseconds. If the connection has been disconnected, this function returns true; otherwise it returns false. 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->disconnectFromHost();
    if (socket->state() == QAbstractSocket::UnconnectedState ||
        socket->waitForDisconnected(1000))
        qDebug("Disconnected!");

If msecs is -1, this function will not time out.

Note: This function may fail randomly on Windows. Consider using the event loop and the disconnected() signal if your software will run on Windows.

See also disconnectFromHost() and close().

func (*QAbstractSocket) WaitForReadyRead

func (this *QAbstractSocket) WaitForReadyRead(msecs int) bool

Reimplemented from QIODevice::waitForReadyRead().

This function blocks until new 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 the readyRead() signal is emitted and there is new data available for reading; otherwise it returns false (if an error occurred or the operation timed out).

Note: This function may fail randomly on Windows. Consider using the event loop and the readyRead() signal if your software will run on Windows.

See also waitForBytesWritten().

func (*QAbstractSocket) WaitForReadyReadp

func (this *QAbstractSocket) WaitForReadyReadp() bool

Reimplemented from QIODevice::waitForReadyRead().

This function blocks until new 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 the readyRead() signal is emitted and there is new data available for reading; otherwise it returns false (if an error occurred or the operation timed out).

Note: This function may fail randomly on Windows. Consider using the event loop and the readyRead() signal if your software will run on Windows.

See also waitForBytesWritten().

func (*QAbstractSocket) WriteData

func (this *QAbstractSocket) WriteData(data string, len_ int64) int64

Reimplemented from QIODevice::writeData().

type QAbstractSocket_ITF

type QAbstractSocket_ITF interface {
	qtcore.QIODevice_ITF
	QAbstractSocket_PTR() *QAbstractSocket
}

type QAbstractSocket__BindFlag

type QAbstractSocket__BindFlag = int
const QAbstractSocket__DefaultForPlatform QAbstractSocket__BindFlag = 0
const QAbstractSocket__DontShareAddress QAbstractSocket__BindFlag = 2
const QAbstractSocket__ReuseAddressHint QAbstractSocket__BindFlag = 4
const QAbstractSocket__ShareAddress QAbstractSocket__BindFlag = 1

type QAbstractSocket__NetworkLayerProtocol

type QAbstractSocket__NetworkLayerProtocol = int

This enum describes the network layer protocol values used in Qt.

See also QHostAddress::protocol().

const QAbstractSocket__AnyIPProtocol QAbstractSocket__NetworkLayerProtocol = 2
const QAbstractSocket__IPv4Protocol QAbstractSocket__NetworkLayerProtocol = 0

IPv4

const QAbstractSocket__IPv6Protocol QAbstractSocket__NetworkLayerProtocol = 1

IPv6

const QAbstractSocket__UnknownNetworkLayerProtocol QAbstractSocket__NetworkLayerProtocol = -1

type QAbstractSocket__PauseMode

type QAbstractSocket__PauseMode = int
const QAbstractSocket__PauseNever QAbstractSocket__PauseMode = 0
const QAbstractSocket__PauseOnSslErrors QAbstractSocket__PauseMode = 1

type QAbstractSocket__SocketError

type QAbstractSocket__SocketError = int

This enum describes the socket errors that can occur.

See also QAbstractSocket::error().

const QAbstractSocket__AddressInUseError QAbstractSocket__SocketError = 8

The address specified to QAbstractSocket::bind() is already in use and was set to be exclusive.

const QAbstractSocket__ConnectionRefusedError QAbstractSocket__SocketError = 0

The connection was refused by the peer (or timed out).

const QAbstractSocket__DatagramTooLargeError QAbstractSocket__SocketError = 6
const QAbstractSocket__HostNotFoundError QAbstractSocket__SocketError = 2

The host address was not found.

const QAbstractSocket__NetworkError QAbstractSocket__SocketError = 7

An error occurred with the network (e.g., the network cable was accidentally plugged out).

const QAbstractSocket__OperationError QAbstractSocket__SocketError = 19
const QAbstractSocket__ProxyAuthenticationRequiredError QAbstractSocket__SocketError = 12
const QAbstractSocket__ProxyConnectionClosedError QAbstractSocket__SocketError = 15
const QAbstractSocket__ProxyConnectionRefusedError QAbstractSocket__SocketError = 14
const QAbstractSocket__ProxyConnectionTimeoutError QAbstractSocket__SocketError = 16
const QAbstractSocket__ProxyNotFoundError QAbstractSocket__SocketError = 17
const QAbstractSocket__ProxyProtocolError QAbstractSocket__SocketError = 18
const QAbstractSocket__RemoteHostClosedError QAbstractSocket__SocketError = 1

The remote host closed the connection. Note that the client socket (i.e., this socket) will be closed after the remote close notification has been sent.

const QAbstractSocket__SocketAccessError QAbstractSocket__SocketError = 3

The socket operation failed because the application lacked the required privileges.

const QAbstractSocket__SocketAddressNotAvailableError QAbstractSocket__SocketError = 9

The address specified to QAbstractSocket::bind() does not belong to the host.

const QAbstractSocket__SocketResourceError QAbstractSocket__SocketError = 4

The local system ran out of resources (e.g., too many sockets).

const QAbstractSocket__SocketTimeoutError QAbstractSocket__SocketError = 5

The socket operation timed out.

const QAbstractSocket__SslHandshakeFailedError QAbstractSocket__SocketError = 13
const QAbstractSocket__SslInternalError QAbstractSocket__SocketError = 20
const QAbstractSocket__SslInvalidUserDataError QAbstractSocket__SocketError = 21
const QAbstractSocket__TemporaryError QAbstractSocket__SocketError = 22
const QAbstractSocket__UnfinishedSocketOperationError QAbstractSocket__SocketError = 11
const QAbstractSocket__UnknownSocketError QAbstractSocket__SocketError = -1
const QAbstractSocket__UnsupportedSocketOperationError QAbstractSocket__SocketError = 10

type QAbstractSocket__SocketOption

type QAbstractSocket__SocketOption = int

This enum represents the options that can be set on a socket. If desired, they can be set after having received the connected() signal from the socket or after having received a new socket from a QTcpServer.

Possible values for TypeOfServiceOption are:

ValueDescription

224Network control 192Internetwork control 160CRITIC/ECP 128Flash override 96Flash 64Immediate 32Priority 0Routine

This enum was introduced or modified in Qt 4.6.

See also QAbstractSocket::setSocketOption() and QAbstractSocket::socketOption().

const QAbstractSocket__KeepAliveOption QAbstractSocket__SocketOption = 1
const QAbstractSocket__LowDelayOption QAbstractSocket__SocketOption = 0
const QAbstractSocket__MulticastLoopbackOption QAbstractSocket__SocketOption = 3
const QAbstractSocket__MulticastTtlOption QAbstractSocket__SocketOption = 2

Set this to an integer value to set IP_MULTICAST_TTL (TTL for multicast datagrams) socket option.

const QAbstractSocket__PathMtuSocketOption QAbstractSocket__SocketOption = 7
const QAbstractSocket__ReceiveBufferSizeSocketOption QAbstractSocket__SocketOption = 6
const QAbstractSocket__SendBufferSizeSocketOption QAbstractSocket__SocketOption = 5
const QAbstractSocket__TypeOfServiceOption QAbstractSocket__SocketOption = 4

This option is not supported on Windows. This maps to the IP_TOS socket option. For possible values, see table below.

type QAbstractSocket__SocketState

type QAbstractSocket__SocketState = int

This enum describes the different states in which a socket can be.

See also QAbstractSocket::state().

const QAbstractSocket__BoundState QAbstractSocket__SocketState = 4

The socket is bound to an address and port.

const QAbstractSocket__ClosingState QAbstractSocket__SocketState = 6

The socket is about to close (data may still be waiting to be written).

const QAbstractSocket__ConnectedState QAbstractSocket__SocketState = 3

A connection is established.

const QAbstractSocket__ConnectingState QAbstractSocket__SocketState = 2

The socket has started establishing a connection.

const QAbstractSocket__HostLookupState QAbstractSocket__SocketState = 1

The socket is performing a host name lookup.

const QAbstractSocket__ListeningState QAbstractSocket__SocketState = 5

For internal use only.

const QAbstractSocket__UnconnectedState QAbstractSocket__SocketState = 0

The socket is not connected.

type QAbstractSocket__SocketType

type QAbstractSocket__SocketType = int

This enum describes the transport layer protocol.

See also QAbstractSocket::socketType().

const QAbstractSocket__SctpSocket QAbstractSocket__SocketType = 2

SCTP

const QAbstractSocket__TcpSocket QAbstractSocket__SocketType = 0

TCP

const QAbstractSocket__UdpSocket QAbstractSocket__SocketType = 1

UDP

const QAbstractSocket__UnknownSocketType QAbstractSocket__SocketType = -1

type QAuthenticator

type QAuthenticator struct {
	*qtrt.CObject
}

func NewQAuthenticator

func NewQAuthenticator() *QAuthenticator

func NewQAuthenticatorFromPointer

func NewQAuthenticatorFromPointer(cthis unsafe.Pointer) *QAuthenticator

func (*QAuthenticator) Detach

func (this *QAuthenticator) Detach()

func (*QAuthenticator) GetCthis

func (this *QAuthenticator) GetCthis() unsafe.Pointer

func (*QAuthenticator) IsNull

func (this *QAuthenticator) IsNull() bool

Returns true if the object has not been initialized. Returns false if non-const member functions have been called, or the content was constructed or copied from another initialized QAuthenticator object.

func (*QAuthenticator) NewForInherit

func (*QAuthenticator) NewForInherit() *QAuthenticator

Constructs an empty authentication object.

func (*QAuthenticator) NewFromPointer

func (*QAuthenticator) NewFromPointer(cthis unsafe.Pointer) *QAuthenticator

func (*QAuthenticator) Operator_equal

func (this *QAuthenticator) Operator_equal(other QAuthenticator_ITF) *QAuthenticator

func (*QAuthenticator) Operator_equal_equal

func (this *QAuthenticator) Operator_equal_equal(other QAuthenticator_ITF) bool

func (*QAuthenticator) Operator_not_equal

func (this *QAuthenticator) Operator_not_equal(other QAuthenticator_ITF) bool

func (*QAuthenticator) Option

func (this *QAuthenticator) Option(opt string) *qtcore.QVariant

Returns the value related to option opt if it was set by the server. See the Options section for more information on incoming options. If option opt isn't found, an invalid QVariant will be returned.

This function was introduced in Qt 4.7.

See also setOption(), options(), and QAuthenticator options.

func (*QAuthenticator) Password

func (this *QAuthenticator) Password() string

Returns the password used for authentication.

See also setPassword().

func (*QAuthenticator) QAuthenticator_PTR

func (ptr *QAuthenticator) QAuthenticator_PTR() *QAuthenticator

func (*QAuthenticator) Realm

func (this *QAuthenticator) Realm() string

Returns the realm requiring authentication.

func (*QAuthenticator) SetCthis

func (this *QAuthenticator) SetCthis(cthis unsafe.Pointer)

func (*QAuthenticator) SetOption

func (this *QAuthenticator) SetOption(opt string, value qtcore.QVariant_ITF)

Sets the outgoing option opt to value value. See the Options section for more information on outgoing options.

This function was introduced in Qt 4.7.

See also options(), option(), and QAuthenticator options.

func (*QAuthenticator) SetPassword

func (this *QAuthenticator) SetPassword(password string)

Sets the password used for authentication.

See also password() and QNetworkAccessManager::authenticationRequired().

func (*QAuthenticator) SetRealm

func (this *QAuthenticator) SetRealm(realm string)

func (*QAuthenticator) SetUser

func (this *QAuthenticator) SetUser(user string)

Sets the user used for authentication.

See also user() and QNetworkAccessManager::authenticationRequired().

func (*QAuthenticator) User

func (this *QAuthenticator) User() string

Returns the user used for authentication.

See also setUser().

type QAuthenticator_ITF

type QAuthenticator_ITF interface {
	QAuthenticator_PTR() *QAuthenticator
}

type QDnsDomainNameRecord

type QDnsDomainNameRecord struct {
	*qtrt.CObject
}

func NewQDnsDomainNameRecord

func NewQDnsDomainNameRecord() *QDnsDomainNameRecord

func NewQDnsDomainNameRecordFromPointer

func NewQDnsDomainNameRecordFromPointer(cthis unsafe.Pointer) *QDnsDomainNameRecord

func (*QDnsDomainNameRecord) GetCthis

func (this *QDnsDomainNameRecord) GetCthis() unsafe.Pointer

func (*QDnsDomainNameRecord) Name

func (this *QDnsDomainNameRecord) Name() string

func (*QDnsDomainNameRecord) NewForInherit

func (*QDnsDomainNameRecord) NewForInherit() *QDnsDomainNameRecord

func (*QDnsDomainNameRecord) NewFromPointer

func (*QDnsDomainNameRecord) NewFromPointer(cthis unsafe.Pointer) *QDnsDomainNameRecord

func (*QDnsDomainNameRecord) Operator_equal

func (this *QDnsDomainNameRecord) Operator_equal(other unsafe.Pointer) *QDnsDomainNameRecord

func (*QDnsDomainNameRecord) Operator_equal1

func (*QDnsDomainNameRecord) QDnsDomainNameRecord_PTR

func (ptr *QDnsDomainNameRecord) QDnsDomainNameRecord_PTR() *QDnsDomainNameRecord

func (*QDnsDomainNameRecord) SetCthis

func (this *QDnsDomainNameRecord) SetCthis(cthis unsafe.Pointer)

func (*QDnsDomainNameRecord) Swap

func (*QDnsDomainNameRecord) TimeToLive

func (this *QDnsDomainNameRecord) TimeToLive() uint

func (*QDnsDomainNameRecord) Value

func (this *QDnsDomainNameRecord) Value() string

type QDnsDomainNameRecord_ITF

type QDnsDomainNameRecord_ITF interface {
	QDnsDomainNameRecord_PTR() *QDnsDomainNameRecord
}

type QDnsHostAddressRecord

type QDnsHostAddressRecord struct {
	*qtrt.CObject
}

func NewQDnsHostAddressRecord

func NewQDnsHostAddressRecord() *QDnsHostAddressRecord

func NewQDnsHostAddressRecordFromPointer

func NewQDnsHostAddressRecordFromPointer(cthis unsafe.Pointer) *QDnsHostAddressRecord

func (*QDnsHostAddressRecord) GetCthis

func (this *QDnsHostAddressRecord) GetCthis() unsafe.Pointer

func (*QDnsHostAddressRecord) Name

func (this *QDnsHostAddressRecord) Name() string

func (*QDnsHostAddressRecord) NewForInherit

func (*QDnsHostAddressRecord) NewForInherit() *QDnsHostAddressRecord

func (*QDnsHostAddressRecord) NewFromPointer

func (*QDnsHostAddressRecord) Operator_equal

func (this *QDnsHostAddressRecord) Operator_equal(other unsafe.Pointer) *QDnsHostAddressRecord

func (*QDnsHostAddressRecord) Operator_equal1

func (*QDnsHostAddressRecord) QDnsHostAddressRecord_PTR

func (ptr *QDnsHostAddressRecord) QDnsHostAddressRecord_PTR() *QDnsHostAddressRecord

func (*QDnsHostAddressRecord) SetCthis

func (this *QDnsHostAddressRecord) SetCthis(cthis unsafe.Pointer)

func (*QDnsHostAddressRecord) Swap

func (*QDnsHostAddressRecord) TimeToLive

func (this *QDnsHostAddressRecord) TimeToLive() uint

func (*QDnsHostAddressRecord) Value

func (this *QDnsHostAddressRecord) Value() *QHostAddress

type QDnsHostAddressRecord_ITF

type QDnsHostAddressRecord_ITF interface {
	QDnsHostAddressRecord_PTR() *QDnsHostAddressRecord
}

type QDnsLookup

type QDnsLookup struct {
	*qtcore.QObject
}

func NewQDnsLookup

func NewQDnsLookup(parent qtcore.QObject_ITF) *QDnsLookup

func NewQDnsLookup1

func NewQDnsLookup1(type_ int, name string, parent qtcore.QObject_ITF) *QDnsLookup

func NewQDnsLookup1p

func NewQDnsLookup1p(type_ int, name string) *QDnsLookup

func NewQDnsLookup2

func NewQDnsLookup2(type_ int, name string, nameserver QHostAddress_ITF, parent qtcore.QObject_ITF) *QDnsLookup

func NewQDnsLookup2p

func NewQDnsLookup2p(type_ int, name string, nameserver QHostAddress_ITF) *QDnsLookup

func NewQDnsLookupFromPointer

func NewQDnsLookupFromPointer(cthis unsafe.Pointer) *QDnsLookup

func NewQDnsLookupp

func NewQDnsLookupp() *QDnsLookup

func (*QDnsLookup) Abort

func (this *QDnsLookup) Abort()

Aborts the DNS lookup operation.

If the lookup is already finished, does nothing.

func (*QDnsLookup) Error

func (this *QDnsLookup) Error() int

func (*QDnsLookup) ErrorItemName

func (this *QDnsLookup) ErrorItemName(val int) string

func (*QDnsLookup) ErrorString

func (this *QDnsLookup) ErrorString() string

func (*QDnsLookup) Finished

func (this *QDnsLookup) Finished()

This signal is emitted when the reply has finished processing.

Note: Notifier signal for property error. Notifier signal for property errorString.

func (*QDnsLookup) GetCthis

func (this *QDnsLookup) GetCthis() unsafe.Pointer

func (*QDnsLookup) IsFinished

func (this *QDnsLookup) IsFinished() bool

Returns whether the reply has finished or was aborted.

func (*QDnsLookup) Lookup

func (this *QDnsLookup) Lookup()

Performs the DNS lookup.

The finished() signal is emitted upon completion.

func (*QDnsLookup) MetaObject

func (this *QDnsLookup) MetaObject() *qtcore.QMetaObject

func (*QDnsLookup) Name

func (this *QDnsLookup) Name() string

func (*QDnsLookup) NameChanged

func (this *QDnsLookup) NameChanged(name string)

This signal is emitted when the lookup name changes. name is the new lookup name.

Note: Notifier signal for property name.

func (*QDnsLookup) Nameserver

func (this *QDnsLookup) Nameserver() *QHostAddress

func (*QDnsLookup) NameserverChanged

func (this *QDnsLookup) NameserverChanged(nameserver QHostAddress_ITF)

func (*QDnsLookup) NewForInherit

func (*QDnsLookup) NewForInherit(parent qtcore.QObject_ITF) *QDnsLookup

Constructs a QDnsLookup object and sets parent as the parent object.

The type property will default to QDnsLookup::A.

func (*QDnsLookup) NewForInherit1

func (*QDnsLookup) NewForInherit1(type_ int, name string, parent qtcore.QObject_ITF) *QDnsLookup

Constructs a QDnsLookup object and sets parent as the parent object.

The type property will default to QDnsLookup::A.

func (*QDnsLookup) NewForInherit1p

func (*QDnsLookup) NewForInherit1p(type_ int, name string) *QDnsLookup

Constructs a QDnsLookup object and sets parent as the parent object.

The type property will default to QDnsLookup::A.

func (*QDnsLookup) NewForInherit2

func (*QDnsLookup) NewForInherit2(type_ int, name string, nameserver QHostAddress_ITF, parent qtcore.QObject_ITF) *QDnsLookup

Constructs a QDnsLookup object and sets parent as the parent object.

The type property will default to QDnsLookup::A.

func (*QDnsLookup) NewForInherit2p

func (*QDnsLookup) NewForInherit2p(type_ int, name string, nameserver QHostAddress_ITF) *QDnsLookup

Constructs a QDnsLookup object and sets parent as the parent object.

The type property will default to QDnsLookup::A.

func (*QDnsLookup) NewForInheritp

func (*QDnsLookup) NewForInheritp() *QDnsLookup

Constructs a QDnsLookup object and sets parent as the parent object.

The type property will default to QDnsLookup::A.

func (*QDnsLookup) NewFromPointer

func (*QDnsLookup) NewFromPointer(cthis unsafe.Pointer) *QDnsLookup

func (*QDnsLookup) QDnsLookup_PTR

func (ptr *QDnsLookup) QDnsLookup_PTR() *QDnsLookup

func (*QDnsLookup) SetCthis

func (this *QDnsLookup) SetCthis(cthis unsafe.Pointer)

func (*QDnsLookup) SetName

func (this *QDnsLookup) SetName(name string)

func (*QDnsLookup) SetNameserver

func (this *QDnsLookup) SetNameserver(nameserver QHostAddress_ITF)

func (*QDnsLookup) SetType

func (this *QDnsLookup) SetType(arg0 int)

func (*QDnsLookup) Type

func (this *QDnsLookup) Type() int

func (*QDnsLookup) TypeChanged

func (this *QDnsLookup) TypeChanged(type_ int)

This signal is emitted when the lookup type changes. type is the new lookup type.

Note: Notifier signal for property type.

func (*QDnsLookup) TypeItemName

func (this *QDnsLookup) TypeItemName(val int) string

type QDnsLookup_ITF

type QDnsLookup_ITF interface {
	qtcore.QObject_ITF
	QDnsLookup_PTR() *QDnsLookup
}

type QDnsLookup__Error

type QDnsLookup__Error = int

Indicates all possible error conditions found during the processing of the DNS lookup.

const QDnsLookup__InvalidReplyError QDnsLookup__Error = 4

the reply returned by the server was invalid.

const QDnsLookup__InvalidRequestError QDnsLookup__Error = 3

the requested DNS lookup was invalid.

const QDnsLookup__NoError QDnsLookup__Error = 0

no error condition.

const QDnsLookup__NotFoundError QDnsLookup__Error = 7

the requested domain name does not exist (NXDOMAIN).

const QDnsLookup__OperationCancelledError QDnsLookup__Error = 2

the lookup was aborted using the abort() method.

const QDnsLookup__ResolverError QDnsLookup__Error = 1

there was an error initializing the system's DNS resolver.

const QDnsLookup__ServerFailureError QDnsLookup__Error = 5

the server encountered an internal failure while processing the request (SERVFAIL).

const QDnsLookup__ServerRefusedError QDnsLookup__Error = 6

the server refused to process the request for security or policy reasons (REFUSED).

type QDnsLookup__Type

type QDnsLookup__Type = int

Indicates the type of DNS lookup that was performed.

const QDnsLookup__A QDnsLookup__Type = 1
const QDnsLookup__AAAA QDnsLookup__Type = 28
const QDnsLookup__ANY QDnsLookup__Type = 255
const QDnsLookup__CNAME QDnsLookup__Type = 5

canonical name records.

const QDnsLookup__MX QDnsLookup__Type = 15
const QDnsLookup__NS QDnsLookup__Type = 2

name server records.

const QDnsLookup__PTR QDnsLookup__Type = 12
const QDnsLookup__SRV QDnsLookup__Type = 33
const QDnsLookup__TXT QDnsLookup__Type = 16

type QDnsMailExchangeRecord

type QDnsMailExchangeRecord struct {
	*qtrt.CObject
}

func NewQDnsMailExchangeRecord

func NewQDnsMailExchangeRecord() *QDnsMailExchangeRecord

func NewQDnsMailExchangeRecordFromPointer

func NewQDnsMailExchangeRecordFromPointer(cthis unsafe.Pointer) *QDnsMailExchangeRecord

func (*QDnsMailExchangeRecord) Exchange

func (this *QDnsMailExchangeRecord) Exchange() string

func (*QDnsMailExchangeRecord) GetCthis

func (this *QDnsMailExchangeRecord) GetCthis() unsafe.Pointer

func (*QDnsMailExchangeRecord) Name

func (this *QDnsMailExchangeRecord) Name() string

func (*QDnsMailExchangeRecord) NewForInherit

func (*QDnsMailExchangeRecord) NewFromPointer

func (*QDnsMailExchangeRecord) Operator_equal

func (this *QDnsMailExchangeRecord) Operator_equal(other unsafe.Pointer) *QDnsMailExchangeRecord

func (*QDnsMailExchangeRecord) Operator_equal1

func (*QDnsMailExchangeRecord) Preference

func (this *QDnsMailExchangeRecord) Preference() uint16

func (*QDnsMailExchangeRecord) QDnsMailExchangeRecord_PTR

func (ptr *QDnsMailExchangeRecord) QDnsMailExchangeRecord_PTR() *QDnsMailExchangeRecord

func (*QDnsMailExchangeRecord) SetCthis

func (this *QDnsMailExchangeRecord) SetCthis(cthis unsafe.Pointer)

func (*QDnsMailExchangeRecord) Swap

func (*QDnsMailExchangeRecord) TimeToLive

func (this *QDnsMailExchangeRecord) TimeToLive() uint

type QDnsMailExchangeRecord_ITF

type QDnsMailExchangeRecord_ITF interface {
	QDnsMailExchangeRecord_PTR() *QDnsMailExchangeRecord
}

type QDnsServiceRecord

type QDnsServiceRecord struct {
	*qtrt.CObject
}

func NewQDnsServiceRecord

func NewQDnsServiceRecord() *QDnsServiceRecord

func NewQDnsServiceRecordFromPointer

func NewQDnsServiceRecordFromPointer(cthis unsafe.Pointer) *QDnsServiceRecord

func (*QDnsServiceRecord) GetCthis

func (this *QDnsServiceRecord) GetCthis() unsafe.Pointer

func (*QDnsServiceRecord) Name

func (this *QDnsServiceRecord) Name() string

func (*QDnsServiceRecord) NewForInherit

func (*QDnsServiceRecord) NewForInherit() *QDnsServiceRecord

func (*QDnsServiceRecord) NewFromPointer

func (*QDnsServiceRecord) NewFromPointer(cthis unsafe.Pointer) *QDnsServiceRecord

func (*QDnsServiceRecord) Operator_equal

func (this *QDnsServiceRecord) Operator_equal(other unsafe.Pointer) *QDnsServiceRecord

func (*QDnsServiceRecord) Operator_equal1

func (this *QDnsServiceRecord) Operator_equal1(other QDnsServiceRecord_ITF) *QDnsServiceRecord

func (*QDnsServiceRecord) Port

func (this *QDnsServiceRecord) Port() uint16

func (*QDnsServiceRecord) Priority

func (this *QDnsServiceRecord) Priority() uint16

func (*QDnsServiceRecord) QDnsServiceRecord_PTR

func (ptr *QDnsServiceRecord) QDnsServiceRecord_PTR() *QDnsServiceRecord

func (*QDnsServiceRecord) SetCthis

func (this *QDnsServiceRecord) SetCthis(cthis unsafe.Pointer)

func (*QDnsServiceRecord) Swap

func (this *QDnsServiceRecord) Swap(other QDnsServiceRecord_ITF)

func (*QDnsServiceRecord) Target

func (this *QDnsServiceRecord) Target() string

func (*QDnsServiceRecord) TimeToLive

func (this *QDnsServiceRecord) TimeToLive() uint

func (*QDnsServiceRecord) Weight

func (this *QDnsServiceRecord) Weight() uint16

type QDnsServiceRecord_ITF

type QDnsServiceRecord_ITF interface {
	QDnsServiceRecord_PTR() *QDnsServiceRecord
}

type QDnsTextRecord

type QDnsTextRecord struct {
	*qtrt.CObject
}

func NewQDnsTextRecord

func NewQDnsTextRecord() *QDnsTextRecord

func NewQDnsTextRecordFromPointer

func NewQDnsTextRecordFromPointer(cthis unsafe.Pointer) *QDnsTextRecord

func (*QDnsTextRecord) GetCthis

func (this *QDnsTextRecord) GetCthis() unsafe.Pointer

func (*QDnsTextRecord) Name

func (this *QDnsTextRecord) Name() string

func (*QDnsTextRecord) NewForInherit

func (*QDnsTextRecord) NewForInherit() *QDnsTextRecord

func (*QDnsTextRecord) NewFromPointer

func (*QDnsTextRecord) NewFromPointer(cthis unsafe.Pointer) *QDnsTextRecord

func (*QDnsTextRecord) Operator_equal

func (this *QDnsTextRecord) Operator_equal(other unsafe.Pointer) *QDnsTextRecord

func (*QDnsTextRecord) Operator_equal1

func (this *QDnsTextRecord) Operator_equal1(other QDnsTextRecord_ITF) *QDnsTextRecord

func (*QDnsTextRecord) QDnsTextRecord_PTR

func (ptr *QDnsTextRecord) QDnsTextRecord_PTR() *QDnsTextRecord

func (*QDnsTextRecord) SetCthis

func (this *QDnsTextRecord) SetCthis(cthis unsafe.Pointer)

func (*QDnsTextRecord) Swap

func (this *QDnsTextRecord) Swap(other QDnsTextRecord_ITF)

func (*QDnsTextRecord) TimeToLive

func (this *QDnsTextRecord) TimeToLive() uint

type QDnsTextRecord_ITF

type QDnsTextRecord_ITF interface {
	QDnsTextRecord_PTR() *QDnsTextRecord
}

type QDtls

type QDtls struct {
	*qtcore.QObject
}

func NewQDtls

func NewQDtls(mode int, parent qtcore.QObject_ITF) *QDtls

func NewQDtlsFromPointer

func NewQDtlsFromPointer(cthis unsafe.Pointer) *QDtls

func NewQDtlsp

func NewQDtlsp(mode int) *QDtls

func (*QDtls) AbortHandshake

func (this *QDtls) AbortHandshake(socket QUdpSocket_ITF) bool

Aborts the ongoing handshake. Returns true if one was on-going on socket; otherwise, sets a suitable error and returns false.

See also doHandshake() and resumeHandshake().

func (*QDtls) CookieGeneratorParameters

func (this *QDtls) CookieGeneratorParameters() unsafe.Pointer

Returns the current hash algorithm and secret, either default ones or previously set by a call to setCookieGeneratorParameters().

The default hash algorithm is QCryptographicHash::Sha256 if Qt was configured to support it, QCryptographicHash::Sha1 otherwise. The default secret is obtained from the backend-specific cryptographically strong pseudorandom number generator.

See also setCookieGeneratorParameters(), QDtlsClientVerifier, and cookieGeneratorParameters().

func (*QDtls) DecryptDatagram

func (this *QDtls) DecryptDatagram(socket QUdpSocket_ITF, dgram qtcore.QByteArray_ITF) *qtcore.QByteArray

Decrypts dgram and returns its contents as plain text. The handshake must be completed before datagrams can be decrypted. Depending on the type of the TLS message the connection may write into socket, which must be a valid pointer.

func (*QDtls) DoHandshake

func (this *QDtls) DoHandshake(socket QUdpSocket_ITF, dgram qtcore.QByteArray_ITF) bool

Starts or continues a DTLS handshake. socket must be a valid pointer. When starting a server-side DTLS handshake, dgram must contain the initial ClientHello message read from QUdpSocket. This function returns true if no error was found. Handshake state can be tested using handshakeState(). false return means some error occurred, use dtlsError() for more detailed information.

Note: If the identity of the peer can't be established, the error is set to QDtlsError::PeerVerificationError. If you want to ignore verification errors and continue connecting, you must call ignoreVerificationErrors() and then resumeHandshake(). If the errors cannot be ignored, you must call abortHandshake().

if (!dtls.doHandshake(&socket, dgram)) {
    if (dtls.dtlsError() == QDtlsError::PeerVerificationError)
        dtls.abortAfterError(&socket);
}

See also handshakeState(), dtlsError(), ignoreVerificationErrors(), resumeHandshake(), and abortHandshake().

func (*QDtls) DoHandshakep

func (this *QDtls) DoHandshakep(socket QUdpSocket_ITF) bool

Starts or continues a DTLS handshake. socket must be a valid pointer. When starting a server-side DTLS handshake, dgram must contain the initial ClientHello message read from QUdpSocket. This function returns true if no error was found. Handshake state can be tested using handshakeState(). false return means some error occurred, use dtlsError() for more detailed information.

Note: If the identity of the peer can't be established, the error is set to QDtlsError::PeerVerificationError. If you want to ignore verification errors and continue connecting, you must call ignoreVerificationErrors() and then resumeHandshake(). If the errors cannot be ignored, you must call abortHandshake().

if (!dtls.doHandshake(&socket, dgram)) {
    if (dtls.dtlsError() == QDtlsError::PeerVerificationError)
        dtls.abortAfterError(&socket);
}

See also handshakeState(), dtlsError(), ignoreVerificationErrors(), resumeHandshake(), and abortHandshake().

func (*QDtls) DtlsConfiguration

func (this *QDtls) DtlsConfiguration() *QSslConfiguration

Returns either the default DTLS configuration or the configuration set by an earlier call to setDtlsConfiguration().

See also setDtlsConfiguration() and QSslConfiguration::defaultDtlsConfiguration().

func (*QDtls) DtlsError

func (this *QDtls) DtlsError() int

Returns the last error encountered by the connection or QDtlsError::NoError.

See also dtlsErrorString() and QDtlsError.

func (*QDtls) DtlsErrorString

func (this *QDtls) DtlsErrorString() string

Returns a textual description for the last error encountered by the connection or empty string.

See also dtlsError().

func (*QDtls) GetCthis

func (this *QDtls) GetCthis() unsafe.Pointer

func (*QDtls) HandleTimeout

func (this *QDtls) HandleTimeout(socket QUdpSocket_ITF) bool

If a timeout occures during the handshake, the handshakeTimeout() signal is emitted. The application must call handleTimeout() to retransmit handshake messages; handleTimeout() returns true if a timeout has occurred, false otherwise. socket must be a valid pointer.

See also handshakeTimeout().

func (*QDtls) HandshakeState

func (this *QDtls) HandshakeState() int

Returns the current handshake state for this QDtls.

See also doHandshake() and QDtls::HandshakeState.

func (*QDtls) HandshakeStateItemName

func (this *QDtls) HandshakeStateItemName(val int) string

func (*QDtls) HandshakeTimeout

func (this *QDtls) HandshakeTimeout()

Packet loss can result in timeouts during the handshake phase. In this case QDtls emits a handshakeTimeout() signal. Call handleTimeout() to retransmit the handshake messages:

DtlsClient::DtlsClient()
{
    // Some initialization code here ...
    connect(&clientDtls, &QDtls::handshakeTimeout, this, &DtlsClient::handleTimeout);
}

void DtlsClient::handleTimeout()
{
    clientDtls.handleTimeout(&clientSocket);
}

See also handleTimeout().

func (*QDtls) IsConnectionEncrypted

func (this *QDtls) IsConnectionEncrypted() bool

Returns true if DTLS handshake completed successfully.

See also doHandshake() and handshakeState().

func (*QDtls) MetaObject

func (this *QDtls) MetaObject() *qtcore.QMetaObject

func (*QDtls) MtuHint

func (this *QDtls) MtuHint() uint16

Returns the value previously set by setMtuHint(). The default value is 0.

See also setMtuHint().

func (*QDtls) NewForInherit

func (*QDtls) NewForInherit(mode int, parent qtcore.QObject_ITF) *QDtls

Creates a QDtls object, parent is passed to the QObject constructor. mode is QSslSocket::SslServerMode for a server-side DTLS connection or QSslSocket::SslClientMode for a client.

See also sslMode() and QSslSocket::SslMode.

func (*QDtls) NewForInheritp

func (*QDtls) NewForInheritp(mode int) *QDtls

Creates a QDtls object, parent is passed to the QObject constructor. mode is QSslSocket::SslServerMode for a server-side DTLS connection or QSslSocket::SslClientMode for a client.

See also sslMode() and QSslSocket::SslMode.

func (*QDtls) NewFromPointer

func (*QDtls) NewFromPointer(cthis unsafe.Pointer) *QDtls

func (*QDtls) PeerAddress

func (this *QDtls) PeerAddress() *QHostAddress

Returns the peer's address, set by setPeer(), or QHostAddress::Null.

See also setPeer().

func (*QDtls) PeerPort

func (this *QDtls) PeerPort() uint16

Returns the peer's port number, set by setPeer(), or 0.

See also setPeer().

func (*QDtls) PeerVerificationName

func (this *QDtls) PeerVerificationName() string

Returns the host name set by setPeer() or setPeerVerificationName(). The default value is an empty string.

See also setPeerVerificationName() and setPeer().

func (*QDtls) PskRequired

func (this *QDtls) PskRequired(authenticator QSslPreSharedKeyAuthenticator_ITF)

QDtls emits this signal when it negotiates a PSK ciphersuite, and therefore a PSK authentication is then required.

When using PSK, the client must send to the server a valid identity and a valid pre shared key, in order for the TLS handshake to continue. Applications can provide this information in a slot connected to this signal, by filling in the passed authenticator object according to their needs.

Note: Ignoring this signal, or failing to provide the required credentials, will cause the handshake to fail, and therefore the connection to be aborted.

Note: The authenticator object is owned by QDtls and must not be deleted by the application.

See also QSslPreSharedKeyAuthenticator.

func (*QDtls) QDtls_PTR

func (ptr *QDtls) QDtls_PTR() *QDtls

func (*QDtls) ResumeHandshake

func (this *QDtls) ResumeHandshake(socket QUdpSocket_ITF) bool

If peer verification errors were ignored during the handshake, resumeHandshake() resumes and completes the handshake and returns true. socket must be a valid pointer. Returns false if the handshake could not be resumed.

See also doHandshake(), abortHandshake(), peerVerificationErrors(), and ignoreVerificationErrors().

func (*QDtls) SessionCipher

func (this *QDtls) SessionCipher() *QSslCipher

Returns the cryptographic cipher used by this connection, or a null cipher if the connection isn't encrypted. The cipher for the session is selected during the handshake phase. The cipher is used to encrypt and decrypt data.

QSslConfiguration provides functions for setting the ordered list of ciphers from which the handshake phase will eventually select the session cipher. This ordered list must be in place before the handshake phase begins.

See also QSslConfiguration, setDtlsConfiguration(), and dtlsConfiguration().

func (*QDtls) SessionProtocol

func (this *QDtls) SessionProtocol() int

Returns the DTLS protocol version used by this connection, or UnknownProtocol if the connection isn't encrypted yet. The protocol for the connection is selected during the handshake phase.

setDtlsConfiguration() can set the preferred version before the handshake starts.

See also setDtlsConfiguration(), QSslConfiguration, QSslConfiguration::defaultDtlsConfiguration(), and QSslConfiguration::setProtocol().

func (*QDtls) SetCthis

func (this *QDtls) SetCthis(cthis unsafe.Pointer)

func (*QDtls) SetDtlsConfiguration

func (this *QDtls) SetDtlsConfiguration(configuration QSslConfiguration_ITF) bool

Sets the connection's TLS configuration from configuration and returns true if successful.

Note: This function must be called before the handshake starts.

See also dtlsConfiguration() and doHandshake().

func (*QDtls) SetMtuHint

func (this *QDtls) SetMtuHint(mtuHint uint16)

mtuHint is the maximum transmission unit (MTU), either discovered or guessed by the application. The application is not required to set this value.

See also mtuHint() and QAbstractSocket::PathMtuSocketOption.

func (*QDtls) SetPeer

func (this *QDtls) SetPeer(address QHostAddress_ITF, port uint16, verificationName string) bool

Sets the peer's address, port, and host name and returns true if successful. address must not be null, multicast, or broadcast. verificationName is the host name used for the certificate validation.

See also peerAddress(), peerPort(), and peerVerificationName().

func (*QDtls) SetPeerVerificationName

func (this *QDtls) SetPeerVerificationName(name string) bool

Sets the host name that will be used for the certificate validation and returns true if successful.

Note: This function must be called before the handshake starts.

See also peerVerificationName() and setPeer().

func (*QDtls) SetPeerp

func (this *QDtls) SetPeerp(address QHostAddress_ITF, port uint16) bool

Sets the peer's address, port, and host name and returns true if successful. address must not be null, multicast, or broadcast. verificationName is the host name used for the certificate validation.

See also peerAddress(), peerPort(), and peerVerificationName().

func (*QDtls) Shutdown

func (this *QDtls) Shutdown(socket QUdpSocket_ITF) bool

Sends an encrypted shutdown alert message and closes the DTLS connection. Handshake state changes to QDtls::HandshakeNotStarted. socket must be a valid pointer. This function returns true on success.

See also doHandshake().

func (*QDtls) SslMode

func (this *QDtls) SslMode() int

Returns QSslSocket::SslServerMode for a server-side connection and QSslSocket::SslClientMode for a client.

See also QDtls() and QSslSocket::SslMode.

func (*QDtls) WriteDatagramEncrypted

func (this *QDtls) WriteDatagramEncrypted(socket QUdpSocket_ITF, dgram qtcore.QByteArray_ITF) int64

Encrypts dgram and writes the encrypted data into socket. Returns the number of bytes written, or -1 in case of error. The handshake must be completed before writing encrypted data. socket must be a valid pointer.

See also doHandshake(), handshakeState(), isConnectionEncrypted(), and dtlsError().

type QDtlsClientVerifier

type QDtlsClientVerifier struct {
	*qtcore.QObject
}

func NewQDtlsClientVerifier

func NewQDtlsClientVerifier(parent qtcore.QObject_ITF) *QDtlsClientVerifier

func NewQDtlsClientVerifierFromPointer

func NewQDtlsClientVerifierFromPointer(cthis unsafe.Pointer) *QDtlsClientVerifier

func NewQDtlsClientVerifierp

func NewQDtlsClientVerifierp() *QDtlsClientVerifier

func (*QDtlsClientVerifier) CookieGeneratorParameters

func (this *QDtlsClientVerifier) CookieGeneratorParameters() unsafe.Pointer

Returns the current hash algorithm and secret, either default ones or previously set by a call to setCookieGeneratorParameters().

The default hash algorithm is QCryptographicHash::Sha256 if Qt was configured to support it, QCryptographicHash::Sha1 otherwise. The default secret is obtained from the backend-specific cryptographically strong pseudorandom number generator.

See also setCookieGeneratorParameters(), QDtlsClientVerifier, and cookieGeneratorParameters().

func (*QDtlsClientVerifier) DtlsError

func (this *QDtlsClientVerifier) DtlsError() int

Returns the last error encountered by the connection or QDtlsError::NoError.

See also dtlsErrorString() and QDtlsError.

func (*QDtlsClientVerifier) DtlsErrorString

func (this *QDtlsClientVerifier) DtlsErrorString() string

Returns a textual description for the last error encountered by the connection or empty string.

See also dtlsError().

func (*QDtlsClientVerifier) GetCthis

func (this *QDtlsClientVerifier) GetCthis() unsafe.Pointer

func (*QDtlsClientVerifier) MetaObject

func (this *QDtlsClientVerifier) MetaObject() *qtcore.QMetaObject

func (*QDtlsClientVerifier) NewForInherit

func (*QDtlsClientVerifier) NewForInheritp

func (*QDtlsClientVerifier) NewForInheritp() *QDtlsClientVerifier

func (*QDtlsClientVerifier) NewFromPointer

func (*QDtlsClientVerifier) NewFromPointer(cthis unsafe.Pointer) *QDtlsClientVerifier

func (*QDtlsClientVerifier) QDtlsClientVerifier_PTR

func (ptr *QDtlsClientVerifier) QDtlsClientVerifier_PTR() *QDtlsClientVerifier

func (*QDtlsClientVerifier) SetCthis

func (this *QDtlsClientVerifier) SetCthis(cthis unsafe.Pointer)

func (*QDtlsClientVerifier) VerifiedHello

func (this *QDtlsClientVerifier) VerifiedHello() *qtcore.QByteArray

func (*QDtlsClientVerifier) VerifyClient

func (this *QDtlsClientVerifier) VerifyClient(socket QUdpSocket_ITF, dgram qtcore.QByteArray_ITF, address QHostAddress_ITF, port uint16) bool

type QDtlsClientVerifier_ITF

type QDtlsClientVerifier_ITF interface {
	qtcore.QObject_ITF
	QDtlsClientVerifier_PTR() *QDtlsClientVerifier
}

type QDtls_ITF

type QDtls_ITF interface {
	qtcore.QObject_ITF
	QDtls_PTR() *QDtls
}

type QDtls__HandshakeState

type QDtls__HandshakeState = int

Describes the current state of DTLS handshake.

This enum describes the current state of DTLS handshake for a QDtls connection.

This enum was introduced or modified in Qt 5.12.

See also QDtls::doHandshake() and QDtls::handshakeState().

const QDtls__HandshakeComplete QDtls__HandshakeState = 3

Handshake completed successfully and encrypted connection was established.

const QDtls__HandshakeInProgress QDtls__HandshakeState = 1

Handshake was initiated and no errors were found so far.

const QDtls__HandshakeNotStarted QDtls__HandshakeState = 0

Nothing done yet.

const QDtls__PeerVerificationFailed QDtls__HandshakeState = 2

The identity of the peer can't be established.

type QHostAddress

type QHostAddress struct {
	*qtrt.CObject
}

func NewQHostAddress

func NewQHostAddress() *QHostAddress

func NewQHostAddress1

func NewQHostAddress1(ip4Addr uint) *QHostAddress

func NewQHostAddress2

func NewQHostAddress2(ip6Addr unsafe.Pointer) *QHostAddress

func NewQHostAddress3

func NewQHostAddress3(ip6Addr unsafe.Pointer) *QHostAddress

func NewQHostAddress4

func NewQHostAddress4(address string) *QHostAddress

func NewQHostAddress5

func NewQHostAddress5(address int) *QHostAddress

func NewQHostAddressFromPointer

func NewQHostAddressFromPointer(cthis unsafe.Pointer) *QHostAddress

func (*QHostAddress) Clear

func (this *QHostAddress) Clear()

Sets the host address to null.

See also QHostAddress::Null.

func (*QHostAddress) ConversionModeFlagItemName

func (this *QHostAddress) ConversionModeFlagItemName(val int) string

func (*QHostAddress) GetCthis

func (this *QHostAddress) GetCthis() unsafe.Pointer

func (*QHostAddress) IsBroadcast

func (this *QHostAddress) IsBroadcast() bool

Returns true if the address is the IPv4 broadcast address, false otherwise. The IPv4 broadcast address is 255.255.255.255.

Note that this function does not return true for an IPv4 network's local broadcast address. For that, please use QNetworkInterface to obtain the broadcast addresses of the local machine.

This function was introduced in Qt 5.11.

See also isLoopback(), isGlobal(), isMulticast(), isLinkLocal(), and isUniqueLocalUnicast().

func (*QHostAddress) IsEqual

func (this *QHostAddress) IsEqual(address QHostAddress_ITF, mode int) bool

Returns true if this host address is the same as the other address given; otherwise returns false.

The parameter mode controls which conversions are preformed between addresses of differing protocols. If no mode is given, TolerantConversion is performed by default.

This function was introduced in Qt 5.8.

See also ConversionMode and operator==().

func (*QHostAddress) IsEqualp

func (this *QHostAddress) IsEqualp(address QHostAddress_ITF) bool

Returns true if this host address is the same as the other address given; otherwise returns false.

The parameter mode controls which conversions are preformed between addresses of differing protocols. If no mode is given, TolerantConversion is performed by default.

This function was introduced in Qt 5.8.

See also ConversionMode and operator==().

func (*QHostAddress) IsGlobal

func (this *QHostAddress) IsGlobal() bool

Returns true if the address is an IPv4 or IPv6 global address, false otherwise. A global address is an address that is not reserved for special purposes (like loopback or multicast) or future purposes.

Note that IPv6 unique local unicast addresses are considered global addresses (see isUniqueLocalUnicast()), as are IPv4 addresses reserved for local networks by RFC 1918.

Also note that IPv6 site-local addresses are deprecated and should be considered as global in new applications. This function returns true for site-local addresses too.

This function was introduced in Qt 5.11.

See also isLoopback(), isSiteLocal(), and isUniqueLocalUnicast().

func (*QHostAddress) IsInSubnet

func (this *QHostAddress) IsInSubnet(subnet QHostAddress_ITF, netmask int) bool

Returns true if this IP is in the subnet described by the network prefix subnet and netmask netmask.

An IP is considered to belong to a subnet if it is contained between the lowest and the highest address in that subnet. In the case of IP version 4, the lowest address is the network address, while the highest address is the broadcast address.

The subnet argument does not have to be the actual network address (the lowest address in the subnet). It can be any valid IP belonging to that subnet. In particular, if it is equal to the IP address held by this object, this function will always return true (provided the netmask is a valid value).

This function was introduced in Qt 4.5.

See also parseSubnet().

func (*QHostAddress) IsLinkLocal

func (this *QHostAddress) IsLinkLocal() bool

Returns true if the address is an IPv4 or IPv6 link-local address, false otherwise.

An IPv4 link-local address is an address in the network 169.254.0.0/16. An IPv6 link-local address is one in the network fe80::/10. See the IANA IPv6 Address Space registry for more information.

This function was introduced in Qt 5.11.

See also isLoopback(), isGlobal(), isMulticast(), isSiteLocal(), and isUniqueLocalUnicast().

func (*QHostAddress) IsLoopback

func (this *QHostAddress) IsLoopback() bool

returns true if the address is the IPv6 loopback address, or any of the IPv4 loopback addresses.

This function was introduced in Qt 5.0.

func (*QHostAddress) IsMulticast

func (this *QHostAddress) IsMulticast() bool

Returns true if the address is an IPv4 or IPv6 multicast address, false otherwise.

This function was introduced in Qt 5.6.

See also isLoopback(), isGlobal(), isLinkLocal(), isSiteLocal(), and isUniqueLocalUnicast().

func (*QHostAddress) IsNull

func (this *QHostAddress) IsNull() bool

Returns true if this host address is not valid for any host or interface.

The default constructor creates a null address.

See also QHostAddress::Null.

func (*QHostAddress) IsSiteLocal

func (this *QHostAddress) IsSiteLocal() bool

Returns true if the address is an IPv6 site-local address, false otherwise.

An IPv6 site-local address is one in the network fec0::/10. See the IANA IPv6 Address Space registry for more information.

IPv6 site-local addresses are deprecated and should not be depended upon in new applications. New applications should not depend on this function and should consider site-local addresses the same as global (which is why isGlobal() also returns true). Site-local addresses were replaced by Unique Local Addresses (ULA).

This function was introduced in Qt 5.11.

See also isLoopback(), isGlobal(), isMulticast(), isLinkLocal(), and isUniqueLocalUnicast().

func (*QHostAddress) IsUniqueLocalUnicast

func (this *QHostAddress) IsUniqueLocalUnicast() bool

Returns true if the address is an IPv6 unique local unicast address, false otherwise.

An IPv6 unique local unicast address is one in the network fc00::/7. See the IANA IPv6 Address Space registry for more information.

Note that Unique local unicast addresses count as global addresses too. RFC 4193 says that, in practice, "applications may treat these addresses like global scoped addresses." Only routers need care about the distinction.

This function was introduced in Qt 5.11.

See also isLoopback(), isGlobal(), isMulticast(), isLinkLocal(), and isUniqueLocalUnicast().

func (*QHostAddress) NewForInherit

func (*QHostAddress) NewForInherit() *QHostAddress

Constructs a null host address object, i.e. an address which is not valid for any host or interface.

See also clear().

func (*QHostAddress) NewForInherit1

func (*QHostAddress) NewForInherit1(ip4Addr uint) *QHostAddress

Constructs a null host address object, i.e. an address which is not valid for any host or interface.

See also clear().

func (*QHostAddress) NewForInherit2

func (*QHostAddress) NewForInherit2(ip6Addr unsafe.Pointer) *QHostAddress

Constructs a null host address object, i.e. an address which is not valid for any host or interface.

See also clear().

func (*QHostAddress) NewForInherit3

func (*QHostAddress) NewForInherit3(ip6Addr unsafe.Pointer) *QHostAddress

Constructs a null host address object, i.e. an address which is not valid for any host or interface.

See also clear().

func (*QHostAddress) NewForInherit4

func (*QHostAddress) NewForInherit4(address string) *QHostAddress

Constructs a null host address object, i.e. an address which is not valid for any host or interface.

See also clear().

func (*QHostAddress) NewForInherit5

func (*QHostAddress) NewForInherit5(address int) *QHostAddress

Constructs a null host address object, i.e. an address which is not valid for any host or interface.

See also clear().

func (*QHostAddress) NewFromPointer

func (*QHostAddress) NewFromPointer(cthis unsafe.Pointer) *QHostAddress

func (*QHostAddress) Operator_equal

func (this *QHostAddress) Operator_equal(other unsafe.Pointer) *QHostAddress

func (*QHostAddress) Operator_equal1

func (this *QHostAddress) Operator_equal1(other QHostAddress_ITF) *QHostAddress

func (*QHostAddress) Operator_equal2

func (this *QHostAddress) Operator_equal2(address string) *QHostAddress

func (*QHostAddress) Operator_equal3

func (this *QHostAddress) Operator_equal3(address int) *QHostAddress

func (*QHostAddress) Operator_equal_equal

func (this *QHostAddress) Operator_equal_equal(address QHostAddress_ITF) bool

func (*QHostAddress) Operator_equal_equal1

func (this *QHostAddress) Operator_equal_equal1(address int) bool

func (*QHostAddress) Operator_not_equal

func (this *QHostAddress) Operator_not_equal(address QHostAddress_ITF) bool

func (*QHostAddress) Operator_not_equal1

func (this *QHostAddress) Operator_not_equal1(address int) bool

func (*QHostAddress) Protocol

func (this *QHostAddress) Protocol() int

Returns the network layer protocol of the host address.

func (*QHostAddress) QHostAddress_PTR

func (ptr *QHostAddress) QHostAddress_PTR() *QHostAddress

func (*QHostAddress) ScopeId

func (this *QHostAddress) ScopeId() string

Returns the scope ID of an IPv6 address. For IPv4 addresses, or if the address does not contain a scope ID, an empty QString is returned.

The IPv6 scope ID specifies the scope of reachability for non-global IPv6 addresses, limiting the area in which the address can be used. All IPv6 addresses are associated with such a reachability scope. The scope ID is used to disambiguate addresses that are not guaranteed to be globally unique.

IPv6 specifies the following four levels of reachability:

Node-local: Addresses that are only used for communicating with services on the same interface (e.g., the loopback interface "::1"). Link-local: Addresses that are local to the network interface (link). There is always one link-local address for each IPv6 interface on your host. Link-local addresses ("fe80...") are generated from the MAC address of the local network adaptor, and are not guaranteed to be unique. Global: For globally routable addresses, such as public servers on the Internet.

When using a link-local or site-local address for IPv6 connections, you must specify the scope ID. The scope ID for a link-local address is usually the same as the interface name (e.g., "eth0", "en1") or number (e.g., "1", "2").

This function was introduced in Qt 4.1.

See also setScopeId(), QNetworkInterface, and QNetworkInterface::interfaceFromName.

func (*QHostAddress) SetAddress

func (this *QHostAddress) SetAddress(ip4Addr uint)

Set the IPv4 address specified by ip4Addr.

func (*QHostAddress) SetAddress1

func (this *QHostAddress) SetAddress1(ip6Addr unsafe.Pointer)

Set the IPv4 address specified by ip4Addr.

func (*QHostAddress) SetAddress2

func (this *QHostAddress) SetAddress2(ip6Addr unsafe.Pointer)

Set the IPv4 address specified by ip4Addr.

func (*QHostAddress) SetAddress3

func (this *QHostAddress) SetAddress3(address string) bool

Set the IPv4 address specified by ip4Addr.

func (*QHostAddress) SetAddress4

func (this *QHostAddress) SetAddress4(address int)

Set the IPv4 address specified by ip4Addr.

func (*QHostAddress) SetCthis

func (this *QHostAddress) SetCthis(cthis unsafe.Pointer)

func (*QHostAddress) SetScopeId

func (this *QHostAddress) SetScopeId(id string)

Sets the IPv6 scope ID of the address to id. If the address protocol is not IPv6, this function does nothing. The scope ID may be set as an interface name (such as "eth0" or "en1") or as an integer representing the interface index. If id is an interface name, QtNetwork will convert to an interface index using QNetworkInterface::interfaceIndexFromName() before calling the operating system networking functions.

This function was introduced in Qt 4.1.

See also scopeId(), QNetworkInterface, and QNetworkInterface::interfaceFromName.

func (*QHostAddress) SpecialAddressItemName

func (this *QHostAddress) SpecialAddressItemName(val int) string

func (*QHostAddress) Swap

func (this *QHostAddress) Swap(other QHostAddress_ITF)

Swaps this host address with other. This operation is very fast and never fails.

This function was introduced in Qt 5.6.

func (*QHostAddress) ToIPv4Address

func (this *QHostAddress) ToIPv4Address() uint

Returns the IPv4 address as a number.

For example, if the address is 127.0.0.1, the returned value is 2130706433 (i.e. 0x7f000001).

This value is valid if the protocol() is IPv4Protocol, or if the protocol is IPv6Protocol, and the IPv6 address is an IPv4 mapped address. (RFC4291)

See also toString().

func (*QHostAddress) ToIPv4Address1

func (this *QHostAddress) ToIPv4Address1(ok *bool) uint

Returns the IPv4 address as a number.

For example, if the address is 127.0.0.1, the returned value is 2130706433 (i.e. 0x7f000001).

This value is valid if the protocol() is IPv4Protocol, or if the protocol is IPv6Protocol, and the IPv6 address is an IPv4 mapped address. (RFC4291)

See also toString().

func (*QHostAddress) ToIPv6Address

func (this *QHostAddress) ToIPv6Address() *QIPv6Address

Returns the IPv6 address as a Q_IPV6ADDR structure. The structure consists of 16 unsigned characters.

Q_IPV6ADDR addr = hostAddr.toIPv6Address();
// addr contains 16 unsigned characters

for (int i = 0; i < 16; ++i) {
    // process addr[i]
}

This value is valid if the protocol() is IPv6Protocol. If the protocol is IPv4Protocol, then the address is returned an an IPv4 mapped IPv6 address. (RFC4291)

See also toString().

func (*QHostAddress) ToString

func (this *QHostAddress) ToString() string

Returns the address as a string.

For example, if the address is the IPv4 address 127.0.0.1, the returned string is "127.0.0.1". For IPv6 the string format will follow the RFC5952 recommendation. For QHostAddress::Any, its IPv4 address will be returned ("0.0.0.0")

See also toIPv4Address().

type QHostAddress_ITF

type QHostAddress_ITF interface {
	QHostAddress_PTR() *QHostAddress
}

type QHostAddress__ConversionModeFlag

type QHostAddress__ConversionModeFlag = int
const QHostAddress__ConvertLocalHost QHostAddress__ConversionModeFlag = 8
const QHostAddress__ConvertUnspecifiedAddress QHostAddress__ConversionModeFlag = 4
const QHostAddress__ConvertV4CompatToIPv4 QHostAddress__ConversionModeFlag = 2
const QHostAddress__ConvertV4MappedToIPv4 QHostAddress__ConversionModeFlag = 1
const QHostAddress__StrictConversion QHostAddress__ConversionModeFlag = 0
const QHostAddress__TolerantConversion QHostAddress__ConversionModeFlag = 255

type QHostAddress__SpecialAddress

type QHostAddress__SpecialAddress = int
const QHostAddress__Any QHostAddress__SpecialAddress = 4
const QHostAddress__AnyIPv4 QHostAddress__SpecialAddress = 6
const QHostAddress__AnyIPv6 QHostAddress__SpecialAddress = 5
const QHostAddress__Broadcast QHostAddress__SpecialAddress = 1
const QHostAddress__LocalHost QHostAddress__SpecialAddress = 2
const QHostAddress__LocalHostIPv6 QHostAddress__SpecialAddress = 3
const QHostAddress__Null QHostAddress__SpecialAddress = 0

The null address object. Equivalent to QHostAddress(). See also QHostAddress::isNull().

type QHostInfo

type QHostInfo struct {
	*qtrt.CObject
}

func NewQHostInfo

func NewQHostInfo(lookupId int) *QHostInfo

func NewQHostInfoFromPointer

func NewQHostInfoFromPointer(cthis unsafe.Pointer) *QHostInfo

func NewQHostInfop

func NewQHostInfop() *QHostInfo

func QHostInfo_FromName

func QHostInfo_FromName(name string) *QHostInfo

func (*QHostInfo) AbortHostLookup

func (this *QHostInfo) AbortHostLookup(lookupId int)

Aborts the host lookup with the ID id, as returned by lookupHost().

See also lookupHost() and lookupId().

func (*QHostInfo) Error

func (this *QHostInfo) Error() int

Returns the type of error that occurred if the host name lookup failed; otherwise returns NoError.

See also setError() and errorString().

func (*QHostInfo) ErrorString

func (this *QHostInfo) ErrorString() string

If the lookup failed, this function returns a human readable description of the error; otherwise "Unknown error" is returned.

See also setErrorString() and error().

func (*QHostInfo) FromName

func (this *QHostInfo) FromName(name string) *QHostInfo

Looks up the IP address(es) for the given host name. The function blocks during the lookup which means that execution of the program is suspended until the results of the lookup are ready. Returns the result of the lookup in a QHostInfo object.

If you pass a literal IP address to name instead of a host name, QHostInfo will search for the domain name for the IP (i.e., QHostInfo will perform a reverse lookup). On success, the returned QHostInfo will contain both the resolved domain name and IP addresses for the host name.

See also lookupHost().

func (*QHostInfo) GetCthis

func (this *QHostInfo) GetCthis() unsafe.Pointer

func (*QHostInfo) HostInfoErrorItemName

func (this *QHostInfo) HostInfoErrorItemName(val int) string

func (*QHostInfo) HostName

func (this *QHostInfo) HostName() string

Returns the name of the host whose IP addresses were looked up.

See also setHostName() and localHostName().

func (*QHostInfo) LocalDomainName

func (this *QHostInfo) LocalDomainName() string

Returns the DNS domain of this machine.

Note: DNS domains are not related to domain names found in Windows networks.

See also hostName().

func (*QHostInfo) LocalHostName

func (this *QHostInfo) LocalHostName() string

Returns this machine's host name, if one is configured. Note that hostnames are not guaranteed to be globally unique, especially if they were configured automatically.

This function does not guarantee the returned host name is a Fully Qualified Domain Name (FQDN). For that, use fromName() to resolve the returned name to an FQDN.

This function returns the same as QSysInfo::machineHostName().

See also hostName() and localDomainName().

func (*QHostInfo) LookupHost

func (this *QHostInfo) LookupHost(name string, receiver qtcore.QObject_ITF, member string) int

Looks up the IP address(es) associated with host name name, and returns an ID for the lookup. When the result of the lookup is ready, the slot or signal member in receiver is called with a QHostInfo argument. The QHostInfo object can then be inspected to get the results of the lookup.

The lookup is performed by a single function call, for example:

QHostInfo::lookupHost("www.kde.org",
                      this, SLOT(lookedUp(QHostInfo)));

The implementation of the slot prints basic information about the addresses returned by the lookup, or reports an error if it failed:

void MyWidget::lookedUp(const QHostInfo &host)
{
    if (host.error() != QHostInfo::NoError) {
        qDebug() << "Lookup failed:" << host.errorString();
        return;
    }

    const auto addresses = host.addresses();
    for (const QHostAddress &address : addresses)
        qDebug() << "Found address:" << address.toString();
}

If you pass a literal IP address to name instead of a host name, QHostInfo will search for the domain name for the IP (i.e., QHostInfo will perform a reverse lookup). On success, the resulting QHostInfo will contain both the resolved domain name and IP addresses for the host name. Example:

QHostInfo::lookupHost("4.2.2.1",
                      this, SLOT(lookedUp(QHostInfo)));

Note: There is no guarantee on the order the signals will be emitted if you start multiple requests with lookupHost().

See also abortHostLookup(), addresses(), error(), and fromName().

func (*QHostInfo) LookupId

func (this *QHostInfo) LookupId() int

Returns the ID of this lookup.

See also setLookupId(), abortHostLookup(), and hostName().

func (*QHostInfo) NewForInherit

func (*QHostInfo) NewForInherit(lookupId int) *QHostInfo

Constructs an empty host info object with lookup ID id.

See also lookupId().

func (*QHostInfo) NewForInheritp

func (*QHostInfo) NewForInheritp() *QHostInfo

Constructs an empty host info object with lookup ID id.

See also lookupId().

func (*QHostInfo) NewFromPointer

func (*QHostInfo) NewFromPointer(cthis unsafe.Pointer) *QHostInfo

func (*QHostInfo) Operator_equal

func (this *QHostInfo) Operator_equal(d QHostInfo_ITF) *QHostInfo

func (*QHostInfo) Operator_equal1

func (this *QHostInfo) Operator_equal1(other unsafe.Pointer) *QHostInfo

func (*QHostInfo) QHostInfo_PTR

func (ptr *QHostInfo) QHostInfo_PTR() *QHostInfo

func (*QHostInfo) SetCthis

func (this *QHostInfo) SetCthis(cthis unsafe.Pointer)

func (*QHostInfo) SetError

func (this *QHostInfo) SetError(error int)

Sets the error type of this QHostInfo to error.

See also error() and errorString().

func (*QHostInfo) SetErrorString

func (this *QHostInfo) SetErrorString(errorString string)

Sets the human readable description of the error that occurred to str if the lookup failed.

See also errorString() and setError().

func (*QHostInfo) SetHostName

func (this *QHostInfo) SetHostName(name string)

Sets the host name of this QHostInfo to hostName.

See also hostName().

func (*QHostInfo) SetLookupId

func (this *QHostInfo) SetLookupId(id int)

Sets the ID of this lookup to id.

See also lookupId() and lookupHost().

func (*QHostInfo) Swap

func (this *QHostInfo) Swap(other QHostInfo_ITF)

Swaps host-info other with this host-info. This operation is very fast and never fails.

This function was introduced in Qt 5.10.

type QHostInfo_ITF

type QHostInfo_ITF interface {
	QHostInfo_PTR() *QHostInfo
}

type QHostInfo__HostInfoError

type QHostInfo__HostInfoError = int

This enum describes the various errors that can occur when trying to resolve a host name.

See also error() and setError().

const QHostInfo__HostNotFound QHostInfo__HostInfoError = 1

No IP addresses were found for the host.

const QHostInfo__NoError QHostInfo__HostInfoError = 0

The lookup was successful.

const QHostInfo__UnknownError QHostInfo__HostInfoError = 2

An unknown error occurred.

type QHstsPolicy

type QHstsPolicy struct {
	*qtrt.CObject
}

func NewQHstsPolicy

func NewQHstsPolicy() *QHstsPolicy

func NewQHstsPolicy1

func NewQHstsPolicy1(expiry qtcore.QDateTime_ITF, flags int, host string, mode int) *QHstsPolicy

func NewQHstsPolicy1p

func NewQHstsPolicy1p(expiry qtcore.QDateTime_ITF, flags int, host string) *QHstsPolicy

func NewQHstsPolicyFromPointer

func NewQHstsPolicyFromPointer(cthis unsafe.Pointer) *QHstsPolicy

func (*QHstsPolicy) Expiry

func (this *QHstsPolicy) Expiry() *qtcore.QDateTime

Returns the expiration date for the policy (in UTC).

See also setExpiry().

func (*QHstsPolicy) GetCthis

func (this *QHstsPolicy) GetCthis() unsafe.Pointer

func (*QHstsPolicy) IncludesSubDomains

func (this *QHstsPolicy) IncludesSubDomains() bool

Returns true if this policy also includes subdomains.

See also setIncludesSubDomains().

func (*QHstsPolicy) IsExpired

func (this *QHstsPolicy) IsExpired() bool

Return true if this policy has a valid expiration date and this date is greater than QDateTime::currentGetDateTimeUtc().

See also setExpiry() and expiry().

func (*QHstsPolicy) NewForInherit

func (*QHstsPolicy) NewForInherit() *QHstsPolicy

Constructs an invalid (expired) policy with empty host name and subdomains not included.

func (*QHstsPolicy) NewForInherit1

func (*QHstsPolicy) NewForInherit1(expiry qtcore.QDateTime_ITF, flags int, host string, mode int) *QHstsPolicy

Constructs an invalid (expired) policy with empty host name and subdomains not included.

func (*QHstsPolicy) NewForInherit1p

func (*QHstsPolicy) NewForInherit1p(expiry qtcore.QDateTime_ITF, flags int, host string) *QHstsPolicy

Constructs an invalid (expired) policy with empty host name and subdomains not included.

func (*QHstsPolicy) NewFromPointer

func (*QHstsPolicy) NewFromPointer(cthis unsafe.Pointer) *QHstsPolicy

func (*QHstsPolicy) Operator_equal

func (this *QHstsPolicy) Operator_equal(rhs QHstsPolicy_ITF) *QHstsPolicy

func (*QHstsPolicy) Operator_equal1

func (this *QHstsPolicy) Operator_equal1(other unsafe.Pointer) *QHstsPolicy

func (*QHstsPolicy) PolicyFlagItemName

func (this *QHstsPolicy) PolicyFlagItemName(val int) string

func (*QHstsPolicy) QHstsPolicy_PTR

func (ptr *QHstsPolicy) QHstsPolicy_PTR() *QHstsPolicy

func (*QHstsPolicy) SetCthis

func (this *QHstsPolicy) SetCthis(cthis unsafe.Pointer)

func (*QHstsPolicy) SetExpiry

func (this *QHstsPolicy) SetExpiry(expiry qtcore.QDateTime_ITF)

Sets the expiration date for the policy (in UTC) to expiry.

See also expiry().

func (*QHstsPolicy) SetHost

func (this *QHstsPolicy) SetHost(host string, mode int)

Sets a host, host data is interpreted according to mode parameter.

See also host(), QUrl::setHost(), and QUrl::ParsingMode.

func (*QHstsPolicy) SetHostp

func (this *QHstsPolicy) SetHostp(host string)

Sets a host, host data is interpreted according to mode parameter.

See also host(), QUrl::setHost(), and QUrl::ParsingMode.

func (*QHstsPolicy) SetIncludesSubDomains

func (this *QHstsPolicy) SetIncludesSubDomains(include_ bool)

Sets whether subdomains are included for this policy to include.

See also includesSubDomains().

func (*QHstsPolicy) Swap

func (this *QHstsPolicy) Swap(other QHstsPolicy_ITF)

Swaps this policy with the other policy.

type QHstsPolicy_ITF

type QHstsPolicy_ITF interface {
	QHstsPolicy_PTR() *QHstsPolicy
}

type QHstsPolicy__PolicyFlag

type QHstsPolicy__PolicyFlag = int
const QHstsPolicy__IncludeSubDomains QHstsPolicy__PolicyFlag = 1

type QHttpMultiPart

type QHttpMultiPart struct {
	*qtcore.QObject
}

func NewQHttpMultiPart

func NewQHttpMultiPart(parent qtcore.QObject_ITF) *QHttpMultiPart

func NewQHttpMultiPart1

func NewQHttpMultiPart1(contentType int, parent qtcore.QObject_ITF) *QHttpMultiPart

func NewQHttpMultiPart1p

func NewQHttpMultiPart1p(contentType int) *QHttpMultiPart

func NewQHttpMultiPartFromPointer

func NewQHttpMultiPartFromPointer(cthis unsafe.Pointer) *QHttpMultiPart

func NewQHttpMultiPartp

func NewQHttpMultiPartp() *QHttpMultiPart

func (*QHttpMultiPart) Boundary

func (this *QHttpMultiPart) Boundary() *qtcore.QByteArray

returns the boundary.

See also setBoundary().

func (*QHttpMultiPart) ContentTypeItemName

func (this *QHttpMultiPart) ContentTypeItemName(val int) string

func (*QHttpMultiPart) GetCthis

func (this *QHttpMultiPart) GetCthis() unsafe.Pointer

func (*QHttpMultiPart) MetaObject

func (this *QHttpMultiPart) MetaObject() *qtcore.QMetaObject

func (*QHttpMultiPart) NewForInherit

func (*QHttpMultiPart) NewForInherit(parent qtcore.QObject_ITF) *QHttpMultiPart

Constructs a QHttpMultiPart with content type MixedType and sets parent as the parent object.

See also QHttpMultiPart::ContentType.

func (*QHttpMultiPart) NewForInherit1

func (*QHttpMultiPart) NewForInherit1(contentType int, parent qtcore.QObject_ITF) *QHttpMultiPart

Constructs a QHttpMultiPart with content type MixedType and sets parent as the parent object.

See also QHttpMultiPart::ContentType.

func (*QHttpMultiPart) NewForInherit1p

func (*QHttpMultiPart) NewForInherit1p(contentType int) *QHttpMultiPart

Constructs a QHttpMultiPart with content type MixedType and sets parent as the parent object.

See also QHttpMultiPart::ContentType.

func (*QHttpMultiPart) NewForInheritp

func (*QHttpMultiPart) NewForInheritp() *QHttpMultiPart

Constructs a QHttpMultiPart with content type MixedType and sets parent as the parent object.

See also QHttpMultiPart::ContentType.

func (*QHttpMultiPart) NewFromPointer

func (*QHttpMultiPart) NewFromPointer(cthis unsafe.Pointer) *QHttpMultiPart

func (*QHttpMultiPart) QHttpMultiPart_PTR

func (ptr *QHttpMultiPart) QHttpMultiPart_PTR() *QHttpMultiPart

func (*QHttpMultiPart) SetBoundary

func (this *QHttpMultiPart) SetBoundary(boundary qtcore.QByteArray_ITF)

Sets the boundary to boundary.

Usually, you do not need to generate a boundary yourself; upon construction the boundary is initiated with the string "boundary_.oOo._" followed by random characters, and provides enough uniqueness to make sure it does not occur inside the parts itself.

See also boundary().

func (*QHttpMultiPart) SetContentType

func (this *QHttpMultiPart) SetContentType(contentType int)

Sets the content type to contentType. The content type will be used in the HTTP header section when sending the multipart message via QNetworkAccessManager::post(). In case you want to use a multipart subtype not contained in QHttpMultiPart::ContentType, you can add the "Content-Type" header field to the QNetworkRequest by hand, and then use this request together with the multipart message for posting.

See also QHttpMultiPart::ContentType and QNetworkAccessManager::post().

func (*QHttpMultiPart) SetCthis

func (this *QHttpMultiPart) SetCthis(cthis unsafe.Pointer)

type QHttpMultiPart_ITF

type QHttpMultiPart_ITF interface {
	qtcore.QObject_ITF
	QHttpMultiPart_PTR() *QHttpMultiPart
}

type QHttpMultiPart__ContentType

type QHttpMultiPart__ContentType = int

List of known content types for a multipart subtype as described in RFC 2046 and others.

See also setContentType().

const QHttpMultiPart__AlternativeType QHttpMultiPart__ContentType = 3
const QHttpMultiPart__FormDataType QHttpMultiPart__ContentType = 2
const QHttpMultiPart__MixedType QHttpMultiPart__ContentType = 0
const QHttpMultiPart__RelatedType QHttpMultiPart__ContentType = 1

type QHttpPart

type QHttpPart struct {
	*qtrt.CObject
}

func NewQHttpPart

func NewQHttpPart() *QHttpPart

func NewQHttpPartFromPointer

func NewQHttpPartFromPointer(cthis unsafe.Pointer) *QHttpPart

func (*QHttpPart) GetCthis

func (this *QHttpPart) GetCthis() unsafe.Pointer

func (*QHttpPart) NewForInherit

func (*QHttpPart) NewForInherit() *QHttpPart

func (*QHttpPart) NewFromPointer

func (*QHttpPart) NewFromPointer(cthis unsafe.Pointer) *QHttpPart

func (*QHttpPart) Operator_equal

func (this *QHttpPart) Operator_equal(other unsafe.Pointer) *QHttpPart

func (*QHttpPart) Operator_equal1

func (this *QHttpPart) Operator_equal1(other QHttpPart_ITF) *QHttpPart

func (*QHttpPart) Operator_equal_equal

func (this *QHttpPart) Operator_equal_equal(other QHttpPart_ITF) bool

func (*QHttpPart) Operator_not_equal

func (this *QHttpPart) Operator_not_equal(other QHttpPart_ITF) bool

func (*QHttpPart) QHttpPart_PTR

func (ptr *QHttpPart) QHttpPart_PTR() *QHttpPart

func (*QHttpPart) SetBody

func (this *QHttpPart) SetBody(body qtcore.QByteArray_ITF)

func (*QHttpPart) SetBodyDevice

func (this *QHttpPart) SetBodyDevice(device qtcore.QIODevice_ITF)

func (*QHttpPart) SetCthis

func (this *QHttpPart) SetCthis(cthis unsafe.Pointer)

func (*QHttpPart) SetHeader

func (this *QHttpPart) SetHeader(header int, value qtcore.QVariant_ITF)

func (*QHttpPart) SetRawHeader

func (this *QHttpPart) SetRawHeader(headerName qtcore.QByteArray_ITF, headerValue qtcore.QByteArray_ITF)

func (*QHttpPart) Swap

func (this *QHttpPart) Swap(other QHttpPart_ITF)

type QHttpPart_ITF

type QHttpPart_ITF interface {
	QHttpPart_PTR() *QHttpPart
}

type QIPv6Address

type QIPv6Address struct {
	*qtrt.CObject
}

func NewQIPv6AddressFromPointer

func NewQIPv6AddressFromPointer(cthis unsafe.Pointer) *QIPv6Address

func (*QIPv6Address) GetCthis

func (this *QIPv6Address) GetCthis() unsafe.Pointer

func (*QIPv6Address) NewFromPointer

func (*QIPv6Address) NewFromPointer(cthis unsafe.Pointer) *QIPv6Address

func (*QIPv6Address) Operator_get_index

func (this *QIPv6Address) Operator_get_index(index int) byte

func (*QIPv6Address) Operator_get_index1

func (this *QIPv6Address) Operator_get_index1(index int) byte

func (*QIPv6Address) QIPv6Address_PTR

func (ptr *QIPv6Address) QIPv6Address_PTR() *QIPv6Address

func (*QIPv6Address) SetCthis

func (this *QIPv6Address) SetCthis(cthis unsafe.Pointer)

type QIPv6Address_ITF

type QIPv6Address_ITF interface {
	QIPv6Address_PTR() *QIPv6Address
}

type QLocalServer

type QLocalServer struct {
	*qtcore.QObject
}

func NewQLocalServer

func NewQLocalServer(parent qtcore.QObject_ITF) *QLocalServer

func NewQLocalServerFromPointer

func NewQLocalServerFromPointer(cthis unsafe.Pointer) *QLocalServer

func NewQLocalServerp

func NewQLocalServerp() *QLocalServer

func (*QLocalServer) Close

func (this *QLocalServer) Close()

Stop listening for incoming connections. Existing connections are not affected, but any new connections will be refused.

See also isListening() and listen().

func (*QLocalServer) ErrorString

func (this *QLocalServer) ErrorString() string

Returns the human-readable message appropriate to the current error reported by serverError(). If no suitable string is available, an empty string is returned.

See also serverError().

func (*QLocalServer) FullServerName

func (this *QLocalServer) FullServerName() string

Returns the full path that the server is listening on.

Note: This is platform specific

See also listen() and serverName().

func (*QLocalServer) GetCthis

func (this *QLocalServer) GetCthis() unsafe.Pointer

func (*QLocalServer) HasPendingConnections

func (this *QLocalServer) HasPendingConnections() bool

Returns true if the server has a pending connection; otherwise returns false.

See also nextPendingConnection() and setMaxPendingConnections().

func (*QLocalServer) IncomingConnection

func (this *QLocalServer) IncomingConnection(socketDescriptor uint64)

This virtual function is called by QLocalServer when a new connection is available. socketDescriptor is the native socket descriptor for the accepted connection.

The base implementation creates a QLocalSocket, sets the socket descriptor and then stores the QLocalSocket in an internal list of pending connections. Finally newConnection() is emitted.

Reimplement this function to alter the server's behavior when a connection is available.

See also newConnection(), nextPendingConnection(), and QLocalSocket::setSocketDescriptor().

func (*QLocalServer) InheritIncomingConnection

func (this *QLocalServer) InheritIncomingConnection(f func(socketDescriptor uint64))

void incomingConnection(quintptr)

func (*QLocalServer) IsListening

func (this *QLocalServer) IsListening() bool

Returns true if the server is listening for incoming connections otherwise false.

See also listen() and close().

func (*QLocalServer) Listen

func (this *QLocalServer) Listen(name string) bool

Tells the server to listen for incoming connections on name. If the server is currently listening then it will return false. Return true on success otherwise false.

name can be a single name and QLocalServer will determine the correct platform specific path. serverName() will return the name that is passed into listen.

Usually you would just pass in a name like "foo", but on Unix this could also be a path such as "/tmp/foo" and on Windows this could be a pipe path such as "\\.\pipe\foo"

Note: On Unix if the server crashes without closing listen will fail with AddressInUseError. To create a new server the file should be removed. On Windows two local servers can listen to the same pipe at the same time, but any connections will go to one of the server.

See also serverName(), isListening(), and close().

func (*QLocalServer) Listen1

func (this *QLocalServer) Listen1(socketDescriptor int64) bool

Tells the server to listen for incoming connections on name. If the server is currently listening then it will return false. Return true on success otherwise false.

name can be a single name and QLocalServer will determine the correct platform specific path. serverName() will return the name that is passed into listen.

Usually you would just pass in a name like "foo", but on Unix this could also be a path such as "/tmp/foo" and on Windows this could be a pipe path such as "\\.\pipe\foo"

Note: On Unix if the server crashes without closing listen will fail with AddressInUseError. To create a new server the file should be removed. On Windows two local servers can listen to the same pipe at the same time, but any connections will go to one of the server.

See also serverName(), isListening(), and close().

func (*QLocalServer) MaxPendingConnections

func (this *QLocalServer) MaxPendingConnections() int

Returns the maximum number of pending accepted connections. The default is 30.

See also setMaxPendingConnections() and hasPendingConnections().

func (*QLocalServer) MetaObject

func (this *QLocalServer) MetaObject() *qtcore.QMetaObject

func (*QLocalServer) NewConnection

func (this *QLocalServer) NewConnection()

This signal is emitted every time a new connection is available.

See also hasPendingConnections() and nextPendingConnection().

func (*QLocalServer) NewForInherit

func (*QLocalServer) NewForInherit(parent qtcore.QObject_ITF) *QLocalServer

Create a new local socket server with the given parent.

See also listen().

func (*QLocalServer) NewForInheritp

func (*QLocalServer) NewForInheritp() *QLocalServer

Create a new local socket server with the given parent.

See also listen().

func (*QLocalServer) NewFromPointer

func (*QLocalServer) NewFromPointer(cthis unsafe.Pointer) *QLocalServer

func (*QLocalServer) NextPendingConnection

func (this *QLocalServer) NextPendingConnection() *QLocalSocket

Returns the next pending connection as a connected QLocalSocket object.

The socket is created as a child of the server, which means that it is automatically deleted when the QLocalServer object is destroyed. It is still a good idea to delete the object explicitly when you are done with it, to avoid wasting memory.

0 is returned if this function is called when there are no pending connections.

See also hasPendingConnections(), newConnection(), and incomingConnection().

func (*QLocalServer) QLocalServer_PTR

func (ptr *QLocalServer) QLocalServer_PTR() *QLocalServer

func (*QLocalServer) RemoveServer

func (this *QLocalServer) RemoveServer(name string) bool

Removes any server instance that might cause a call to listen() to fail and returns true if successful; otherwise returns false. This function is meant to recover from a crash, when the previous server instance has not been cleaned up.

On Windows, this function does nothing; on Unix, it removes the socket file given by name.

Warning: Be careful to avoid removing sockets of running instances.

This function was introduced in Qt 4.5.

func (*QLocalServer) ServerError

func (this *QLocalServer) ServerError() int

Returns the type of error that occurred last or NoError.

See also errorString().

func (*QLocalServer) ServerName

func (this *QLocalServer) ServerName() string

Returns the server name if the server is listening for connections; otherwise returns QString()

See also listen() and fullServerName().

func (*QLocalServer) SetCthis

func (this *QLocalServer) SetCthis(cthis unsafe.Pointer)

func (*QLocalServer) SetMaxPendingConnections

func (this *QLocalServer) SetMaxPendingConnections(numConnections int)

Sets the maximum number of pending accepted connections to numConnections. QLocalServer will accept no more than numConnections incoming connections before nextPendingConnection() is called.

Note: Even though QLocalServer will stop accepting new connections after it has reached its maximum number of pending connections, the operating system may still keep them in queue which will result in clients signaling that it is connected.

See also maxPendingConnections() and hasPendingConnections().

func (*QLocalServer) SetSocketOptions

func (this *QLocalServer) SetSocketOptions(options int)

func (*QLocalServer) SocketDescriptor

func (this *QLocalServer) SocketDescriptor() int64

Returns the native socket descriptor the server uses to listen for incoming instructions, or -1 if the server is not listening.

The type of the descriptor depends on the platform:

On Windows, the returned value is a Winsock 2 Socket Handle. With WinRT and on INTEGRITY, the returned value is the QTcpServer socket descriptor and the type is defined by socketDescriptor. On all other UNIX-like operating systems, the type is a file descriptor representing a listening socket.

This function was introduced in Qt 5.10.

See also listen().

func (*QLocalServer) SocketOptionItemName

func (this *QLocalServer) SocketOptionItemName(val int) string

func (*QLocalServer) SocketOptions

func (this *QLocalServer) SocketOptions() int

Returns the socket options set on the socket.

This function was introduced in Qt 5.0.

Note: Getter function for property socketOptions.

See also setSocketOptions().

func (*QLocalServer) WaitForNewConnection

func (this *QLocalServer) WaitForNewConnection(msec int, timedOut *bool) bool

Waits for at most msec milliseconds or until an incoming connection is available. Returns true if a connection is available; otherwise returns false. If the operation timed out and timedOut is not 0, *timedOut will be set to true.

This is a blocking function call. Its use is ill-advised in a single-threaded GUI application, since the whole application will stop responding until the function returns. waitForNewConnection() is mostly useful when there is no event loop available.

The non-blocking alternative is to connect to the newConnection() signal.

If msec is -1, this function will not time out.

See also hasPendingConnections() and nextPendingConnection().

func (*QLocalServer) WaitForNewConnectionp

func (this *QLocalServer) WaitForNewConnectionp() bool

Waits for at most msec milliseconds or until an incoming connection is available. Returns true if a connection is available; otherwise returns false. If the operation timed out and timedOut is not 0, *timedOut will be set to true.

This is a blocking function call. Its use is ill-advised in a single-threaded GUI application, since the whole application will stop responding until the function returns. waitForNewConnection() is mostly useful when there is no event loop available.

The non-blocking alternative is to connect to the newConnection() signal.

If msec is -1, this function will not time out.

See also hasPendingConnections() and nextPendingConnection().

func (*QLocalServer) WaitForNewConnectionp1

func (this *QLocalServer) WaitForNewConnectionp1(msec int) bool

Waits for at most msec milliseconds or until an incoming connection is available. Returns true if a connection is available; otherwise returns false. If the operation timed out and timedOut is not 0, *timedOut will be set to true.

This is a blocking function call. Its use is ill-advised in a single-threaded GUI application, since the whole application will stop responding until the function returns. waitForNewConnection() is mostly useful when there is no event loop available.

The non-blocking alternative is to connect to the newConnection() signal.

If msec is -1, this function will not time out.

See also hasPendingConnections() and nextPendingConnection().

type QLocalServer_ITF

type QLocalServer_ITF interface {
	qtcore.QObject_ITF
	QLocalServer_PTR() *QLocalServer
}

type QLocalServer__SocketOption

type QLocalServer__SocketOption = int
const QLocalServer__GroupAccessOption QLocalServer__SocketOption = 2
const QLocalServer__NoOptions QLocalServer__SocketOption = 0
const QLocalServer__OtherAccessOption QLocalServer__SocketOption = 4
const QLocalServer__UserAccessOption QLocalServer__SocketOption = 1
const QLocalServer__WorldAccessOption QLocalServer__SocketOption = 7

type QLocalSocket

type QLocalSocket struct {
	*qtcore.QIODevice
}

func NewQLocalSocket

func NewQLocalSocket(parent qtcore.QObject_ITF) *QLocalSocket

func NewQLocalSocketFromPointer

func NewQLocalSocketFromPointer(cthis unsafe.Pointer) *QLocalSocket

func NewQLocalSocketp

func NewQLocalSocketp() *QLocalSocket

func (*QLocalSocket) Abort

func (this *QLocalSocket) Abort()

Aborts the current connection and resets the socket. Unlike disconnectFromServer(), this function immediately closes the socket, clearing any pending data in the write buffer.

See also disconnectFromServer() and close().

func (*QLocalSocket) BytesAvailable

func (this *QLocalSocket) BytesAvailable() int64

Reimplemented from QIODevice::bytesAvailable().

func (*QLocalSocket) BytesToWrite

func (this *QLocalSocket) BytesToWrite() int64

Reimplemented from QIODevice::bytesToWrite().

func (*QLocalSocket) CanReadLine

func (this *QLocalSocket) CanReadLine() bool

Reimplemented from QIODevice::canReadLine().

func (*QLocalSocket) Close

func (this *QLocalSocket) Close()

Reimplemented from QIODevice::close().

func (*QLocalSocket) ConnectToServer

func (this *QLocalSocket) ConnectToServer(openMode int)

Attempts to make a connection to serverName(). setServerName() must be called before you open the connection. Alternatively you can use connectToServer(const QString &name, OpenMode openMode);

The socket is opened in the given openMode and first enters ConnectingState. If a connection is established, QLocalSocket enters ConnectedState and emits connected().

After calling this function, the socket can emit error() to signal that an error occurred.

This function was introduced in Qt 5.1.

See also state(), serverName(), and waitForConnected().

func (*QLocalSocket) ConnectToServer1

func (this *QLocalSocket) ConnectToServer1(name string, openMode int)

Attempts to make a connection to serverName(). setServerName() must be called before you open the connection. Alternatively you can use connectToServer(const QString &name, OpenMode openMode);

The socket is opened in the given openMode and first enters ConnectingState. If a connection is established, QLocalSocket enters ConnectedState and emits connected().

After calling this function, the socket can emit error() to signal that an error occurred.

This function was introduced in Qt 5.1.

See also state(), serverName(), and waitForConnected().

func (*QLocalSocket) ConnectToServer1p

func (this *QLocalSocket) ConnectToServer1p(name string)

Attempts to make a connection to serverName(). setServerName() must be called before you open the connection. Alternatively you can use connectToServer(const QString &name, OpenMode openMode);

The socket is opened in the given openMode and first enters ConnectingState. If a connection is established, QLocalSocket enters ConnectedState and emits connected().

After calling this function, the socket can emit error() to signal that an error occurred.

This function was introduced in Qt 5.1.

See also state(), serverName(), and waitForConnected().

func (*QLocalSocket) ConnectToServerp

func (this *QLocalSocket) ConnectToServerp()

Attempts to make a connection to serverName(). setServerName() must be called before you open the connection. Alternatively you can use connectToServer(const QString &name, OpenMode openMode);

The socket is opened in the given openMode and first enters ConnectingState. If a connection is established, QLocalSocket enters ConnectedState and emits connected().

After calling this function, the socket can emit error() to signal that an error occurred.

This function was introduced in Qt 5.1.

See also state(), serverName(), and waitForConnected().

func (*QLocalSocket) Connected

func (this *QLocalSocket) Connected()

This signal is emitted after connectToServer() has been called and a connection has been successfully established.

See also connectToServer() and disconnected().

func (*QLocalSocket) DisconnectFromServer

func (this *QLocalSocket) DisconnectFromServer()

Attempts to close the socket. If there is pending data waiting to be written, QLocalSocket will enter ClosingState and wait until all data has been written. Eventually, it will enter UnconnectedState and emit the disconnectedFromServer() signal.

See also connectToServer().

func (*QLocalSocket) Disconnected

func (this *QLocalSocket) Disconnected()

This signal is emitted when the socket has been disconnected.

See also connectToServer(), disconnectFromServer(), abort(), and connected().

func (*QLocalSocket) Error

func (this *QLocalSocket) Error() int

Returns the type of error that last occurred.

See also state() and errorString().

func (*QLocalSocket) Error1

func (this *QLocalSocket) Error1(socketError int)

Returns the type of error that last occurred.

See also state() and errorString().

func (*QLocalSocket) Flush

func (this *QLocalSocket) Flush() bool

This function writes as much as possible from the internal write buffer to the socket, without blocking. If any data was written, this function returns true; otherwise false is returned.

Call this function if you need QLocalSocket to start sending buffered data immediately. The number of bytes successfully written depends on the operating system. In most cases, you do not need to call this function, because QLocalSocket will start sending data automatically once control goes back to the event loop. In the absence of an event loop, call waitForBytesWritten() instead.

See also write() and waitForBytesWritten().

func (*QLocalSocket) FullServerName

func (this *QLocalSocket) FullServerName() string

Returns the server path that the socket is connected to.

Note: The return value of this function is platform specific.

See also connectToServer() and serverName().

func (*QLocalSocket) GetCthis

func (this *QLocalSocket) GetCthis() unsafe.Pointer

func (*QLocalSocket) InheritReadData

func (this *QLocalSocket) InheritReadData(f func(arg0 string, arg1 int64) int64)

long long readData(char *, qint64)

func (*QLocalSocket) InheritWriteData

func (this *QLocalSocket) InheritWriteData(f func(arg0 string, arg1 int64) int64)

long long writeData(const char *, qint64)

func (*QLocalSocket) IsSequential

func (this *QLocalSocket) IsSequential() bool

Reimplemented from QIODevice::isSequential().

func (*QLocalSocket) IsValid

func (this *QLocalSocket) IsValid() bool

Returns true if the socket is valid and ready for use; otherwise returns false.

Note: The socket's state must be ConnectedState before reading and writing can occur.

See also state() and connectToServer().

func (*QLocalSocket) LocalSocketErrorItemName

func (this *QLocalSocket) LocalSocketErrorItemName(val int) string

func (*QLocalSocket) LocalSocketStateItemName

func (this *QLocalSocket) LocalSocketStateItemName(val int) string

func (*QLocalSocket) MetaObject

func (this *QLocalSocket) MetaObject() *qtcore.QMetaObject

func (*QLocalSocket) NewForInherit

func (*QLocalSocket) NewForInherit(parent qtcore.QObject_ITF) *QLocalSocket

Creates a new local socket. The parent argument is passed to QObject's constructor.

func (*QLocalSocket) NewForInheritp

func (*QLocalSocket) NewForInheritp() *QLocalSocket

Creates a new local socket. The parent argument is passed to QObject's constructor.

func (*QLocalSocket) NewFromPointer

func (*QLocalSocket) NewFromPointer(cthis unsafe.Pointer) *QLocalSocket

func (*QLocalSocket) Open

func (this *QLocalSocket) Open(openMode int) bool

Reimplemented from QIODevice::open().

Equivalent to connectToServer(OpenMode mode). The socket is opened in the given openMode to the server defined by setServerName().

Note that unlike in most other QIODevice subclasses, open() may not open the device directly. The function return false if the socket was already connected or if the server to connect to was not defined and true in any other case. The connected() or error() signals will be emitted once the device is actualy open (or the connection failed).

See connectToServer() for more details.

func (*QLocalSocket) Openp

func (this *QLocalSocket) Openp() bool

Reimplemented from QIODevice::open().

Equivalent to connectToServer(OpenMode mode). The socket is opened in the given openMode to the server defined by setServerName().

Note that unlike in most other QIODevice subclasses, open() may not open the device directly. The function return false if the socket was already connected or if the server to connect to was not defined and true in any other case. The connected() or error() signals will be emitted once the device is actualy open (or the connection failed).

See connectToServer() for more details.

func (*QLocalSocket) QLocalSocket_PTR

func (ptr *QLocalSocket) QLocalSocket_PTR() *QLocalSocket

func (*QLocalSocket) ReadBufferSize

func (this *QLocalSocket) ReadBufferSize() int64

Returns the size of the internal read buffer. This limits the amount of data that the client can receive before you call read() or readAll(). A read buffer size of 0 (the default) means that the buffer has no size limit, ensuring that no data is lost.

See also setReadBufferSize() and read().

func (*QLocalSocket) ReadData

func (this *QLocalSocket) ReadData(arg0 string, arg1 int64) int64

Reimplemented from QIODevice::readData().

func (*QLocalSocket) ServerName

func (this *QLocalSocket) ServerName() string

Returns the name of the peer as specified by setServerName(), or an empty QString if setServerName() has not been called or connectToServer() failed.

See also setServerName(), connectToServer(), and fullServerName().

func (*QLocalSocket) SetCthis

func (this *QLocalSocket) SetCthis(cthis unsafe.Pointer)

func (*QLocalSocket) SetReadBufferSize

func (this *QLocalSocket) SetReadBufferSize(size int64)

Sets the size of QLocalSocket's internal read buffer to be size bytes.

If the buffer size is limited to a certain size, QLocalSocket won't buffer more than this size of data. Exceptionally, a buffer size of 0 means that the read buffer is unlimited and all incoming data is buffered. This is the default.

This option is useful if you only read the data at certain points in time (e.g., in a real-time streaming application) or if you want to protect your socket against receiving too much data, which may eventually cause your application to run out of memory.

See also readBufferSize() and read().

func (*QLocalSocket) SetServerName

func (this *QLocalSocket) SetServerName(name string)

Set the name of the peer to connect to. On Windows name is the name of a named pipe; on Unix name is the name of a local domain socket.

This function must be called when the socket is not connected.

This function was introduced in Qt 5.1.

See also serverName().

func (*QLocalSocket) SetSocketDescriptor

func (this *QLocalSocket) SetSocketDescriptor(socketDescriptor int64, socketState int, openMode int) bool

Initializes QLocalSocket with the native socket descriptor socketDescriptor. Returns true if socketDescriptor is accepted as a valid socket descriptor; otherwise returns false. The socket is opened in the mode specified by openMode, and enters the socket state specified by socketState.

Note: It is not possible to initialize two local sockets with the same native socket descriptor.

See also socketDescriptor(), state(), and openMode().

func (*QLocalSocket) SetSocketDescriptorp

func (this *QLocalSocket) SetSocketDescriptorp(socketDescriptor int64) bool

Initializes QLocalSocket with the native socket descriptor socketDescriptor. Returns true if socketDescriptor is accepted as a valid socket descriptor; otherwise returns false. The socket is opened in the mode specified by openMode, and enters the socket state specified by socketState.

Note: It is not possible to initialize two local sockets with the same native socket descriptor.

See also socketDescriptor(), state(), and openMode().

func (*QLocalSocket) SetSocketDescriptorp1

func (this *QLocalSocket) SetSocketDescriptorp1(socketDescriptor int64, socketState int) bool

Initializes QLocalSocket with the native socket descriptor socketDescriptor. Returns true if socketDescriptor is accepted as a valid socket descriptor; otherwise returns false. The socket is opened in the mode specified by openMode, and enters the socket state specified by socketState.

Note: It is not possible to initialize two local sockets with the same native socket descriptor.

See also socketDescriptor(), state(), and openMode().

func (*QLocalSocket) SocketDescriptor

func (this *QLocalSocket) SocketDescriptor() int64

Returns the native socket descriptor of the QLocalSocket object if this is available; otherwise returns -1.

The socket descriptor is not available when QLocalSocket is in UnconnectedState. The type of the descriptor depends on the platform:

On Windows, the returned value is a Winsock 2 Socket Handle. With WinRT and on INTEGRITY, the returned value is the QTcpSocket socket descriptor and the type is defined by socketDescriptor. On all other UNIX-like operating systems, the type is a file descriptor representing a socket.

See also setSocketDescriptor().

func (*QLocalSocket) State

func (this *QLocalSocket) State() int

Returns the state of the socket.

See also error().

func (*QLocalSocket) StateChanged

func (this *QLocalSocket) StateChanged(socketState int)

This signal is emitted whenever QLocalSocket's state changes. The socketState parameter is the new state.

QLocalSocket::SocketState is not a registered metatype, so for queued connections, you will have to register it with Q_DECLARE_METATYPE() and qRegisterMetaType().

See also state() and Creating Custom Qt Types.

func (*QLocalSocket) WaitForBytesWritten

func (this *QLocalSocket) WaitForBytesWritten(msecs int) bool

Reimplemented from QIODevice::waitForBytesWritten().

func (*QLocalSocket) WaitForBytesWrittenp

func (this *QLocalSocket) WaitForBytesWrittenp() bool

Reimplemented from QIODevice::waitForBytesWritten().

func (*QLocalSocket) WaitForConnected

func (this *QLocalSocket) WaitForConnected(msecs int) bool

Waits until the socket is connected, up to msecs milliseconds. If the connection has been established, this function returns true; otherwise it returns false. 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 established:

socket->connectToServer("market");
if (socket->waitForConnected(1000))
    qDebug("Connected!");

If msecs is -1, this function will not time out.

See also connectToServer() and connected().

func (*QLocalSocket) WaitForConnectedp

func (this *QLocalSocket) WaitForConnectedp() bool

Waits until the socket is connected, up to msecs milliseconds. If the connection has been established, this function returns true; otherwise it returns false. 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 established:

socket->connectToServer("market");
if (socket->waitForConnected(1000))
    qDebug("Connected!");

If msecs is -1, this function will not time out.

See also connectToServer() and connected().

func (*QLocalSocket) WaitForDisconnected

func (this *QLocalSocket) WaitForDisconnected(msecs int) bool

Waits until the socket has disconnected, up to msecs milliseconds. If the connection has been disconnected, this function returns true; otherwise it returns false. 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->waitForDisconnected(1000))
    qDebug("Disconnected!");

If msecs is -1, this function will not time out.

See also disconnectFromServer() and close().

func (*QLocalSocket) WaitForDisconnectedp

func (this *QLocalSocket) WaitForDisconnectedp() bool

Waits until the socket has disconnected, up to msecs milliseconds. If the connection has been disconnected, this function returns true; otherwise it returns false. 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->waitForDisconnected(1000))
    qDebug("Disconnected!");

If msecs is -1, this function will not time out.

See also disconnectFromServer() and close().

func (*QLocalSocket) WaitForReadyRead

func (this *QLocalSocket) WaitForReadyRead(msecs int) bool

Reimplemented from QIODevice::waitForReadyRead().

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().

func (*QLocalSocket) WaitForReadyReadp

func (this *QLocalSocket) WaitForReadyReadp() bool

Reimplemented from QIODevice::waitForReadyRead().

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().

func (*QLocalSocket) WriteData

func (this *QLocalSocket) WriteData(arg0 string, arg1 int64) int64

Reimplemented from QIODevice::writeData().

type QLocalSocket_ITF

type QLocalSocket_ITF interface {
	qtcore.QIODevice_ITF
	QLocalSocket_PTR() *QLocalSocket
}

type QLocalSocket__LocalSocketError

type QLocalSocket__LocalSocketError = int

The LocalServerError enumeration represents the errors that can occur. The most recent error can be retrieved through a call to QLocalSocket::error().

QLocalSocket::ConnectionRefusedErrorQAbstractSocket::ConnectionRefusedErrorThe connection was refused by the peer (or timed out). QLocalSocket::PeerClosedErrorQAbstractSocket::RemoteHostClosedErrorThe remote socket closed the connection. Note that the client socket (i.e., this socket) will be closed after the remote close notification has been sent. QLocalSocket::ServerNotFoundErrorQAbstractSocket::HostNotFoundErrorThe local socket name was not found. QLocalSocket::SocketAccessErrorQAbstractSocket::SocketAccessErrorThe socket operation failed because the application lacked the required privileges. QLocalSocket::SocketResourceErrorQAbstractSocket::SocketResourceErrorThe local system ran out of resources (e.g., too many sockets). QLocalSocket::SocketTimeoutErrorQAbstractSocket::SocketTimeoutErrorThe socket operation timed out. QLocalSocket::ConnectionErrorQAbstractSocket::NetworkErrorAn error occurred with the connection. QLocalSocket::UnsupportedSocketOperationErrorQAbstractSocket::UnsupportedSocketOperationErrorThe requested socket operation is not supported by the local operating system. QLocalSocket::OperationErrorQAbstractSocket::OperationErrorAn operation was attempted while the socket was in a state that did not permit it. QLocalSocket::UnknownSocketErrorQAbstractSocket::UnknownSocketErrorAn unidentified error occurred.

const QLocalSocket__ConnectionError QLocalSocket__LocalSocketError = 7
const QLocalSocket__ConnectionRefusedError QLocalSocket__LocalSocketError = 0
const QLocalSocket__DatagramTooLargeError QLocalSocket__LocalSocketError = 6
const QLocalSocket__OperationError QLocalSocket__LocalSocketError = 19
const QLocalSocket__PeerClosedError QLocalSocket__LocalSocketError = 1
const QLocalSocket__ServerNotFoundError QLocalSocket__LocalSocketError = 2
const QLocalSocket__SocketAccessError QLocalSocket__LocalSocketError = 3
const QLocalSocket__SocketResourceError QLocalSocket__LocalSocketError = 4
const QLocalSocket__SocketTimeoutError QLocalSocket__LocalSocketError = 5
const QLocalSocket__UnknownSocketError QLocalSocket__LocalSocketError = -1
const QLocalSocket__UnsupportedSocketOperationError QLocalSocket__LocalSocketError = 10

type QLocalSocket__LocalSocketState

type QLocalSocket__LocalSocketState = int

This enum describes the different states in which a socket can be.

QLocalSocket::UnconnectedStateQAbstractSocket::UnconnectedStateThe socket is not connected. QLocalSocket::ConnectingStateQAbstractSocket::ConnectingStateThe socket has started establishing a connection. QLocalSocket::ConnectedStateQAbstractSocket::ConnectedStateA connection is established. QLocalSocket::ClosingStateQAbstractSocket::ClosingStateThe socket is about to close (data may still be waiting to be written).

See also QLocalSocket::state().

const QLocalSocket__ClosingState QLocalSocket__LocalSocketState = 6
const QLocalSocket__ConnectedState QLocalSocket__LocalSocketState = 3
const QLocalSocket__ConnectingState QLocalSocket__LocalSocketState = 2
const QLocalSocket__UnconnectedState QLocalSocket__LocalSocketState = 0

type QNetworkAccessManager

type QNetworkAccessManager struct {
	*qtcore.QObject
}

func NewQNetworkAccessManager

func NewQNetworkAccessManager(parent qtcore.QObject_ITF) *QNetworkAccessManager

func NewQNetworkAccessManagerFromPointer

func NewQNetworkAccessManagerFromPointer(cthis unsafe.Pointer) *QNetworkAccessManager

func NewQNetworkAccessManagerp

func NewQNetworkAccessManagerp() *QNetworkAccessManager

func (*QNetworkAccessManager) ActiveConfiguration

func (this *QNetworkAccessManager) ActiveConfiguration() *QNetworkConfiguration

Returns the current active network configuration.

If the network configuration returned by configuration() is of type QNetworkConfiguration::ServiceNetwork this function will return the current active child network configuration of that configuration. Otherwise returns the same network configuration as configuration().

Use this function to return the actual network configuration currently in use by the network session.

This function was introduced in Qt 4.7.

See also configuration().

func (*QNetworkAccessManager) AuthenticationRequired

func (this *QNetworkAccessManager) AuthenticationRequired(reply QNetworkReply_ITF, authenticator QAuthenticator_ITF)

This signal is emitted whenever a final server requests authentication before it delivers the requested contents. The slot connected to this signal should fill the credentials for the contents (which can be determined by inspecting the reply object) in the authenticator object.

QNetworkAccessManager will cache the credentials internally and will send the same values if the server requires authentication again, without emitting the authenticationRequired() signal. If it rejects the credentials, this signal will be emitted again.

Note: To have the request not send credentials you must not call setUser() or setPassword() on the authenticator object. This will result in the finished() signal being emitted with a QNetworkReply with error AuthenticationRequiredError.

Note: It is not possible to use a QueuedConnection to connect to this signal, as the connection will fail if the authenticator has not been filled in with new information when the signal returns.

See also proxyAuthenticationRequired(), QAuthenticator::setUser(), and QAuthenticator::setPassword().

func (*QNetworkAccessManager) Cache

Returns the cache that is used to store data obtained from the network.

This function was introduced in Qt 4.5.

See also setCache().

func (*QNetworkAccessManager) ClearAccessCache

func (this *QNetworkAccessManager) ClearAccessCache()

Flushes the internal cache of authentication data and network connections.

This function is useful for doing auto tests.

This function was introduced in Qt 5.0.

See also clearConnectionCache().

func (*QNetworkAccessManager) ClearConnectionCache

func (this *QNetworkAccessManager) ClearConnectionCache()

Flushes the internal cache of network connections. In contrast to clearAccessCache() the authentication data is preserved.

This function was introduced in Qt 5.9.

See also clearAccessCache().

func (*QNetworkAccessManager) Configuration

func (this *QNetworkAccessManager) Configuration() *QNetworkConfiguration

Returns the network configuration that will be used to create the network session which will be used when processing network requests.

This function was introduced in Qt 4.7.

See also setConfiguration() and activeConfiguration().

func (*QNetworkAccessManager) ConnectToHost

func (this *QNetworkAccessManager) ConnectToHost(hostName string, port uint16)

Initiates a connection to the host given by hostName at port port. This function is useful to complete the TCP handshake to a host before the HTTP request is made, resulting in a lower network latency.

Note: This function has no possibility to report errors.

This function was introduced in Qt 5.2.

See also connectToHostEncrypted(), get(), post(), put(), and deleteResource().

func (*QNetworkAccessManager) ConnectToHostEncrypted

func (this *QNetworkAccessManager) ConnectToHostEncrypted(hostName string, port uint16, sslConfiguration QSslConfiguration_ITF)

Initiates a connection to the host given by hostName at port port, using sslConfiguration. This function is useful to complete the TCP and SSL handshake to a host before the HTTPS request is made, resulting in a lower network latency.

Note: Preconnecting a SPDY connection can be done by calling setAllowedNextProtocols() on sslConfiguration with QSslConfiguration::NextProtocolSpdy3_0 contained in the list of allowed protocols. When using SPDY, one single connection per host is enough, i.e. calling this method multiple times per host will not result in faster network transactions.

Note: This function has no possibility to report errors.

This function was introduced in Qt 5.2.

See also connectToHost(), get(), post(), put(), and deleteResource().

func (*QNetworkAccessManager) ConnectToHostEncryptedp

func (this *QNetworkAccessManager) ConnectToHostEncryptedp(hostName string)

Initiates a connection to the host given by hostName at port port, using sslConfiguration. This function is useful to complete the TCP and SSL handshake to a host before the HTTPS request is made, resulting in a lower network latency.

Note: Preconnecting a SPDY connection can be done by calling setAllowedNextProtocols() on sslConfiguration with QSslConfiguration::NextProtocolSpdy3_0 contained in the list of allowed protocols. When using SPDY, one single connection per host is enough, i.e. calling this method multiple times per host will not result in faster network transactions.

Note: This function has no possibility to report errors.

This function was introduced in Qt 5.2.

See also connectToHost(), get(), post(), put(), and deleteResource().

func (*QNetworkAccessManager) ConnectToHostEncryptedp1

func (this *QNetworkAccessManager) ConnectToHostEncryptedp1(hostName string, port uint16)

Initiates a connection to the host given by hostName at port port, using sslConfiguration. This function is useful to complete the TCP and SSL handshake to a host before the HTTPS request is made, resulting in a lower network latency.

Note: Preconnecting a SPDY connection can be done by calling setAllowedNextProtocols() on sslConfiguration with QSslConfiguration::NextProtocolSpdy3_0 contained in the list of allowed protocols. When using SPDY, one single connection per host is enough, i.e. calling this method multiple times per host will not result in faster network transactions.

Note: This function has no possibility to report errors.

This function was introduced in Qt 5.2.

See also connectToHost(), get(), post(), put(), and deleteResource().

func (*QNetworkAccessManager) ConnectToHostp

func (this *QNetworkAccessManager) ConnectToHostp(hostName string)

Initiates a connection to the host given by hostName at port port. This function is useful to complete the TCP handshake to a host before the HTTP request is made, resulting in a lower network latency.

Note: This function has no possibility to report errors.

This function was introduced in Qt 5.2.

See also connectToHostEncrypted(), get(), post(), put(), and deleteResource().

func (*QNetworkAccessManager) CookieJar

func (this *QNetworkAccessManager) CookieJar() *QNetworkCookieJar

Returns the QNetworkCookieJar that is used to store cookies obtained from the network as well as cookies that are about to be sent.

See also setCookieJar().

func (*QNetworkAccessManager) CreateRequest

func (this *QNetworkAccessManager) CreateRequest(op int, request QNetworkRequest_ITF, outgoingData qtcore.QIODevice_ITF) *QNetworkReply

Returns a new QNetworkReply object to handle the operation op and request originalReq. The device outgoingData is always 0 for Get and Head requests, but is the value passed to post() and put() in those operations (the QByteArray variants will pass a QBuffer object).

The default implementation calls QNetworkCookieJar::cookiesForUrl() on the cookie jar set with setCookieJar() to obtain the cookies to be sent to the remote server.

The returned object must be in an open state.

func (*QNetworkAccessManager) CreateRequestp

func (this *QNetworkAccessManager) CreateRequestp(op int, request QNetworkRequest_ITF) *QNetworkReply

Returns a new QNetworkReply object to handle the operation op and request originalReq. The device outgoingData is always 0 for Get and Head requests, but is the value passed to post() and put() in those operations (the QByteArray variants will pass a QBuffer object).

The default implementation calls QNetworkCookieJar::cookiesForUrl() on the cookie jar set with setCookieJar() to obtain the cookies to be sent to the remote server.

The returned object must be in an open state.

func (*QNetworkAccessManager) DeleteResource

func (this *QNetworkAccessManager) DeleteResource(request QNetworkRequest_ITF) *QNetworkReply

Sends a request to delete the resource identified by the URL of request.

Note: This feature is currently available for HTTP only, performing an HTTP DELETE request.

This function was introduced in Qt 4.6.

See also get(), post(), put(), and sendCustomRequest().

func (*QNetworkAccessManager) EnableStrictTransportSecurityStore

func (this *QNetworkAccessManager) EnableStrictTransportSecurityStore(enabled bool, storeDir string)

If enabled is true, the internal HSTS cache will use a persistent store to read and write HSTS policies. storeDir defines where this store will be located. The default location is defined by QStandardPaths::CacheLocation. If there is no writable QStandartPaths::CacheLocation and storeDir is an empty string, the store will be located in the program's working directory.

Note: If HSTS cache already contains HSTS policies by the time persistent store is enabled, these policies will be preserved in the store. In case both cache and store contain the same known hosts, policies from cache are considered to be more up-to-date (and thus will overwrite the previous values in the store). If this behavior is undesired, enable HSTS store before enabling Strict Tranport Security. By default, the persistent store of HSTS policies is disabled.

This function was introduced in Qt 5.10.

See also isStrictTransportSecurityStoreEnabled(), setStrictTransportSecurityEnabled(), and QStandardPaths::standardLocations().

func (*QNetworkAccessManager) EnableStrictTransportSecurityStorep

func (this *QNetworkAccessManager) EnableStrictTransportSecurityStorep(enabled bool)

If enabled is true, the internal HSTS cache will use a persistent store to read and write HSTS policies. storeDir defines where this store will be located. The default location is defined by QStandardPaths::CacheLocation. If there is no writable QStandartPaths::CacheLocation and storeDir is an empty string, the store will be located in the program's working directory.

Note: If HSTS cache already contains HSTS policies by the time persistent store is enabled, these policies will be preserved in the store. In case both cache and store contain the same known hosts, policies from cache are considered to be more up-to-date (and thus will overwrite the previous values in the store). If this behavior is undesired, enable HSTS store before enabling Strict Tranport Security. By default, the persistent store of HSTS policies is disabled.

This function was introduced in Qt 5.10.

See also isStrictTransportSecurityStoreEnabled(), setStrictTransportSecurityEnabled(), and QStandardPaths::standardLocations().

func (*QNetworkAccessManager) Encrypted

func (this *QNetworkAccessManager) Encrypted(reply QNetworkReply_ITF)

This signal is emitted when an SSL/TLS session has successfully completed the initial handshake. At this point, no user data has been transmitted. The signal can be used to perform additional checks on the certificate chain, for example to notify users when the certificate for a website has changed. The reply parameter specifies which network reply is responsible. If the reply does not match the expected criteria then it should be aborted by calling QNetworkReply::abort() by a slot connected to this signal. The SSL configuration in use can be inspected using the QNetworkReply::sslConfiguration() method.

Internally, QNetworkAccessManager may open multiple connections to a server, in order to allow it process requests in parallel. These connections may be reused, which means that the encrypted() signal would not be emitted. This means that you are only guaranteed to receive this signal for the first connection to a site in the lifespan of the QNetworkAccessManager.

This function was introduced in Qt 5.1.

See also QSslSocket::encrypted() and QNetworkReply::encrypted().

func (*QNetworkAccessManager) Finished

func (this *QNetworkAccessManager) Finished(reply QNetworkReply_ITF)

This signal is emitted whenever a pending network reply is finished. The reply parameter will contain a pointer to the reply that has just finished. This signal is emitted in tandem with the QNetworkReply::finished() signal.

See QNetworkReply::finished() for information on the status that the object will be in.

Note: Do not delete the reply object in the slot connected to this signal. Use deleteLater().

See also QNetworkReply::finished() and QNetworkReply::error().

func (*QNetworkAccessManager) Get

Posts a request to obtain the contents of the target request and returns a new QNetworkReply object opened for reading which emits the readyRead() signal whenever new data arrives.

The contents as well as associated headers will be downloaded.

See also post(), put(), deleteResource(), and sendCustomRequest().

func (*QNetworkAccessManager) GetCthis

func (this *QNetworkAccessManager) GetCthis() unsafe.Pointer

func (*QNetworkAccessManager) Head

Posts a request to obtain the network headers for request and returns a new QNetworkReply object which will contain such headers.

The function is named after the HTTP request associated (HEAD).

func (*QNetworkAccessManager) InheritCreateRequest

func (this *QNetworkAccessManager) InheritCreateRequest(f func(op int, request *QNetworkRequest, outgoingData *qtcore.QIODevice) unsafe.Pointer)

QNetworkReply * createRequest(QNetworkAccessManager::Operation, const QNetworkRequest &, QIODevice *)

func (*QNetworkAccessManager) InheritSupportedSchemesImplementation

func (this *QNetworkAccessManager) InheritSupportedSchemesImplementation(f func() unsafe.Pointer)

QStringList supportedSchemesImplementation()

func (*QNetworkAccessManager) IsStrictTransportSecurityEnabled

func (this *QNetworkAccessManager) IsStrictTransportSecurityEnabled() bool

Returns true if HTTP Strict Transport Security (HSTS) was enabled. By default HSTS is disabled.

This function was introduced in Qt 5.9.

See also setStrictTransportSecurityEnabled().

func (*QNetworkAccessManager) IsStrictTransportSecurityStoreEnabled

func (this *QNetworkAccessManager) IsStrictTransportSecurityStoreEnabled() bool

Returns true if HSTS cache uses a permanent store to load and store HSTS policies.

This function was introduced in Qt 5.10.

See also enableStrictTransportSecurityStore().

func (*QNetworkAccessManager) MetaObject

func (this *QNetworkAccessManager) MetaObject() *qtcore.QMetaObject

func (*QNetworkAccessManager) NetworkAccessibilityItemName

func (this *QNetworkAccessManager) NetworkAccessibilityItemName(val int) string

func (*QNetworkAccessManager) NetworkAccessible

func (this *QNetworkAccessManager) NetworkAccessible() int

Returns the current network accessibility.

This function was introduced in Qt 4.7.

Note: Getter function for property networkAccessible.

See also setNetworkAccessible().

func (*QNetworkAccessManager) NetworkAccessibleChanged

func (this *QNetworkAccessManager) NetworkAccessibleChanged(accessible int)

This signal is emitted when the value of the networkAccessible property changes. accessible is the new network accessibility.

Note: Notifier signal for property networkAccessible.

func (*QNetworkAccessManager) NetworkSessionConnected

func (this *QNetworkAccessManager) NetworkSessionConnected()

func (*QNetworkAccessManager) NewForInherit

Constructs a QNetworkAccessManager object that is the center of the Network Access API and sets parent as the parent object.

func (*QNetworkAccessManager) NewForInheritp

func (*QNetworkAccessManager) NewForInheritp() *QNetworkAccessManager

Constructs a QNetworkAccessManager object that is the center of the Network Access API and sets parent as the parent object.

func (*QNetworkAccessManager) NewFromPointer

func (*QNetworkAccessManager) OperationItemName

func (this *QNetworkAccessManager) OperationItemName(val int) string

func (*QNetworkAccessManager) Post

Sends an HTTP POST request to the destination specified by request and returns a new QNetworkReply object opened for reading that will contain the reply sent by the server. The contents of the data device will be uploaded to the server.

data must be open for reading and must remain valid until the finished() signal is emitted for this reply.

Note: Sending a POST request on protocols other than HTTP and HTTPS is undefined and will probably fail.

See also get(), put(), deleteResource(), and sendCustomRequest().

func (*QNetworkAccessManager) Post1

Sends an HTTP POST request to the destination specified by request and returns a new QNetworkReply object opened for reading that will contain the reply sent by the server. The contents of the data device will be uploaded to the server.

data must be open for reading and must remain valid until the finished() signal is emitted for this reply.

Note: Sending a POST request on protocols other than HTTP and HTTPS is undefined and will probably fail.

See also get(), put(), deleteResource(), and sendCustomRequest().

func (*QNetworkAccessManager) Post2

Sends an HTTP POST request to the destination specified by request and returns a new QNetworkReply object opened for reading that will contain the reply sent by the server. The contents of the data device will be uploaded to the server.

data must be open for reading and must remain valid until the finished() signal is emitted for this reply.

Note: Sending a POST request on protocols other than HTTP and HTTPS is undefined and will probably fail.

See also get(), put(), deleteResource(), and sendCustomRequest().

func (*QNetworkAccessManager) PreSharedKeyAuthenticationRequired

func (this *QNetworkAccessManager) PreSharedKeyAuthenticationRequired(reply QNetworkReply_ITF, authenticator QSslPreSharedKeyAuthenticator_ITF)

This signal is emitted if the SSL/TLS handshake negotiates a PSK ciphersuite, and therefore a PSK authentication is then required. The reply object is the QNetworkReply that is negotiating such ciphersuites.

When using PSK, the client must send to the server a valid identity and a valid pre shared key, in order for the SSL handshake to continue. Applications can provide this information in a slot connected to this signal, by filling in the passed authenticator object according to their needs.

Note: Ignoring this signal, or failing to provide the required credentials, will cause the handshake to fail, and therefore the connection to be aborted.

Note: The authenticator object is owned by the reply and must not be deleted by the application.

This function was introduced in Qt 5.5.

See also QSslPreSharedKeyAuthenticator.

func (*QNetworkAccessManager) Proxy

func (this *QNetworkAccessManager) Proxy() *QNetworkProxy

Returns the QNetworkProxy that the requests sent using this QNetworkAccessManager object will use. The default value for the proxy is QNetworkProxy::DefaultProxy.

See also setProxy(), setProxyFactory(), and proxyAuthenticationRequired().

func (*QNetworkAccessManager) ProxyAuthenticationRequired

func (this *QNetworkAccessManager) ProxyAuthenticationRequired(proxy QNetworkProxy_ITF, authenticator QAuthenticator_ITF)

This signal is emitted whenever a proxy requests authentication and QNetworkAccessManager cannot find a valid, cached credential. The slot connected to this signal should fill in the credentials for the proxy proxy in the authenticator object.

QNetworkAccessManager will cache the credentials internally. The next time the proxy requests authentication, QNetworkAccessManager will automatically send the same credential without emitting the proxyAuthenticationRequired signal again.

If the proxy rejects the credentials, QNetworkAccessManager will emit the signal again.

See also proxy(), setProxy(), and authenticationRequired().

func (*QNetworkAccessManager) ProxyFactory

func (this *QNetworkAccessManager) ProxyFactory() *QNetworkProxyFactory

Returns the proxy factory that this QNetworkAccessManager object is using to determine the proxies to be used for requests.

Note that the pointer returned by this function is managed by QNetworkAccessManager and could be deleted at any time.

This function was introduced in Qt 4.5.

See also setProxyFactory() and proxy().

func (*QNetworkAccessManager) Put

Uploads the contents of data to the destination request and returns a new QNetworkReply object that will be open for reply.

data must be opened for reading when this function is called and must remain valid until the finished() signal is emitted for this reply.

Whether anything will be available for reading from the returned object is protocol dependent. For HTTP, the server may send a small HTML page indicating the upload was successful (or not). Other protocols will probably have content in their replies.

Note: For HTTP, this request will send a PUT request, which most servers do not allow. Form upload mechanisms, including that of uploading files through HTML forms, use the POST mechanism.

See also get(), post(), deleteResource(), and sendCustomRequest().

func (*QNetworkAccessManager) Put1

Uploads the contents of data to the destination request and returns a new QNetworkReply object that will be open for reply.

data must be opened for reading when this function is called and must remain valid until the finished() signal is emitted for this reply.

Whether anything will be available for reading from the returned object is protocol dependent. For HTTP, the server may send a small HTML page indicating the upload was successful (or not). Other protocols will probably have content in their replies.

Note: For HTTP, this request will send a PUT request, which most servers do not allow. Form upload mechanisms, including that of uploading files through HTML forms, use the POST mechanism.

See also get(), post(), deleteResource(), and sendCustomRequest().

func (*QNetworkAccessManager) Put2

Uploads the contents of data to the destination request and returns a new QNetworkReply object that will be open for reply.

data must be opened for reading when this function is called and must remain valid until the finished() signal is emitted for this reply.

Whether anything will be available for reading from the returned object is protocol dependent. For HTTP, the server may send a small HTML page indicating the upload was successful (or not). Other protocols will probably have content in their replies.

Note: For HTTP, this request will send a PUT request, which most servers do not allow. Form upload mechanisms, including that of uploading files through HTML forms, use the POST mechanism.

See also get(), post(), deleteResource(), and sendCustomRequest().

func (*QNetworkAccessManager) QNetworkAccessManager_PTR

func (ptr *QNetworkAccessManager) QNetworkAccessManager_PTR() *QNetworkAccessManager

func (*QNetworkAccessManager) RedirectPolicy

func (this *QNetworkAccessManager) RedirectPolicy() int

Returns the redirect policy that is used when creating new requests.

This function was introduced in Qt 5.9.

See also setRedirectPolicy() and QNetworkRequest::RedirectPolicy.

func (*QNetworkAccessManager) SendCustomRequest

Sends a custom request to the server identified by the URL of request.

It is the user's responsibility to send a verb to the server that is valid according to the HTTP specification.

This method provides means to send verbs other than the common ones provided via get() or post() etc., for instance sending an HTTP OPTIONS command.

If data is not empty, the contents of the data device will be uploaded to the server; in that case, data must be open for reading and must remain valid until the finished() signal is emitted for this reply.

Note: This feature is currently available for HTTP(S) only.

This function was introduced in Qt 4.7.

See also get(), post(), put(), and deleteResource().

func (*QNetworkAccessManager) SendCustomRequest1

func (this *QNetworkAccessManager) SendCustomRequest1(request QNetworkRequest_ITF, verb qtcore.QByteArray_ITF, data qtcore.QByteArray_ITF) *QNetworkReply

Sends a custom request to the server identified by the URL of request.

It is the user's responsibility to send a verb to the server that is valid according to the HTTP specification.

This method provides means to send verbs other than the common ones provided via get() or post() etc., for instance sending an HTTP OPTIONS command.

If data is not empty, the contents of the data device will be uploaded to the server; in that case, data must be open for reading and must remain valid until the finished() signal is emitted for this reply.

Note: This feature is currently available for HTTP(S) only.

This function was introduced in Qt 4.7.

See also get(), post(), put(), and deleteResource().

func (*QNetworkAccessManager) SendCustomRequest2

func (this *QNetworkAccessManager) SendCustomRequest2(request QNetworkRequest_ITF, verb qtcore.QByteArray_ITF, multiPart QHttpMultiPart_ITF) *QNetworkReply

Sends a custom request to the server identified by the URL of request.

It is the user's responsibility to send a verb to the server that is valid according to the HTTP specification.

This method provides means to send verbs other than the common ones provided via get() or post() etc., for instance sending an HTTP OPTIONS command.

If data is not empty, the contents of the data device will be uploaded to the server; in that case, data must be open for reading and must remain valid until the finished() signal is emitted for this reply.

Note: This feature is currently available for HTTP(S) only.

This function was introduced in Qt 4.7.

See also get(), post(), put(), and deleteResource().

func (*QNetworkAccessManager) SendCustomRequestp

func (this *QNetworkAccessManager) SendCustomRequestp(request QNetworkRequest_ITF, verb qtcore.QByteArray_ITF) *QNetworkReply

Sends a custom request to the server identified by the URL of request.

It is the user's responsibility to send a verb to the server that is valid according to the HTTP specification.

This method provides means to send verbs other than the common ones provided via get() or post() etc., for instance sending an HTTP OPTIONS command.

If data is not empty, the contents of the data device will be uploaded to the server; in that case, data must be open for reading and must remain valid until the finished() signal is emitted for this reply.

Note: This feature is currently available for HTTP(S) only.

This function was introduced in Qt 4.7.

See also get(), post(), put(), and deleteResource().

func (*QNetworkAccessManager) SetCache

func (this *QNetworkAccessManager) SetCache(cache QAbstractNetworkCache_ITF)

Sets the manager's network cache to be the cache specified. The cache is used for all requests dispatched by the manager.

Use this function to set the network cache object to a class that implements additional features, like saving the cookies to permanent storage.

Note: QNetworkAccessManager takes ownership of the cache object.

QNetworkAccessManager by default does not have a set cache. Qt provides a simple disk cache, QNetworkDiskCache, which can be used.

This function was introduced in Qt 4.5.

See also cache() and QNetworkRequest::CacheLoadControl.

func (*QNetworkAccessManager) SetConfiguration

func (this *QNetworkAccessManager) SetConfiguration(config QNetworkConfiguration_ITF)

Sets the network configuration that will be used when creating the network session to config.

The network configuration is used to create and open a network session before any request that requires network access is process. If no network configuration is explicitly set via this function the network configuration returned by QNetworkConfigurationManager::defaultConfiguration() will be used.

To restore the default network configuration set the network configuration to the value returned from QNetworkConfigurationManager::defaultConfiguration().

Setting a network configuration means that the QNetworkAccessManager instance will only be using the specified one. In particular, if the default network configuration changes (upon e.g. Wifi being available), this new configuration needs to be enabled manually if desired.

QNetworkConfigurationManager manager;
networkAccessManager->setConfiguration(manager.defaultConfiguration());

If an invalid network configuration is set, a network session will not be created. In this case network requests will be processed regardless, but may fail. For example:

networkAccessManager->setConfiguration(QNetworkConfiguration());

This function was introduced in Qt 4.7.

See also configuration() and QNetworkSession.

func (*QNetworkAccessManager) SetCookieJar

func (this *QNetworkAccessManager) SetCookieJar(cookieJar QNetworkCookieJar_ITF)

Sets the manager's cookie jar to be the cookieJar specified. The cookie jar is used by all requests dispatched by the manager.

Use this function to set the cookie jar object to a class that implements additional features, like saving the cookies to permanent storage.

Note: QNetworkAccessManager takes ownership of the cookieJar object.

If cookieJar is in the same thread as this QNetworkAccessManager, it will set the parent of the cookieJar so that the cookie jar is deleted when this object is deleted as well. If you want to share cookie jars between different QNetworkAccessManager objects, you may want to set the cookie jar's parent to 0 after calling this function.

QNetworkAccessManager by default does not implement any cookie policy of its own: it accepts all cookies sent by the server, as long as they are well formed and meet the minimum security requirements (cookie domain matches the request's and cookie path matches the request's). In order to implement your own security policy, override the QNetworkCookieJar::cookiesForUrl() and QNetworkCookieJar::setCookiesFromUrl() virtual functions. Those functions are called by QNetworkAccessManager when it detects a new cookie.

See also cookieJar(), QNetworkCookieJar::cookiesForUrl(), and QNetworkCookieJar::setCookiesFromUrl().

func (*QNetworkAccessManager) SetCthis

func (this *QNetworkAccessManager) SetCthis(cthis unsafe.Pointer)

func (*QNetworkAccessManager) SetNetworkAccessible

func (this *QNetworkAccessManager) SetNetworkAccessible(accessible int)

Overrides the reported network accessibility. If accessible is NotAccessible the reported network accessiblity will always be NotAccessible. Otherwise the reported network accessibility will reflect the actual device state.

This function was introduced in Qt 4.7.

Note: Setter function for property networkAccessible.

See also networkAccessible().

func (*QNetworkAccessManager) SetProxy

func (this *QNetworkAccessManager) SetProxy(proxy QNetworkProxy_ITF)

Sets the proxy to be used in future requests to be proxy. This does not affect requests that have already been sent. The proxyAuthenticationRequired() signal will be emitted if the proxy requests authentication.

A proxy set with this function will be used for all requests issued by QNetworkAccessManager. In some cases, it might be necessary to select different proxies depending on the type of request being sent or the destination host. If that's the case, you should consider using setProxyFactory().

See also proxy() and proxyAuthenticationRequired().

func (*QNetworkAccessManager) SetProxyFactory

func (this *QNetworkAccessManager) SetProxyFactory(factory QNetworkProxyFactory_ITF)

Sets the proxy factory for this class to be factory. A proxy factory is used to determine a more specific list of proxies to be used for a given request, instead of trying to use the same proxy value for all requests.

All queries sent by QNetworkAccessManager will have type QNetworkProxyQuery::UrlRequest.

For example, a proxy factory could apply the following rules:

if the target address is in the local network (for example, if the hostname contains no dots or if it's an IP address in the organization's range), return QNetworkProxy::NoProxy if the request is FTP, return an FTP proxy if the request is HTTP or HTTPS, then return an HTTP proxy otherwise, return a SOCKSv5 proxy server

The lifetime of the object factory will be managed by QNetworkAccessManager. It will delete the object when necessary.

Note: If a specific proxy is set with setProxy(), the factory will not be used.

This function was introduced in Qt 4.5.

See also proxyFactory(), setProxy(), and QNetworkProxyQuery.

func (*QNetworkAccessManager) SetRedirectPolicy

func (this *QNetworkAccessManager) SetRedirectPolicy(policy int)

Sets the manager's redirect policy to be the policy specified. This policy will affect all subsequent requests created by the manager.

Use this function to enable or disable HTTP redirects on the manager's level.

Note: When creating a request QNetworkRequest::RedirectAttributePolicy has the highest priority, next by priority is QNetworkRequest::FollowRedirectsAttribute. Finally, the manager's policy has the lowest priority.

For backwards compatibility the default value is QNetworkRequest::ManualRedirectPolicy. This may change in the future and some type of auto-redirect policy will become the default; clients relying on manual redirect handling are encouraged to set this policy explicitly in their code.

This function was introduced in Qt 5.9.

See also redirectPolicy(), QNetworkRequest::RedirectPolicy, and QNetworkRequest::FollowRedirectsAttribute.

func (*QNetworkAccessManager) SetStrictTransportSecurityEnabled

func (this *QNetworkAccessManager) SetStrictTransportSecurityEnabled(enabled bool)

If enabled is true, QNetworkAccessManager follows the HTTP Strict Transport Security policy (HSTS, RFC6797). When processing a request, QNetworkAccessManager automatically replaces the "http" scheme with "https" and uses a secure transport for HSTS hosts. If it's set explicitly, port 80 is replaced by port 443.

When HSTS is enabled, for each HTTP response containing HSTS header and received over a secure transport, QNetworkAccessManager will update its HSTS cache, either remembering a host with a valid policy or removing a host with an expired or disabled HSTS policy.

This function was introduced in Qt 5.9.

See also isStrictTransportSecurityEnabled().

func (*QNetworkAccessManager) SupportedSchemes

func (this *QNetworkAccessManager) SupportedSchemes() *qtcore.QStringList

Lists all the URL schemes supported by the access manager.

This function was introduced in Qt 5.2.

See also supportedSchemesImplementation().

func (*QNetworkAccessManager) SupportedSchemesImplementation

func (this *QNetworkAccessManager) SupportedSchemesImplementation() *qtcore.QStringList

Lists all the URL schemes supported by the access manager.

You should not call this function directly; use QNetworkAccessManager::supportedSchemes() instead.

Reimplement this slot to provide your own supported schemes in a QNetworkAccessManager subclass. It is for instance necessary when your subclass provides support for new protocols.

Because of binary compatibility constraints, the supportedSchemes() method (introduced in Qt 5.2) is not virtual. Instead, supportedSchemes() will dynamically detect and call this slot.

This function was introduced in Qt 5.2.

See also supportedSchemes().

type QNetworkAccessManager_ITF

type QNetworkAccessManager_ITF interface {
	qtcore.QObject_ITF
	QNetworkAccessManager_PTR() *QNetworkAccessManager
}

type QNetworkAccessManager__NetworkAccessibility

type QNetworkAccessManager__NetworkAccessibility = int

Indicates whether the network is accessible via this network access manager.

See also networkAccessible.

const QNetworkAccessManager__Accessible QNetworkAccessManager__NetworkAccessibility = 1

The network is accessible.

const QNetworkAccessManager__NotAccessible QNetworkAccessManager__NetworkAccessibility = 0

The network is not currently accessible, either because there is currently no network coverage or network access has been explicitly disabled by a call to setNetworkAccessible().

const QNetworkAccessManager__UnknownAccessibility QNetworkAccessManager__NetworkAccessibility = -1

type QNetworkAccessManager__Operation

type QNetworkAccessManager__Operation = int

Indicates the operation this reply is processing.

This enum was introduced or modified in Qt 4.7.

See also QNetworkReply::operation().

const QNetworkAccessManager__CustomOperation QNetworkAccessManager__Operation = 6

custom operation (created with sendCustomRequest())

const QNetworkAccessManager__DeleteOperation QNetworkAccessManager__Operation = 5

delete contents operation (created with deleteResource())

const QNetworkAccessManager__GetOperation QNetworkAccessManager__Operation = 2

retrieve headers and download contents (created with get())

const QNetworkAccessManager__HeadOperation QNetworkAccessManager__Operation = 1

retrieve headers operation (created with head())

const QNetworkAccessManager__PostOperation QNetworkAccessManager__Operation = 4

send the contents of an HTML form for processing via HTTP POST (created with post())

const QNetworkAccessManager__PutOperation QNetworkAccessManager__Operation = 3

upload contents operation (created with put())

const QNetworkAccessManager__UnknownOperation QNetworkAccessManager__Operation = 0

type QNetworkAddressEntry

type QNetworkAddressEntry struct {
	*qtrt.CObject
}

func NewQNetworkAddressEntry

func NewQNetworkAddressEntry() *QNetworkAddressEntry

func NewQNetworkAddressEntryFromPointer

func NewQNetworkAddressEntryFromPointer(cthis unsafe.Pointer) *QNetworkAddressEntry

func (*QNetworkAddressEntry) Broadcast

func (this *QNetworkAddressEntry) Broadcast() *QHostAddress

func (*QNetworkAddressEntry) ClearAddressLifetime

func (this *QNetworkAddressEntry) ClearAddressLifetime()

func (*QNetworkAddressEntry) DnsEligibility

func (this *QNetworkAddressEntry) DnsEligibility() int

func (*QNetworkAddressEntry) DnsEligibilityStatusItemName

func (this *QNetworkAddressEntry) DnsEligibilityStatusItemName(val int) string

func (*QNetworkAddressEntry) GetCthis

func (this *QNetworkAddressEntry) GetCthis() unsafe.Pointer

func (*QNetworkAddressEntry) Ip

func (this *QNetworkAddressEntry) Ip() *QHostAddress

func (*QNetworkAddressEntry) IsLifetimeKnown

func (this *QNetworkAddressEntry) IsLifetimeKnown() bool

func (*QNetworkAddressEntry) IsPermanent

func (this *QNetworkAddressEntry) IsPermanent() bool

func (*QNetworkAddressEntry) IsTemporary

func (this *QNetworkAddressEntry) IsTemporary() bool

func (*QNetworkAddressEntry) Netmask

func (this *QNetworkAddressEntry) Netmask() *QHostAddress

func (*QNetworkAddressEntry) NewForInherit

func (*QNetworkAddressEntry) NewForInherit() *QNetworkAddressEntry

func (*QNetworkAddressEntry) NewFromPointer

func (*QNetworkAddressEntry) NewFromPointer(cthis unsafe.Pointer) *QNetworkAddressEntry

func (*QNetworkAddressEntry) Operator_equal

func (this *QNetworkAddressEntry) Operator_equal(other unsafe.Pointer) *QNetworkAddressEntry

func (*QNetworkAddressEntry) Operator_equal1

func (*QNetworkAddressEntry) Operator_equal_equal

func (this *QNetworkAddressEntry) Operator_equal_equal(other QNetworkAddressEntry_ITF) bool

func (*QNetworkAddressEntry) Operator_not_equal

func (this *QNetworkAddressEntry) Operator_not_equal(other QNetworkAddressEntry_ITF) bool

func (*QNetworkAddressEntry) PreferredLifetime

func (this *QNetworkAddressEntry) PreferredLifetime() *qtcore.QDeadlineTimer

func (*QNetworkAddressEntry) PrefixLength

func (this *QNetworkAddressEntry) PrefixLength() int

func (*QNetworkAddressEntry) QNetworkAddressEntry_PTR

func (ptr *QNetworkAddressEntry) QNetworkAddressEntry_PTR() *QNetworkAddressEntry

func (*QNetworkAddressEntry) SetAddressLifetime

func (this *QNetworkAddressEntry) SetAddressLifetime(preferred qtcore.QDeadlineTimer_ITF, validity qtcore.QDeadlineTimer_ITF)

func (*QNetworkAddressEntry) SetBroadcast

func (this *QNetworkAddressEntry) SetBroadcast(newBroadcast QHostAddress_ITF)

func (*QNetworkAddressEntry) SetCthis

func (this *QNetworkAddressEntry) SetCthis(cthis unsafe.Pointer)

func (*QNetworkAddressEntry) SetDnsEligibility

func (this *QNetworkAddressEntry) SetDnsEligibility(status int)

func (*QNetworkAddressEntry) SetIp

func (this *QNetworkAddressEntry) SetIp(newIp QHostAddress_ITF)

func (*QNetworkAddressEntry) SetNetmask

func (this *QNetworkAddressEntry) SetNetmask(newNetmask QHostAddress_ITF)

func (*QNetworkAddressEntry) SetPrefixLength

func (this *QNetworkAddressEntry) SetPrefixLength(length int)

func (*QNetworkAddressEntry) Swap

Swaps this network interface instance with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

func (*QNetworkAddressEntry) ValidityLifetime

func (this *QNetworkAddressEntry) ValidityLifetime() *qtcore.QDeadlineTimer

type QNetworkAddressEntry_ITF

type QNetworkAddressEntry_ITF interface {
	QNetworkAddressEntry_PTR() *QNetworkAddressEntry
}

type QNetworkAddressEntry__DnsEligibilityStatus

type QNetworkAddressEntry__DnsEligibilityStatus = int
const QNetworkAddressEntry__DnsEligibilityUnknown QNetworkAddressEntry__DnsEligibilityStatus = -1
const QNetworkAddressEntry__DnsEligible QNetworkAddressEntry__DnsEligibilityStatus = 1
const QNetworkAddressEntry__DnsIneligible QNetworkAddressEntry__DnsEligibilityStatus = 0

type QNetworkCacheMetaData

type QNetworkCacheMetaData struct {
	*qtrt.CObject
}

func NewQNetworkCacheMetaData

func NewQNetworkCacheMetaData() *QNetworkCacheMetaData

func NewQNetworkCacheMetaDataFromPointer

func NewQNetworkCacheMetaDataFromPointer(cthis unsafe.Pointer) *QNetworkCacheMetaData

func (*QNetworkCacheMetaData) ExpirationDate

func (this *QNetworkCacheMetaData) ExpirationDate() *qtcore.QDateTime

func (*QNetworkCacheMetaData) GetCthis

func (this *QNetworkCacheMetaData) GetCthis() unsafe.Pointer

func (*QNetworkCacheMetaData) IsValid

func (this *QNetworkCacheMetaData) IsValid() bool

func (*QNetworkCacheMetaData) LastModified

func (this *QNetworkCacheMetaData) LastModified() *qtcore.QDateTime

func (*QNetworkCacheMetaData) NewForInherit

func (*QNetworkCacheMetaData) NewForInherit() *QNetworkCacheMetaData

func (*QNetworkCacheMetaData) NewFromPointer

func (*QNetworkCacheMetaData) Operator_equal

func (this *QNetworkCacheMetaData) Operator_equal(other unsafe.Pointer) *QNetworkCacheMetaData

func (*QNetworkCacheMetaData) Operator_equal1

func (*QNetworkCacheMetaData) Operator_equal_equal

func (this *QNetworkCacheMetaData) Operator_equal_equal(other QNetworkCacheMetaData_ITF) bool

func (*QNetworkCacheMetaData) Operator_not_equal

func (this *QNetworkCacheMetaData) Operator_not_equal(other QNetworkCacheMetaData_ITF) bool

func (*QNetworkCacheMetaData) QNetworkCacheMetaData_PTR

func (ptr *QNetworkCacheMetaData) QNetworkCacheMetaData_PTR() *QNetworkCacheMetaData

func (*QNetworkCacheMetaData) SaveToDisk

func (this *QNetworkCacheMetaData) SaveToDisk() bool

func (*QNetworkCacheMetaData) SetCthis

func (this *QNetworkCacheMetaData) SetCthis(cthis unsafe.Pointer)

func (*QNetworkCacheMetaData) SetExpirationDate

func (this *QNetworkCacheMetaData) SetExpirationDate(dateTime qtcore.QDateTime_ITF)

func (*QNetworkCacheMetaData) SetLastModified

func (this *QNetworkCacheMetaData) SetLastModified(dateTime qtcore.QDateTime_ITF)

func (*QNetworkCacheMetaData) SetSaveToDisk

func (this *QNetworkCacheMetaData) SetSaveToDisk(allow bool)

func (*QNetworkCacheMetaData) SetUrl

func (this *QNetworkCacheMetaData) SetUrl(url qtcore.QUrl_ITF)

func (*QNetworkCacheMetaData) Swap

func (*QNetworkCacheMetaData) Url

func (this *QNetworkCacheMetaData) Url() *qtcore.QUrl

type QNetworkCacheMetaData_ITF

type QNetworkCacheMetaData_ITF interface {
	QNetworkCacheMetaData_PTR() *QNetworkCacheMetaData
}

type QNetworkConfiguration

type QNetworkConfiguration struct {
	*qtrt.CObject
}

func NewQNetworkConfiguration

func NewQNetworkConfiguration() *QNetworkConfiguration

func NewQNetworkConfigurationFromPointer

func NewQNetworkConfigurationFromPointer(cthis unsafe.Pointer) *QNetworkConfiguration

func (*QNetworkConfiguration) BearerType

func (this *QNetworkConfiguration) BearerType() int

Returns the type of bearer used by this network configuration.

If the bearer type is unknown the bearerTypeName() function can be used to retrieve a textural type name for the bearer.

An invalid network configuration always returns the BearerUnknown value.

See also bearerTypeName() and bearerTypeFamily().

func (*QNetworkConfiguration) BearerTypeFamily

func (this *QNetworkConfiguration) BearerTypeFamily() int

Returns the bearer type family used by this network configuration. The following table lists how bearerType() values map to bearerTypeFamily() values:

bearer typebearer type family

BearerUnknown, Bearer2G, BearerEthernet, BearerWLAN, BearerBluetooth(same type) BearerCDMA2000, BearerEVDO, BearerWCDMA, BearerHSPA, Bearer3GBearer3G BearerWiMAX, BearerLTE, Bearer4GBearer4G

An invalid network configuration always returns the BearerUnknown value.

This function was introduced in Qt 5.2.

See also bearerType() and bearerTypeName().

func (*QNetworkConfiguration) BearerTypeItemName

func (this *QNetworkConfiguration) BearerTypeItemName(val int) string

func (*QNetworkConfiguration) BearerTypeName

func (this *QNetworkConfiguration) BearerTypeName() string

Returns the type of bearer used by this network configuration as a string.

The string is not translated and therefore can not be shown to the user. The subsequent table shows the fixed mappings between BearerType and the bearer type name for known types. If the BearerType is unknown this function may return additional information if it is available; otherwise an empty string will be returned.

BearerTypeValue

BearerUnknownThe session is based on an unknown or unspecified bearer type. The value of the string returned describes the bearer type. BearerEthernetEthernet BearerWLANWLAN Bearer2G2G Bearer3G3G Bearer4G4G BearerCDMA2000CDMA2000 BearerWCDMAWCDMA BearerHSPAHSPA BearerBluetoothBluetooth BearerWiMAXWiMAX BearerEVDOEVDO BearerLTELTE

This function returns an empty string if this is an invalid configuration, a network configuration of type QNetworkConfiguration::ServiceNetwork or QNetworkConfiguration::UserChoice.

See also bearerType() and bearerTypeFamily().

func (*QNetworkConfiguration) ConnectTimeout

func (this *QNetworkConfiguration) ConnectTimeout() int

Returns the connect timeout of this configuration.

This function was introduced in Qt 5.9.

See also setConnectTimeout.

func (*QNetworkConfiguration) GetCthis

func (this *QNetworkConfiguration) GetCthis() unsafe.Pointer

func (*QNetworkConfiguration) Identifier

func (this *QNetworkConfiguration) Identifier() string

Returns the unique and platform specific identifier for this network configuration; otherwise an empty string.

func (*QNetworkConfiguration) IsRoamingAvailable

func (this *QNetworkConfiguration) IsRoamingAvailable() bool

Returns true if this configuration supports roaming; otherwise false.

func (*QNetworkConfiguration) IsValid

func (this *QNetworkConfiguration) IsValid() bool

Returns true if this QNetworkConfiguration object is valid. A configuration may become invalid if the user deletes the configuration or the configuration was default-constructed.

The addition and removal of configurations can be monitored via the QNetworkConfigurationManager.

See also QNetworkConfigurationManager.

func (*QNetworkConfiguration) Name

func (this *QNetworkConfiguration) Name() string

Returns the user visible name of this configuration.

The name may either be the name of the underlying access point or the name for service network that this configuration represents.

func (*QNetworkConfiguration) NewForInherit

func (*QNetworkConfiguration) NewForInherit() *QNetworkConfiguration

Constructs an invalid configuration object.

See also isValid().

func (*QNetworkConfiguration) NewFromPointer

func (*QNetworkConfiguration) Operator_equal

func (this *QNetworkConfiguration) Operator_equal(other unsafe.Pointer) *QNetworkConfiguration

func (*QNetworkConfiguration) Operator_equal1

func (*QNetworkConfiguration) Operator_equal_equal

func (this *QNetworkConfiguration) Operator_equal_equal(other QNetworkConfiguration_ITF) bool

func (*QNetworkConfiguration) Operator_not_equal

func (this *QNetworkConfiguration) Operator_not_equal(other QNetworkConfiguration_ITF) bool

func (*QNetworkConfiguration) Purpose

func (this *QNetworkConfiguration) Purpose() int

Returns the purpose of this configuration.

The purpose field may be used to programmatically determine the purpose of a configuration. Such information is usually part of the access point or service network meta data.

func (*QNetworkConfiguration) PurposeItemName

func (this *QNetworkConfiguration) PurposeItemName(val int) string

func (*QNetworkConfiguration) QNetworkConfiguration_PTR

func (ptr *QNetworkConfiguration) QNetworkConfiguration_PTR() *QNetworkConfiguration

func (*QNetworkConfiguration) SetConnectTimeout

func (this *QNetworkConfiguration) SetConnectTimeout(timeout int) bool

Sets the connect timeout of this configuration to timeout. This allows control of the timeout used by QAbstractSocket to establish a connection.

Note: timeout is in millisecond.

Warning: This will have no effect if the bearer plugin doesn't have the CanStartAndStopInterfaces capability.

Returns true if succeeded.

This function was introduced in Qt 5.9.

See also connectTimeout.

func (*QNetworkConfiguration) SetCthis

func (this *QNetworkConfiguration) SetCthis(cthis unsafe.Pointer)

func (*QNetworkConfiguration) State

func (this *QNetworkConfiguration) State() int

Returns the current state of the configuration.

func (*QNetworkConfiguration) StateFlagItemName

func (this *QNetworkConfiguration) StateFlagItemName(val int) string

func (*QNetworkConfiguration) Swap

Swaps this network configuration with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

func (*QNetworkConfiguration) Type

func (this *QNetworkConfiguration) Type() int

Returns the type of the configuration.

A configuration can represent a single access point configuration or a set of access point configurations. Such a set is called service network. A configuration that is based on a service network can potentially support roaming of network sessions.

func (*QNetworkConfiguration) TypeItemName

func (this *QNetworkConfiguration) TypeItemName(val int) string

type QNetworkConfigurationList

type QNetworkConfigurationList struct {
	*qtrt.CObject
}

body block begin

func (*QNetworkConfigurationList) Append0

func (this *QNetworkConfigurationList) Append0()

void append(const T &)

func (*QNetworkConfigurationList) Append1

func (this *QNetworkConfigurationList) Append1()

void append(const QList<T> &)

func (*QNetworkConfigurationList) At0

const T & at(int)

func (*QNetworkConfigurationList) Back0

T & back()

func (*QNetworkConfigurationList) Back1

const T & back()

func (*QNetworkConfigurationList) Begin0

func (this *QNetworkConfigurationList) Begin0()

QList::iterator begin()

func (*QNetworkConfigurationList) Begin1

func (this *QNetworkConfigurationList) Begin1()

QList::const_iterator begin()

func (*QNetworkConfigurationList) Cbegin0

func (this *QNetworkConfigurationList) Cbegin0()

QList::const_iterator cbegin()

func (*QNetworkConfigurationList) Cend0

func (this *QNetworkConfigurationList) Cend0()

QList::const_iterator cend()

func (*QNetworkConfigurationList) Clear0

func (this *QNetworkConfigurationList) Clear0()

void clear()

func (*QNetworkConfigurationList) ConstBegin0

func (this *QNetworkConfigurationList) ConstBegin0()

QList::const_iterator constBegin()

func (*QNetworkConfigurationList) ConstEnd0

func (this *QNetworkConfigurationList) ConstEnd0()

QList::const_iterator constEnd()

func (*QNetworkConfigurationList) ConstFirst0

func (this *QNetworkConfigurationList) ConstFirst0() *QNetworkConfiguration

const T & constFirst()

func (*QNetworkConfigurationList) ConstLast0

const T & constLast()

func (*QNetworkConfigurationList) Contains0

func (this *QNetworkConfigurationList) Contains0() bool

bool contains(const T &)

func (*QNetworkConfigurationList) Contains_impl0

func (this *QNetworkConfigurationList) Contains_impl0() bool

bool contains_impl(const T &, QListData::NotArrayCompatibleLayout)

func (*QNetworkConfigurationList) Contains_impl1

func (this *QNetworkConfigurationList) Contains_impl1() bool

bool contains_impl(const T &, QListData::ArrayCompatibleLayout)

func (*QNetworkConfigurationList) Count0

func (this *QNetworkConfigurationList) Count0() int

int count(const T &)

func (*QNetworkConfigurationList) Count1

func (this *QNetworkConfigurationList) Count1() int

int count()

func (*QNetworkConfigurationList) Count_impl0

func (this *QNetworkConfigurationList) Count_impl0() int

int count_impl(const T &, QListData::NotArrayCompatibleLayout)

func (*QNetworkConfigurationList) Count_impl1

func (this *QNetworkConfigurationList) Count_impl1() int

int count_impl(const T &, QListData::ArrayCompatibleLayout)

func (*QNetworkConfigurationList) Crbegin0

func (this *QNetworkConfigurationList) Crbegin0()

QList::const_reverse_iterator crbegin()

func (*QNetworkConfigurationList) Crend0

func (this *QNetworkConfigurationList) Crend0()

QList::const_reverse_iterator crend()

func (*QNetworkConfigurationList) Dealloc0

func (this *QNetworkConfigurationList) Dealloc0()

void dealloc(QListData::Data *)

func (*QNetworkConfigurationList) Detach0

func (this *QNetworkConfigurationList) Detach0()

void detach()

func (*QNetworkConfigurationList) DetachShared0

func (this *QNetworkConfigurationList) DetachShared0()

void detachShared()

func (*QNetworkConfigurationList) Detach_helper0

func (this *QNetworkConfigurationList) Detach_helper0()

void detach_helper(int)

func (*QNetworkConfigurationList) Detach_helper1

func (this *QNetworkConfigurationList) Detach_helper1()

void detach_helper()

func (*QNetworkConfigurationList) Detach_helper_grow0

func (this *QNetworkConfigurationList) Detach_helper_grow0()

QList::Node * detach_helper_grow(int, int)

func (*QNetworkConfigurationList) Empty0

func (this *QNetworkConfigurationList) Empty0() bool

bool empty()

func (*QNetworkConfigurationList) End0

func (this *QNetworkConfigurationList) End0()

QList::iterator end()

func (*QNetworkConfigurationList) End1

func (this *QNetworkConfigurationList) End1()

QList::const_iterator end()

func (*QNetworkConfigurationList) EndsWith0

func (this *QNetworkConfigurationList) EndsWith0() bool

bool endsWith(const T &)

func (*QNetworkConfigurationList) Erase0

func (this *QNetworkConfigurationList) Erase0()

QList::iterator erase(QList::iterator)

func (*QNetworkConfigurationList) Erase1

func (this *QNetworkConfigurationList) Erase1()

QList::iterator erase(QList::iterator, QList::iterator)

func (*QNetworkConfigurationList) First0

T & first()

func (*QNetworkConfigurationList) First1

const T & first()

func (*QNetworkConfigurationList) FromSet0

QList<T> fromSet(const QSet<T> &)

func (*QNetworkConfigurationList) FromStdList0

QList<T> fromStdList(const std::list<T> &)

func (*QNetworkConfigurationList) FromVector0

QList<T> fromVector(const QVector<T> &)

func (*QNetworkConfigurationList) Front0

T & front()

func (*QNetworkConfigurationList) Front1

const T & front()

func (*QNetworkConfigurationList) IndexOf0

func (this *QNetworkConfigurationList) IndexOf0() int

int indexOf(const T &, int)

func (*QNetworkConfigurationList) Insert0

func (this *QNetworkConfigurationList) Insert0()

void insert(int, const T &)

func (*QNetworkConfigurationList) Insert1

func (this *QNetworkConfigurationList) Insert1()

QList::iterator insert(QList::iterator, const T &)

func (*QNetworkConfigurationList) IsDetached0

func (this *QNetworkConfigurationList) IsDetached0() bool

bool isDetached()

func (*QNetworkConfigurationList) IsEmpty0

func (this *QNetworkConfigurationList) IsEmpty0() bool

bool isEmpty()

func (*QNetworkConfigurationList) IsSharedWith0

func (this *QNetworkConfigurationList) IsSharedWith0() bool

bool isSharedWith(const QList<T> &)

func (*QNetworkConfigurationList) IsValidIterator0

func (this *QNetworkConfigurationList) IsValidIterator0() bool

bool isValidIterator(const QList::iterator &)

func (*QNetworkConfigurationList) Last0

T & last()

func (*QNetworkConfigurationList) Last1

const T & last()

func (*QNetworkConfigurationList) LastIndexOf0

func (this *QNetworkConfigurationList) LastIndexOf0() int

int lastIndexOf(const T &, int)

func (*QNetworkConfigurationList) Length0

func (this *QNetworkConfigurationList) Length0() int

int length()

func (*QNetworkConfigurationList) Mid0

QList<T> mid(int, int)

func (*QNetworkConfigurationList) Move0

func (this *QNetworkConfigurationList) Move0()

void move(int, int)

func (*QNetworkConfigurationList) Node_construct0

func (this *QNetworkConfigurationList) Node_construct0()

void node_construct(QList::Node *, const T &)

func (*QNetworkConfigurationList) Node_copy0

func (this *QNetworkConfigurationList) Node_copy0()

void node_copy(QList::Node *, QList::Node *, QList::Node *)

func (*QNetworkConfigurationList) Node_destruct0

func (this *QNetworkConfigurationList) Node_destruct0()

void node_destruct(QList::Node *)

func (*QNetworkConfigurationList) Node_destruct1

func (this *QNetworkConfigurationList) Node_destruct1()

void node_destruct(QList::Node *, QList::Node *)

func (*QNetworkConfigurationList) Op_eq_impl0

func (this *QNetworkConfigurationList) Op_eq_impl0() bool

bool op_eq_impl(const QList<T> &, QListData::NotArrayCompatibleLayout)

func (*QNetworkConfigurationList) Op_eq_impl1

func (this *QNetworkConfigurationList) Op_eq_impl1() bool

bool op_eq_impl(const QList<T> &, QListData::ArrayCompatibleLayout)

func (*QNetworkConfigurationList) Operator_add0

QList<T> operator+(const QList<T> &)

func (*QNetworkConfigurationList) Operator_add_equal0

func (this *QNetworkConfigurationList) Operator_add_equal0() *QNetworkConfigurationList

QList<T> & operator+=(const QList<T> &)

func (*QNetworkConfigurationList) Operator_add_equal1

func (this *QNetworkConfigurationList) Operator_add_equal1() *QNetworkConfigurationList

QList<T> & operator+=(const T &)

func (*QNetworkConfigurationList) Operator_equal0

func (this *QNetworkConfigurationList) Operator_equal0() *QNetworkConfigurationList

QList<T> & operator=(const QList<T> &)

func (*QNetworkConfigurationList) Operator_equal1

func (this *QNetworkConfigurationList) Operator_equal1() *QNetworkConfigurationList

QList<T> & operator=(QList<T> &&)

func (*QNetworkConfigurationList) Operator_equal_equal0

func (this *QNetworkConfigurationList) Operator_equal_equal0() bool

bool operator==(const QList<T> &)

func (*QNetworkConfigurationList) Operator_get_index0

func (this *QNetworkConfigurationList) Operator_get_index0() *QNetworkConfiguration

const T & operator[](int)

func (*QNetworkConfigurationList) Operator_get_index1

func (this *QNetworkConfigurationList) Operator_get_index1() *QNetworkConfiguration

T & operator[](int)

func (*QNetworkConfigurationList) Operator_left_shift0

func (this *QNetworkConfigurationList) Operator_left_shift0() *QNetworkConfigurationList

QList<T> & operator<<(const T &)

func (*QNetworkConfigurationList) Operator_left_shift1

func (this *QNetworkConfigurationList) Operator_left_shift1() *QNetworkConfigurationList

QList<T> & operator<<(const QList<T> &)

func (*QNetworkConfigurationList) Operator_not_equal0

func (this *QNetworkConfigurationList) Operator_not_equal0() bool

bool operator!=(const QList<T> &)

func (*QNetworkConfigurationList) Pop_back0

func (this *QNetworkConfigurationList) Pop_back0()

void pop_back()

func (*QNetworkConfigurationList) Pop_front0

func (this *QNetworkConfigurationList) Pop_front0()

void pop_front()

func (*QNetworkConfigurationList) Prepend0

func (this *QNetworkConfigurationList) Prepend0()

void prepend(const T &)

func (*QNetworkConfigurationList) Push_back0

func (this *QNetworkConfigurationList) Push_back0()

void push_back(const T &)

func (*QNetworkConfigurationList) Push_front0

func (this *QNetworkConfigurationList) Push_front0()

void push_front(const T &)

func (*QNetworkConfigurationList) Rbegin0

func (this *QNetworkConfigurationList) Rbegin0()

QList::reverse_iterator rbegin()

func (*QNetworkConfigurationList) Rbegin1

func (this *QNetworkConfigurationList) Rbegin1()

QList::const_reverse_iterator rbegin()

func (*QNetworkConfigurationList) RemoveAll0

func (this *QNetworkConfigurationList) RemoveAll0() int

int removeAll(const T &)

func (*QNetworkConfigurationList) RemoveAt0

func (this *QNetworkConfigurationList) RemoveAt0()

void removeAt(int)

func (*QNetworkConfigurationList) RemoveFirst0

func (this *QNetworkConfigurationList) RemoveFirst0()

void removeFirst()

func (*QNetworkConfigurationList) RemoveLast0

func (this *QNetworkConfigurationList) RemoveLast0()

void removeLast()

func (*QNetworkConfigurationList) RemoveOne0

func (this *QNetworkConfigurationList) RemoveOne0() bool

bool removeOne(const T &)

func (*QNetworkConfigurationList) Rend0

func (this *QNetworkConfigurationList) Rend0()

QList::reverse_iterator rend()

func (*QNetworkConfigurationList) Rend1

func (this *QNetworkConfigurationList) Rend1()

QList::const_reverse_iterator rend()

func (*QNetworkConfigurationList) Replace0

func (this *QNetworkConfigurationList) Replace0()

void replace(int, const T &)

func (*QNetworkConfigurationList) Reserve0

func (this *QNetworkConfigurationList) Reserve0()

void reserve(int)

func (*QNetworkConfigurationList) SetSharable0

func (this *QNetworkConfigurationList) SetSharable0()

void setSharable(bool)

func (*QNetworkConfigurationList) Size0

func (this *QNetworkConfigurationList) Size0() int

int size()

func (*QNetworkConfigurationList) StartsWith0

func (this *QNetworkConfigurationList) StartsWith0() bool

bool startsWith(const T &)

func (*QNetworkConfigurationList) Swap0

func (this *QNetworkConfigurationList) Swap0()

void swap(QList<T> &)

func (*QNetworkConfigurationList) Swap1

func (this *QNetworkConfigurationList) Swap1()

void swap(int, int)

func (*QNetworkConfigurationList) TakeAt0

T takeAt(int)

func (*QNetworkConfigurationList) TakeFirst0

T takeFirst()

func (*QNetworkConfigurationList) TakeLast0

T takeLast()

func (*QNetworkConfigurationList) ToSet0

func (this *QNetworkConfigurationList) ToSet0()

QSet<T> toSet()

func (*QNetworkConfigurationList) ToStdList0

func (this *QNetworkConfigurationList) ToStdList0()

std::list<T> toStdList()

func (*QNetworkConfigurationList) ToVector0

func (this *QNetworkConfigurationList) ToVector0()

QVector<T> toVector()

func (*QNetworkConfigurationList) Value0

T value(int)

func (*QNetworkConfigurationList) Value1

T value(int, const T &)

type QNetworkConfigurationManager

type QNetworkConfigurationManager struct {
	*qtcore.QObject
}

func NewQNetworkConfigurationManager

func NewQNetworkConfigurationManager(parent qtcore.QObject_ITF) *QNetworkConfigurationManager

func NewQNetworkConfigurationManagerFromPointer

func NewQNetworkConfigurationManagerFromPointer(cthis unsafe.Pointer) *QNetworkConfigurationManager

func NewQNetworkConfigurationManagerp

func NewQNetworkConfigurationManagerp() *QNetworkConfigurationManager

func (*QNetworkConfigurationManager) Capabilities

func (this *QNetworkConfigurationManager) Capabilities() int

func (*QNetworkConfigurationManager) CapabilityItemName

func (this *QNetworkConfigurationManager) CapabilityItemName(val int) string

func (*QNetworkConfigurationManager) ConfigurationAdded

func (this *QNetworkConfigurationManager) ConfigurationAdded(config QNetworkConfiguration_ITF)

func (*QNetworkConfigurationManager) ConfigurationChanged

func (this *QNetworkConfigurationManager) ConfigurationChanged(config QNetworkConfiguration_ITF)

func (*QNetworkConfigurationManager) ConfigurationFromIdentifier

func (this *QNetworkConfigurationManager) ConfigurationFromIdentifier(identifier string) *QNetworkConfiguration

func (*QNetworkConfigurationManager) ConfigurationRemoved

func (this *QNetworkConfigurationManager) ConfigurationRemoved(config QNetworkConfiguration_ITF)

func (*QNetworkConfigurationManager) DefaultConfiguration

func (this *QNetworkConfigurationManager) DefaultConfiguration() *QNetworkConfiguration

func (*QNetworkConfigurationManager) GetCthis

func (this *QNetworkConfigurationManager) GetCthis() unsafe.Pointer

func (*QNetworkConfigurationManager) IsOnline

func (this *QNetworkConfigurationManager) IsOnline() bool

func (*QNetworkConfigurationManager) MetaObject

func (this *QNetworkConfigurationManager) MetaObject() *qtcore.QMetaObject

func (*QNetworkConfigurationManager) NewForInherit

func (*QNetworkConfigurationManager) NewForInheritp

func (*QNetworkConfigurationManager) NewFromPointer

func (*QNetworkConfigurationManager) OnlineStateChanged

func (this *QNetworkConfigurationManager) OnlineStateChanged(isOnline bool)

func (*QNetworkConfigurationManager) QNetworkConfigurationManager_PTR

func (ptr *QNetworkConfigurationManager) QNetworkConfigurationManager_PTR() *QNetworkConfigurationManager

func (*QNetworkConfigurationManager) SetCthis

func (this *QNetworkConfigurationManager) SetCthis(cthis unsafe.Pointer)

func (*QNetworkConfigurationManager) UpdateCompleted

func (this *QNetworkConfigurationManager) UpdateCompleted()

func (*QNetworkConfigurationManager) UpdateConfigurations

func (this *QNetworkConfigurationManager) UpdateConfigurations()

type QNetworkConfigurationManager_ITF

type QNetworkConfigurationManager_ITF interface {
	qtcore.QObject_ITF
	QNetworkConfigurationManager_PTR() *QNetworkConfigurationManager
}

type QNetworkConfigurationManager__Capability

type QNetworkConfigurationManager__Capability = int
const QNetworkConfigurationManager__ApplicationLevelRoaming QNetworkConfigurationManager__Capability = 8
const QNetworkConfigurationManager__CanStartAndStopInterfaces QNetworkConfigurationManager__Capability = 1
const QNetworkConfigurationManager__DataStatistics QNetworkConfigurationManager__Capability = 32
const QNetworkConfigurationManager__DirectConnectionRouting QNetworkConfigurationManager__Capability = 2
const QNetworkConfigurationManager__ForcedRoaming QNetworkConfigurationManager__Capability = 16
const QNetworkConfigurationManager__NetworkSessionRequired QNetworkConfigurationManager__Capability = 64
const QNetworkConfigurationManager__SystemSessionSupport QNetworkConfigurationManager__Capability = 4

type QNetworkConfiguration_ITF

type QNetworkConfiguration_ITF interface {
	QNetworkConfiguration_PTR() *QNetworkConfiguration
}

type QNetworkConfiguration__BearerType

type QNetworkConfiguration__BearerType = int

Specifies the type of bearer used by a configuration.

const QNetworkConfiguration__Bearer2G QNetworkConfiguration__BearerType = 3

The configuration is for a CSD, GPRS, HSCSD, EDGE or cdmaOne interface.

const QNetworkConfiguration__Bearer3G QNetworkConfiguration__BearerType = 11
const QNetworkConfiguration__Bearer4G QNetworkConfiguration__BearerType = 12
const QNetworkConfiguration__BearerBluetooth QNetworkConfiguration__BearerType = 7

The configuration is for a Bluetooth interface.

const QNetworkConfiguration__BearerCDMA2000 QNetworkConfiguration__BearerType = 4

The configuration is for CDMA interface.

const QNetworkConfiguration__BearerEVDO QNetworkConfiguration__BearerType = 9
const QNetworkConfiguration__BearerEthernet QNetworkConfiguration__BearerType = 1

The configuration is for an Ethernet interfaces.

const QNetworkConfiguration__BearerHSPA QNetworkConfiguration__BearerType = 6

The configuration is for High Speed Packet Access (HSPA) interface.

const QNetworkConfiguration__BearerLTE QNetworkConfiguration__BearerType = 10
const QNetworkConfiguration__BearerUnknown QNetworkConfiguration__BearerType = 0

The type of bearer is unknown or unspecified. The bearerTypeName() function may return additional information.

const QNetworkConfiguration__BearerWCDMA QNetworkConfiguration__BearerType = 5

The configuration is for W-CDMA/UMTS interface.

const QNetworkConfiguration__BearerWLAN QNetworkConfiguration__BearerType = 2

The configuration is for a Wireless LAN interface.

const QNetworkConfiguration__BearerWiMAX QNetworkConfiguration__BearerType = 8

The configuration is for a WiMAX interface.

type QNetworkConfiguration__Purpose

type QNetworkConfiguration__Purpose = int

Specifies the purpose of the configuration.

const QNetworkConfiguration__PrivatePurpose QNetworkConfiguration__Purpose = 2

The configuration is suitable to access a private network such as an office Intranet.

const QNetworkConfiguration__PublicPurpose QNetworkConfiguration__Purpose = 1

The configuration can be used for general purpose internet access.

const QNetworkConfiguration__ServiceSpecificPurpose QNetworkConfiguration__Purpose = 3

The configuration can be used for operator specific services (e.g. receiving MMS messages or content streaming).

const QNetworkConfiguration__UnknownPurpose QNetworkConfiguration__Purpose = 0

The configuration doesn't specify any purpose. This is the default value.

type QNetworkConfiguration__StateFlag

type QNetworkConfiguration__StateFlag = int
const QNetworkConfiguration__Active QNetworkConfiguration__StateFlag = 14
const QNetworkConfiguration__Defined QNetworkConfiguration__StateFlag = 2
const QNetworkConfiguration__Discovered QNetworkConfiguration__StateFlag = 6
const QNetworkConfiguration__Undefined QNetworkConfiguration__StateFlag = 1

type QNetworkConfiguration__Type

type QNetworkConfiguration__Type = int

This enum describes the type of configuration.

const QNetworkConfiguration__InternetAccessPoint QNetworkConfiguration__Type = 0

The configuration specifies the details for a single access point. Note that configurations of type InternetAccessPoint may be part of other QNetworkConfigurations of type ServiceNetwork.

const QNetworkConfiguration__Invalid QNetworkConfiguration__Type = 3

The configuration is invalid.

const QNetworkConfiguration__ServiceNetwork QNetworkConfiguration__Type = 1

The configuration is based on a group of QNetworkConfigurations of type InternetAccessPoint. All group members can reach the same target network. This type of configuration is a mandatory requirement for roaming enabled network sessions. On some platforms this form of configuration may also be called Service Network Access Point (SNAP).

const QNetworkConfiguration__UserChoice QNetworkConfiguration__Type = 2

The configuration is a placeholder which will be resolved to an actual configuration by the platform when a session is opened. Depending on the platform the selection may generate a popup dialog asking the user for his preferred choice.

type QNetworkCookie

type QNetworkCookie struct {
	*qtrt.CObject
}

func NewQNetworkCookie

func NewQNetworkCookie(name qtcore.QByteArray_ITF, value qtcore.QByteArray_ITF) *QNetworkCookie

func NewQNetworkCookieFromPointer

func NewQNetworkCookieFromPointer(cthis unsafe.Pointer) *QNetworkCookie

func NewQNetworkCookiep

func NewQNetworkCookiep() *QNetworkCookie

func NewQNetworkCookiep1

func NewQNetworkCookiep1(name qtcore.QByteArray_ITF) *QNetworkCookie

func (*QNetworkCookie) Domain

func (this *QNetworkCookie) Domain() string

Returns the domain this cookie is associated with. This corresponds to the "domain" field of the cookie string.

Note that the domain here may start with a dot, which is not a valid hostname. However, it means this cookie matches all hostnames ending with that domain name.

See also setDomain().

func (*QNetworkCookie) ExpirationDate

func (this *QNetworkCookie) ExpirationDate() *qtcore.QDateTime

Returns the expiration date for this cookie. If this cookie is a session cookie, the QDateTime returned will not be valid. If the date is in the past, this cookie has already expired and should not be sent again back to a remote server.

The expiration date corresponds to the parameters of the "expires" entry in the cookie string.

See also isSessionCookie() and setExpirationDate().

func (*QNetworkCookie) GetCthis

func (this *QNetworkCookie) GetCthis() unsafe.Pointer

func (*QNetworkCookie) HasSameIdentifier

func (this *QNetworkCookie) HasSameIdentifier(other QNetworkCookie_ITF) bool

Returns true if this cookie has the same identifier tuple as other. The identifier tuple is composed of the name, domain and path.

See also operator==().

func (*QNetworkCookie) IsHttpOnly

func (this *QNetworkCookie) IsHttpOnly() bool

Returns true if the "HttpOnly" flag is enabled for this cookie.

A cookie that is "HttpOnly" is only set and retrieved by the network requests and replies; i.e., the HTTP protocol. It is not accessible from scripts running on browsers.

This function was introduced in Qt 4.5.

See also isSecure().

func (*QNetworkCookie) IsSecure

func (this *QNetworkCookie) IsSecure() bool

Returns true if the "secure" option was specified in the cookie string, false otherwise.

Secure cookies may contain private information and should not be resent over unencrypted connections.

See also setSecure().

func (*QNetworkCookie) IsSessionCookie

func (this *QNetworkCookie) IsSessionCookie() bool

Returns true if this cookie is a session cookie. A session cookie is a cookie which has no expiration date, which means it should be discarded when the application's concept of session is over (usually, when the application exits).

See also expirationDate() and setExpirationDate().

func (*QNetworkCookie) Name

func (this *QNetworkCookie) Name() *qtcore.QByteArray

Returns the name of this cookie. The only mandatory field of a cookie is its name, without which it is not considered valid.

See also setName() and value().

func (*QNetworkCookie) NewForInherit

Create a new QNetworkCookie object, initializing the cookie name to name and its value to value.

A cookie is only valid if it has a name. However, the value is opaque to the application and being empty may have significance to the remote server.

func (*QNetworkCookie) NewForInheritp

func (*QNetworkCookie) NewForInheritp() *QNetworkCookie

Create a new QNetworkCookie object, initializing the cookie name to name and its value to value.

A cookie is only valid if it has a name. However, the value is opaque to the application and being empty may have significance to the remote server.

func (*QNetworkCookie) NewForInheritp1

func (*QNetworkCookie) NewForInheritp1(name qtcore.QByteArray_ITF) *QNetworkCookie

Create a new QNetworkCookie object, initializing the cookie name to name and its value to value.

A cookie is only valid if it has a name. However, the value is opaque to the application and being empty may have significance to the remote server.

func (*QNetworkCookie) NewFromPointer

func (*QNetworkCookie) NewFromPointer(cthis unsafe.Pointer) *QNetworkCookie

func (*QNetworkCookie) Normalize

func (this *QNetworkCookie) Normalize(url qtcore.QUrl_ITF)

This functions normalizes the path and domain of the cookie if they were previously empty. The url parameter is used to determine the correct domain and path.

This function was introduced in Qt 5.0.

func (*QNetworkCookie) Operator_equal

func (this *QNetworkCookie) Operator_equal(other unsafe.Pointer) *QNetworkCookie

func (*QNetworkCookie) Operator_equal1

func (this *QNetworkCookie) Operator_equal1(other QNetworkCookie_ITF) *QNetworkCookie

func (*QNetworkCookie) Operator_equal_equal

func (this *QNetworkCookie) Operator_equal_equal(other QNetworkCookie_ITF) bool

func (*QNetworkCookie) Operator_not_equal

func (this *QNetworkCookie) Operator_not_equal(other QNetworkCookie_ITF) bool

func (*QNetworkCookie) Path

func (this *QNetworkCookie) Path() string

Returns the path associated with this cookie. This corresponds to the "path" field of the cookie string.

See also setPath().

func (*QNetworkCookie) QNetworkCookie_PTR

func (ptr *QNetworkCookie) QNetworkCookie_PTR() *QNetworkCookie

func (*QNetworkCookie) RawFormItemName

func (this *QNetworkCookie) RawFormItemName(val int) string

func (*QNetworkCookie) SetCthis

func (this *QNetworkCookie) SetCthis(cthis unsafe.Pointer)

func (*QNetworkCookie) SetDomain

func (this *QNetworkCookie) SetDomain(domain string)

Sets the domain associated with this cookie to be domain.

See also domain().

func (*QNetworkCookie) SetExpirationDate

func (this *QNetworkCookie) SetExpirationDate(date qtcore.QDateTime_ITF)

Sets the expiration date of this cookie to date. Setting an invalid expiration date to this cookie will mean it's a session cookie.

See also isSessionCookie() and expirationDate().

func (*QNetworkCookie) SetHttpOnly

func (this *QNetworkCookie) SetHttpOnly(enable bool)

Sets this cookie's "HttpOnly" flag to enable.

This function was introduced in Qt 4.5.

See also isHttpOnly().

func (*QNetworkCookie) SetName

func (this *QNetworkCookie) SetName(cookieName qtcore.QByteArray_ITF)

Sets the name of this cookie to be cookieName. Note that setting a cookie name to an empty QByteArray will make this cookie invalid.

See also name() and value().

func (*QNetworkCookie) SetPath

func (this *QNetworkCookie) SetPath(path string)

Sets the path associated with this cookie to be path.

See also path().

func (*QNetworkCookie) SetSecure

func (this *QNetworkCookie) SetSecure(enable bool)

Sets the secure flag of this cookie to enable.

Secure cookies may contain private information and should not be resent over unencrypted connections.

See also isSecure().

func (*QNetworkCookie) SetValue

func (this *QNetworkCookie) SetValue(value qtcore.QByteArray_ITF)

Sets the value of this cookie to be value.

See also value() and name().

func (*QNetworkCookie) Swap

func (this *QNetworkCookie) Swap(other QNetworkCookie_ITF)

Swaps this cookie with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

func (*QNetworkCookie) ToRawForm

func (this *QNetworkCookie) ToRawForm(form int) *qtcore.QByteArray

Returns the raw form of this QNetworkCookie. The QByteArray returned by this function is suitable for an HTTP header, either in a server response (the Set-Cookie header) or the client request (the Cookie header). You can choose from one of two formats, using form.

See also parseCookies().

func (*QNetworkCookie) ToRawFormp

func (this *QNetworkCookie) ToRawFormp() *qtcore.QByteArray

Returns the raw form of this QNetworkCookie. The QByteArray returned by this function is suitable for an HTTP header, either in a server response (the Set-Cookie header) or the client request (the Cookie header). You can choose from one of two formats, using form.

See also parseCookies().

func (*QNetworkCookie) Value

func (this *QNetworkCookie) Value() *qtcore.QByteArray

Returns this cookies value, as specified in the cookie string. Note that a cookie is still valid if its value is empty.

Cookie name-value pairs are considered opaque to the application: that is, their values don't mean anything.

See also setValue() and name().

type QNetworkCookieJar

type QNetworkCookieJar struct {
	*qtcore.QObject
}

func NewQNetworkCookieJar

func NewQNetworkCookieJar(parent qtcore.QObject_ITF) *QNetworkCookieJar

func NewQNetworkCookieJarFromPointer

func NewQNetworkCookieJarFromPointer(cthis unsafe.Pointer) *QNetworkCookieJar

func NewQNetworkCookieJarp

func NewQNetworkCookieJarp() *QNetworkCookieJar

func (*QNetworkCookieJar) DeleteCookie

func (this *QNetworkCookieJar) DeleteCookie(cookie QNetworkCookie_ITF) bool

Deletes from cookie jar the cookie found to have the same identifier as cookie.

Returns true if a cookie was deleted, false otherwise.

This function was introduced in Qt 5.0.

See also QNetworkCookie::hasSameIdentifier().

func (*QNetworkCookieJar) GetCthis

func (this *QNetworkCookieJar) GetCthis() unsafe.Pointer

func (*QNetworkCookieJar) InheritValidateCookie

func (this *QNetworkCookieJar) InheritValidateCookie(f func(cookie *QNetworkCookie, url *qtcore.QUrl) bool)

bool validateCookie(const QNetworkCookie &, const QUrl &)

func (*QNetworkCookieJar) InsertCookie

func (this *QNetworkCookieJar) InsertCookie(cookie QNetworkCookie_ITF) bool

Adds cookie to this cookie jar.

Returns true if cookie was added, false otherwise.

If a cookie with the same identifier already exists in the cookie jar, it will be overridden.

This function was introduced in Qt 5.0.

func (*QNetworkCookieJar) MetaObject

func (this *QNetworkCookieJar) MetaObject() *qtcore.QMetaObject

func (*QNetworkCookieJar) NewForInherit

func (*QNetworkCookieJar) NewForInherit(parent qtcore.QObject_ITF) *QNetworkCookieJar

Creates a QNetworkCookieJar object and sets the parent object to be parent.

The cookie jar is initialized to empty.

func (*QNetworkCookieJar) NewForInheritp

func (*QNetworkCookieJar) NewForInheritp() *QNetworkCookieJar

Creates a QNetworkCookieJar object and sets the parent object to be parent.

The cookie jar is initialized to empty.

func (*QNetworkCookieJar) NewFromPointer

func (*QNetworkCookieJar) NewFromPointer(cthis unsafe.Pointer) *QNetworkCookieJar

func (*QNetworkCookieJar) QNetworkCookieJar_PTR

func (ptr *QNetworkCookieJar) QNetworkCookieJar_PTR() *QNetworkCookieJar

func (*QNetworkCookieJar) SetCthis

func (this *QNetworkCookieJar) SetCthis(cthis unsafe.Pointer)

func (*QNetworkCookieJar) UpdateCookie

func (this *QNetworkCookieJar) UpdateCookie(cookie QNetworkCookie_ITF) bool

If a cookie with the same identifier as cookie exists in this cookie jar it will be updated. This function uses insertCookie().

Returns true if cookie was updated, false if no cookie in the jar matches the identifier of cookie.

This function was introduced in Qt 5.0.

See also QNetworkCookie::hasSameIdentifier().

func (*QNetworkCookieJar) ValidateCookie

func (this *QNetworkCookieJar) ValidateCookie(cookie QNetworkCookie_ITF, url qtcore.QUrl_ITF) bool

Returns true if the domain and path of cookie are valid, false otherwise. The url parameter is used to determine if the domain specified in the cookie is allowed.

This function was introduced in Qt 5.0.

type QNetworkCookieJar_ITF

type QNetworkCookieJar_ITF interface {
	qtcore.QObject_ITF
	QNetworkCookieJar_PTR() *QNetworkCookieJar
}

type QNetworkCookie_ITF

type QNetworkCookie_ITF interface {
	QNetworkCookie_PTR() *QNetworkCookie
}

type QNetworkCookie__RawForm

type QNetworkCookie__RawForm = int

This enum is used with the toRawForm() function to declare which form of a cookie shall be returned.

Note that only the Full form of the cookie can be parsed back into its original contents.

See also toRawForm() and parseCookies().

const QNetworkCookie__Full QNetworkCookie__RawForm = 1

makes toRawForm() return the full cookie contents, as suitable for sending to a client in a server's "Set-Cookie:" header.

const QNetworkCookie__NameAndValueOnly QNetworkCookie__RawForm = 0

makes toRawForm() return only the "NAME=VALUE" part of the cookie, as suitable for sending back to a server in a client request's "Cookie:" header. Multiple cookies are separated by a semi-colon in the "Cookie:" header field.

type QNetworkDatagram

type QNetworkDatagram struct {
	*qtrt.CObject
}

func NewQNetworkDatagram

func NewQNetworkDatagram() *QNetworkDatagram

func NewQNetworkDatagram1

func NewQNetworkDatagram1(data qtcore.QByteArray_ITF, destinationAddress QHostAddress_ITF, port uint16) *QNetworkDatagram

func NewQNetworkDatagram1p

func NewQNetworkDatagram1p(data qtcore.QByteArray_ITF) *QNetworkDatagram

func NewQNetworkDatagram1p1

func NewQNetworkDatagram1p1(data qtcore.QByteArray_ITF, destinationAddress QHostAddress_ITF) *QNetworkDatagram

func NewQNetworkDatagramFromPointer

func NewQNetworkDatagramFromPointer(cthis unsafe.Pointer) *QNetworkDatagram

func (*QNetworkDatagram) Clear

func (this *QNetworkDatagram) Clear()

Clears the payload data and metadata in this QNetworkDatagram object, resetting them to their default values.

func (*QNetworkDatagram) Data

func (this *QNetworkDatagram) Data() *qtcore.QByteArray

Returns the data payload of this datagram. For a datagram received from the network, it contains the payload of the datagram. For an outgoing datagram, it is the datagram to be sent.

Note that datagrams can be transmitted with no data, so the returned QByteArray may be empty.

See also setData().

func (*QNetworkDatagram) DestinationAddress

func (this *QNetworkDatagram) DestinationAddress() *QHostAddress

Returns the destination address associated with this datagram. For a datagram received from the network, it is the address the peer node sent the datagram to, which can either be a local address of this machine or a multicast or broadcast address. For an outgoing datagrams, it is the address the datagram should be sent to.

If no destination address was set on this datagram, the returned object will report true to QHostAddress::isNull().

See also senderAddress(), destinationPort(), and setDestination().

func (*QNetworkDatagram) DestinationPort

func (this *QNetworkDatagram) DestinationPort() int

Returns the port number of the destination associated with this datagram. For a datagram received from the network, it is the local port number that the peer node sent the datagram to. For an outgoing datagram, it is the peer port the datagram should be sent to.

If no destination address was associated with this datagram, this function returns -1.

See also destinationAddress(), senderPort(), and setDestination().

func (*QNetworkDatagram) GetCthis

func (this *QNetworkDatagram) GetCthis() unsafe.Pointer

func (*QNetworkDatagram) HopLimit

func (this *QNetworkDatagram) HopLimit() int

Returns the hop count limit associated with this datagram. The hop count limit is the number of nodes that are allowed to forward the IP packet before it expires and an error is sent back to the sender of the datagram. In IPv4, this value is usually known as "time to live" (TTL).

If this datagram was received from the network, this is the remaining hop count of the datagram after reception and was decremented by 1 by each node that forwarded the packet. A value of -1 indicates that the hop limit count not be obtained.

If this is an outgoing datagram, this is the value to be set in the IP header upon sending. A value of -1 indicates the operating system should choose the value.

See also setHopLimit().

func (*QNetworkDatagram) InterfaceIndex

func (this *QNetworkDatagram) InterfaceIndex() uint

Returns the interface index this datagram is associated with. The interface index is a positive number that uniquely identifies the network interface in the operating system. This number matches the value returned by QNetworkInterface::index() for the interface.

If this datagram was received from the network, this is the index of the interface that the packet was received from. If this is an outgoing datagram, this is the index of the interface that the datagram should be sent on.

A value of 0 indicates that the interface index is unknown.

See also setInterfaceIndex().

func (*QNetworkDatagram) IsNull

func (this *QNetworkDatagram) IsNull() bool

Returns true if this QNetworkDatagram object is null. This function is the opposite of isValid().

func (*QNetworkDatagram) IsValid

func (this *QNetworkDatagram) IsValid() bool

Returns true if this QNetworkDatagram object is valid. A valid QNetworkDatagram object contains at least one sender or receiver address. Valid datagrams can contain empty payloads.

func (*QNetworkDatagram) MakeReply

func (this *QNetworkDatagram) MakeReply(payload qtcore.QByteArray_ITF) *QNetworkDatagram

func (*QNetworkDatagram) MakeReply1

func (this *QNetworkDatagram) MakeReply1(payload qtcore.QByteArray_ITF) *QNetworkDatagram

func (*QNetworkDatagram) NewForInherit

func (*QNetworkDatagram) NewForInherit() *QNetworkDatagram

Creates a QNetworkDatagram object with no payload data and undefined destination address.

The payload can be modified by using setData() and the destination address can be set with setDestination().

If the destination address is left undefined, QUdpSocket::writeDatagram() will attempt to send the datagram to the address last associated with, by using QUdpSocket::connectToHost().

func (*QNetworkDatagram) NewForInherit1

func (*QNetworkDatagram) NewForInherit1(data qtcore.QByteArray_ITF, destinationAddress QHostAddress_ITF, port uint16) *QNetworkDatagram

Creates a QNetworkDatagram object with no payload data and undefined destination address.

The payload can be modified by using setData() and the destination address can be set with setDestination().

If the destination address is left undefined, QUdpSocket::writeDatagram() will attempt to send the datagram to the address last associated with, by using QUdpSocket::connectToHost().

func (*QNetworkDatagram) NewForInherit1p

func (*QNetworkDatagram) NewForInherit1p(data qtcore.QByteArray_ITF) *QNetworkDatagram

Creates a QNetworkDatagram object with no payload data and undefined destination address.

The payload can be modified by using setData() and the destination address can be set with setDestination().

If the destination address is left undefined, QUdpSocket::writeDatagram() will attempt to send the datagram to the address last associated with, by using QUdpSocket::connectToHost().

func (*QNetworkDatagram) NewForInherit1p1

func (*QNetworkDatagram) NewForInherit1p1(data qtcore.QByteArray_ITF, destinationAddress QHostAddress_ITF) *QNetworkDatagram

Creates a QNetworkDatagram object with no payload data and undefined destination address.

The payload can be modified by using setData() and the destination address can be set with setDestination().

If the destination address is left undefined, QUdpSocket::writeDatagram() will attempt to send the datagram to the address last associated with, by using QUdpSocket::connectToHost().

func (*QNetworkDatagram) NewFromPointer

func (*QNetworkDatagram) NewFromPointer(cthis unsafe.Pointer) *QNetworkDatagram

func (*QNetworkDatagram) Operator_equal

func (this *QNetworkDatagram) Operator_equal(other QNetworkDatagram_ITF) *QNetworkDatagram

func (*QNetworkDatagram) Operator_equal1

func (this *QNetworkDatagram) Operator_equal1(other unsafe.Pointer) *QNetworkDatagram

func (*QNetworkDatagram) QNetworkDatagram_PTR

func (ptr *QNetworkDatagram) QNetworkDatagram_PTR() *QNetworkDatagram

func (*QNetworkDatagram) SenderAddress

func (this *QNetworkDatagram) SenderAddress() *QHostAddress

Returns the sender address associated with this datagram. For a datagram received from the network, it is the address of the peer node that sent the datagram. For an outgoing datagrams, it is the local address to be used when sending.

If no sender address was set on this datagram, the returned object will report true to QHostAddress::isNull().

See also destinationAddress(), senderPort(), and setSender().

func (*QNetworkDatagram) SenderPort

func (this *QNetworkDatagram) SenderPort() int

Returns the port number of the sender associated with this datagram. For a datagram received from the network, it is the port number that the peer node sent the datagram from. For an outgoing datagram, it is the local port the datagram should be sent from.

If no sender address was associated with this datagram, this function returns -1.

See also senderAddress(), destinationPort(), and setSender().

func (*QNetworkDatagram) SetCthis

func (this *QNetworkDatagram) SetCthis(cthis unsafe.Pointer)

func (*QNetworkDatagram) SetData

func (this *QNetworkDatagram) SetData(data qtcore.QByteArray_ITF)

Sets the data payload of this datagram to data. It is usually not necessary to call this function on received datagrams. For outgoing datagrams, this function sets the data to be sent on the network.

Since datagrams can empty, an empty QByteArray is a valid value for data.

See also data().

func (*QNetworkDatagram) SetDestination

func (this *QNetworkDatagram) SetDestination(address QHostAddress_ITF, port uint16)

Sets the destination address associated with this datagram to be the address address and port number port. The destination address and port numbers are usually set by QUdpSocket upon reception, so there's no need to call this function on a received datagram.

For outgoing datagrams, this function can be used to set the address the datagram should be sent to. It can be the unicast address used to communicate with the peer or a broadcast or multicast address to send to a group of devices.

See also QUdpSocket::writeDatagram(), destinationAddress(), destinationPort(), and setSender().

func (*QNetworkDatagram) SetHopLimit

func (this *QNetworkDatagram) SetHopLimit(count int)

Sets the hop count limit associated with this datagram to count. The hop count limit is the number of nodes that are allowed to forward the IP packet before it expires and an error is sent back to the sender of the datagram. In IPv4, this value is usually known as "time to live" (TTL).

It is usually not necessary to call this function on datagrams received from the network.

If this is an outgoing packet, this is the value to be set in the IP header upon sending. The valid range for the value is 1 to 255. This function also accepts a value of -1 to indicate that the operating system should choose the value.

See also hopLimit().

func (*QNetworkDatagram) SetInterfaceIndex

func (this *QNetworkDatagram) SetInterfaceIndex(index uint)

Sets the interface index this datagram is associated with to index. The interface index is a positive number that uniquely identifies the network interface in the operating system. This number matches the value returned by QNetworkInterface::index() for the interface.

It is usually not necessary to call this function on datagrams received from the network.

If this is an outgoing packet, this is the index of the interface the datagram should be sent on. A value of 0 indicates that the operating system should choose the interface based on other factors.

Note that the interface index can also be set with QHostAddress::setScopeId() for IPv6 destination addresses and then with setDestination(). If the scope ID set in the destination address and index are different and neither is zero, it is undefined which interface the operating system will send the datagram on.

See also interfaceIndex() and setInterfaceIndex().

func (*QNetworkDatagram) SetSender

func (this *QNetworkDatagram) SetSender(address QHostAddress_ITF, port uint16)

Sets the sender address associated with this datagram to be the address address and port number port. The sender address and port numbers are usually set by QUdpSocket upon reception, so there's no need to call this function on a received datagram.

For outgoing datagrams, this function can be used to set the address the datagram should carry. The address address must usually be one of the local addresses assigned to this machine, which can be obtained using QNetworkInterface. If left unset, the operating system will choose the most appropriate address to use given the destination in question.

The port number port must be the port number associated with the socket, if there is one. The value of 0 can be used to indicate that the operating system should choose the port number.

See also QUdpSocket::writeDatagram(), senderAddress(), senderPort(), and setDestination().

func (*QNetworkDatagram) SetSenderp

func (this *QNetworkDatagram) SetSenderp(address QHostAddress_ITF)

Sets the sender address associated with this datagram to be the address address and port number port. The sender address and port numbers are usually set by QUdpSocket upon reception, so there's no need to call this function on a received datagram.

For outgoing datagrams, this function can be used to set the address the datagram should carry. The address address must usually be one of the local addresses assigned to this machine, which can be obtained using QNetworkInterface. If left unset, the operating system will choose the most appropriate address to use given the destination in question.

The port number port must be the port number associated with the socket, if there is one. The value of 0 can be used to indicate that the operating system should choose the port number.

See also QUdpSocket::writeDatagram(), senderAddress(), senderPort(), and setDestination().

func (*QNetworkDatagram) Swap

func (this *QNetworkDatagram) Swap(other QNetworkDatagram_ITF)

Swaps this instance with other.

type QNetworkDatagram_ITF

type QNetworkDatagram_ITF interface {
	QNetworkDatagram_PTR() *QNetworkDatagram
}

type QNetworkDiskCache

type QNetworkDiskCache struct {
	*QAbstractNetworkCache
}

func NewQNetworkDiskCache

func NewQNetworkDiskCache(parent qtcore.QObject_ITF) *QNetworkDiskCache

func NewQNetworkDiskCacheFromPointer

func NewQNetworkDiskCacheFromPointer(cthis unsafe.Pointer) *QNetworkDiskCache

func NewQNetworkDiskCachep

func NewQNetworkDiskCachep() *QNetworkDiskCache

func (*QNetworkDiskCache) CacheDirectory

func (this *QNetworkDiskCache) CacheDirectory() string

Returns the location where cached files will be stored.

See also setCacheDirectory().

func (*QNetworkDiskCache) CacheSize

func (this *QNetworkDiskCache) CacheSize() int64

Reimplemented from QAbstractNetworkCache::cacheSize().

func (*QNetworkDiskCache) Clear

func (this *QNetworkDiskCache) Clear()

Reimplemented from QAbstractNetworkCache::clear().

func (*QNetworkDiskCache) Data

Reimplemented from QAbstractNetworkCache::data().

func (*QNetworkDiskCache) Expire

func (this *QNetworkDiskCache) Expire() int64

Cleans the cache so that its size is under the maximum cache size. Returns the current size of the cache.

When the current size of the cache is greater than the maximumCacheSize() older cache files are removed until the total size is less then 90% of maximumCacheSize() starting with the oldest ones first using the file creation date to determine how old a cache file is.

Subclasses can reimplement this function to change the order that cache files are removed taking into account information in the application knows about that QNetworkDiskCache does not, for example the number of times a cache is accessed.

Note: cacheSize() calls expire if the current cache size is unknown.

See also maximumCacheSize() and fileMetaData().

func (*QNetworkDiskCache) FileMetaData

func (this *QNetworkDiskCache) FileMetaData(fileName string) *QNetworkCacheMetaData

Returns the QNetworkCacheMetaData for the cache file fileName.

If fileName is not a cache file QNetworkCacheMetaData will be invalid.

func (*QNetworkDiskCache) GetCthis

func (this *QNetworkDiskCache) GetCthis() unsafe.Pointer

func (*QNetworkDiskCache) InheritExpire

func (this *QNetworkDiskCache) InheritExpire(f func() int64)

long long expire()

func (*QNetworkDiskCache) MaximumCacheSize

func (this *QNetworkDiskCache) MaximumCacheSize() int64

Returns the current maximum size for the disk cache.

See also setMaximumCacheSize().

func (*QNetworkDiskCache) MetaData

Reimplemented from QAbstractNetworkCache::metaData().

func (*QNetworkDiskCache) MetaObject

func (this *QNetworkDiskCache) MetaObject() *qtcore.QMetaObject

func (*QNetworkDiskCache) NewForInherit

func (*QNetworkDiskCache) NewForInherit(parent qtcore.QObject_ITF) *QNetworkDiskCache

Creates a new disk cache. The parent argument is passed to QAbstractNetworkCache's constructor.

func (*QNetworkDiskCache) NewForInheritp

func (*QNetworkDiskCache) NewForInheritp() *QNetworkDiskCache

Creates a new disk cache. The parent argument is passed to QAbstractNetworkCache's constructor.

func (*QNetworkDiskCache) NewFromPointer

func (*QNetworkDiskCache) NewFromPointer(cthis unsafe.Pointer) *QNetworkDiskCache

func (*QNetworkDiskCache) Prepare

Reimplemented from QAbstractNetworkCache::prepare().

func (*QNetworkDiskCache) QNetworkDiskCache_PTR

func (ptr *QNetworkDiskCache) QNetworkDiskCache_PTR() *QNetworkDiskCache

func (*QNetworkDiskCache) Remove

func (this *QNetworkDiskCache) Remove(url qtcore.QUrl_ITF) bool

Reimplemented from QAbstractNetworkCache::remove().

func (*QNetworkDiskCache) SetCacheDirectory

func (this *QNetworkDiskCache) SetCacheDirectory(cacheDir string)

Sets the directory where cached files will be stored to cacheDir

QNetworkDiskCache will create this directory if it does not exists.

Prepared cache items will be stored in the new cache directory when they are inserted.

See also cacheDirectory() and QDesktopServices::CacheLocation.

func (*QNetworkDiskCache) SetCthis

func (this *QNetworkDiskCache) SetCthis(cthis unsafe.Pointer)

func (*QNetworkDiskCache) SetMaximumCacheSize

func (this *QNetworkDiskCache) SetMaximumCacheSize(size int64)

Sets the maximum size of the disk cache to be size.

If the new size is smaller then the current cache size then the cache will call expire().

See also maximumCacheSize().

func (*QNetworkDiskCache) UpdateMetaData

func (this *QNetworkDiskCache) UpdateMetaData(metaData QNetworkCacheMetaData_ITF)

Reimplemented from QAbstractNetworkCache::updateMetaData().

type QNetworkDiskCache_ITF

type QNetworkDiskCache_ITF interface {
	QAbstractNetworkCache_ITF
	QNetworkDiskCache_PTR() *QNetworkDiskCache
}

type QNetworkInterface

type QNetworkInterface struct {
	*qtrt.CObject
}

func NewQNetworkInterface

func NewQNetworkInterface() *QNetworkInterface

func NewQNetworkInterfaceFromPointer

func NewQNetworkInterfaceFromPointer(cthis unsafe.Pointer) *QNetworkInterface

func QNetworkInterface_InterfaceFromIndex

func QNetworkInterface_InterfaceFromIndex(index int) *QNetworkInterface

func QNetworkInterface_InterfaceFromName

func QNetworkInterface_InterfaceFromName(name string) *QNetworkInterface

func (*QNetworkInterface) Flags

func (this *QNetworkInterface) Flags() int

Returns the flags associated with this network interface.

func (*QNetworkInterface) GetCthis

func (this *QNetworkInterface) GetCthis() unsafe.Pointer

func (*QNetworkInterface) HardwareAddress

func (this *QNetworkInterface) HardwareAddress() string

Returns the low-level hardware address for this interface. On Ethernet interfaces, this will be a MAC address in string representation, separated by colons.

Other interface types may have other types of hardware addresses. Implementations should not depend on this function returning a valid MAC address.

See also type().

func (*QNetworkInterface) HumanReadableName

func (this *QNetworkInterface) HumanReadableName() string

Returns the human-readable name of this network interface on Windows, such as "Local Area Connection", if the name could be determined. If it couldn't, this function returns the same as name(). The human-readable name is a name that the user can modify in the Windows Control Panel, so it may change during the execution of the program.

On Unix, this function currently always returns the same as name(), since Unix systems don't store a configuration for human-readable names.

This function was introduced in Qt 4.5.

func (*QNetworkInterface) Index

func (this *QNetworkInterface) Index() int

Returns the interface system index, if known. This is an integer assigned by the operating system to identify this interface and it generally doesn't change. It matches the scope ID field in IPv6 addresses.

If the index isn't known, this function returns 0.

This function was introduced in Qt 4.5.

func (*QNetworkInterface) InterfaceFlagItemName

func (this *QNetworkInterface) InterfaceFlagItemName(val int) string

func (*QNetworkInterface) InterfaceFromIndex

func (this *QNetworkInterface) InterfaceFromIndex(index int) *QNetworkInterface

Returns a QNetworkInterface object for the interface whose internal ID is index. Network interfaces have a unique identifier called the "interface index" to distinguish it from other interfaces on the system. Often, this value is assigned progressively and interfaces being removed and then added again get a different value every time.

This index is also found in the IPv6 address' scope ID field.

func (*QNetworkInterface) InterfaceFromName

func (this *QNetworkInterface) InterfaceFromName(name string) *QNetworkInterface

Returns a QNetworkInterface object for the interface named name. If no such interface exists, this function returns an invalid QNetworkInterface object.

The string name may be either an actual interface name (such as "eth0" or "en1") or an interface index in string form ("1", "2", etc.).

See also name() and isValid().

func (*QNetworkInterface) InterfaceIndexFromName

func (this *QNetworkInterface) InterfaceIndexFromName(name string) int

Returns the index of the interface whose name is name or 0 if there is no interface with that name. This function should produce the same result as the following code, but will probably execute faster.

QNetworkInterface::interfaceFromName(name).index()

This function was introduced in Qt 5.7.

See also interfaceFromName(), interfaceNameFromIndex(), and QNetworkDatagram::interfaceIndex().

func (*QNetworkInterface) InterfaceNameFromIndex

func (this *QNetworkInterface) InterfaceNameFromIndex(index int) string

Returns the name of the interface whose index is index or an empty string if there is no interface with that index. This function should produce the same result as the following code, but will probably execute faster.

QNetworkInterface::interfaceFromIndex(index).name()

This function was introduced in Qt 5.7.

See also interfaceFromIndex(), interfaceIndexFromName(), and QNetworkDatagram::interfaceIndex().

func (*QNetworkInterface) InterfaceTypeItemName

func (this *QNetworkInterface) InterfaceTypeItemName(val int) string

func (*QNetworkInterface) IsValid

func (this *QNetworkInterface) IsValid() bool

Returns true if this QNetworkInterface object contains valid information about a network interface.

func (*QNetworkInterface) MaximumTransmissionUnit

func (this *QNetworkInterface) MaximumTransmissionUnit() int

Returns the maximum transmission unit on this interface, if known, or 0 otherwise.

The maximum transmission unit is the largest packet that may be sent on this interface without incurring link-level fragmentation. Applications may use this value to calculate the size of the payload that will fit an unfragmented UDP datagram. Remember to subtract the sizes of headers used in your communication over the interface, e.g. TCP (20 bytes) or UDP (12), IPv4 (20) or IPv6 (40, absent some form of header compression), when computing how big a payload you can transmit. Also note that the MTU along the full path (the Path MTU) to the destination may be smaller than the interface's MTU.

This function was introduced in Qt 5.11.

See also QUdpSocket.

func (*QNetworkInterface) Name

func (this *QNetworkInterface) Name() string

Returns the name of this network interface. On Unix systems, this is a string containing the type of the interface and optionally a sequence number, such as "eth0", "lo" or "pcn0". On Windows, it's an internal ID that cannot be changed by the user.

func (*QNetworkInterface) NewForInherit

func (*QNetworkInterface) NewForInherit() *QNetworkInterface

Constructs an empty network interface object.

func (*QNetworkInterface) NewFromPointer

func (*QNetworkInterface) NewFromPointer(cthis unsafe.Pointer) *QNetworkInterface

func (*QNetworkInterface) Operator_equal

func (this *QNetworkInterface) Operator_equal(other unsafe.Pointer) *QNetworkInterface

func (*QNetworkInterface) Operator_equal1

func (this *QNetworkInterface) Operator_equal1(other QNetworkInterface_ITF) *QNetworkInterface

func (*QNetworkInterface) QNetworkInterface_PTR

func (ptr *QNetworkInterface) QNetworkInterface_PTR() *QNetworkInterface

func (*QNetworkInterface) SetCthis

func (this *QNetworkInterface) SetCthis(cthis unsafe.Pointer)

func (*QNetworkInterface) Swap

func (this *QNetworkInterface) Swap(other QNetworkInterface_ITF)

Swaps this network interface instance with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

func (*QNetworkInterface) Type

func (this *QNetworkInterface) Type() int

Returns the type of this interface, if it could be determined. If it could not be determined, this function returns QNetworkInterface::Unknown.

This function was introduced in Qt 5.11.

See also hardwareAddress().

type QNetworkInterface_ITF

type QNetworkInterface_ITF interface {
	QNetworkInterface_PTR() *QNetworkInterface
}

type QNetworkInterface__InterfaceFlag

type QNetworkInterface__InterfaceFlag = int
const QNetworkInterface__CanBroadcast QNetworkInterface__InterfaceFlag = 4
const QNetworkInterface__CanMulticast QNetworkInterface__InterfaceFlag = 32
const QNetworkInterface__IsLoopBack QNetworkInterface__InterfaceFlag = 8
const QNetworkInterface__IsPointToPoint QNetworkInterface__InterfaceFlag = 16
const QNetworkInterface__IsRunning QNetworkInterface__InterfaceFlag = 2
const QNetworkInterface__IsUp QNetworkInterface__InterfaceFlag = 1

type QNetworkInterface__InterfaceType

type QNetworkInterface__InterfaceType = int

Specifies the type of hardware (PHY layer, OSI level 1) this interface is, if it could be determined. Interface types that are not among those listed below will generally be listed as Unknown, though future versions of Qt may add new enumeration values.

The possible values are:

const QNetworkInterface__CanBus QNetworkInterface__InterfaceType = 5
const QNetworkInterface__Ethernet QNetworkInterface__InterfaceType = 3
const QNetworkInterface__Fddi QNetworkInterface__InterfaceType = 7
const QNetworkInterface__Ieee1394 QNetworkInterface__InterfaceType = 13
const QNetworkInterface__Ieee80211 QNetworkInterface__InterfaceType = 8
const QNetworkInterface__Ieee802154 QNetworkInterface__InterfaceType = 10
const QNetworkInterface__Ieee80216 QNetworkInterface__InterfaceType = 12
const QNetworkInterface__Loopback QNetworkInterface__InterfaceType = 1
const QNetworkInterface__Phonet QNetworkInterface__InterfaceType = 9

Interfaces using the Linux Phonet socket family, for communication with cellular modems. See the Linux kernel documentation for more information.

const QNetworkInterface__Ppp QNetworkInterface__InterfaceType = 6

Point-to-Point Protocol interfaces, establishing a direct connection between two nodes over a lower transport layer (often serial over radio or physical line).

const QNetworkInterface__SixLoWPAN QNetworkInterface__InterfaceType = 11
const QNetworkInterface__Slip QNetworkInterface__InterfaceType = 4

Serial Line Internet Protocol interfaces.

const QNetworkInterface__Unknown QNetworkInterface__InterfaceType = 0

The interface type could not be determined or is not one of the other listed types.

const QNetworkInterface__Virtual QNetworkInterface__InterfaceType = 2

A type of interface determined to be virtual, but not any of the other possible types. For example, tunnel interfaces are (currently) detected as virtual ones.

const QNetworkInterface__Wifi QNetworkInterface__InterfaceType = 8

type QNetworkProxy

type QNetworkProxy struct {
	*qtrt.CObject
}

func NewQNetworkProxy

func NewQNetworkProxy() *QNetworkProxy

func NewQNetworkProxy1

func NewQNetworkProxy1(type_ int, hostName string, port uint16, user string, password string) *QNetworkProxy

func NewQNetworkProxy1p

func NewQNetworkProxy1p(type_ int) *QNetworkProxy

func NewQNetworkProxy1p1

func NewQNetworkProxy1p1(type_ int, hostName string) *QNetworkProxy

func NewQNetworkProxy1p2

func NewQNetworkProxy1p2(type_ int, hostName string, port uint16) *QNetworkProxy

func NewQNetworkProxy1p3

func NewQNetworkProxy1p3(type_ int, hostName string, port uint16, user string) *QNetworkProxy

func NewQNetworkProxyFromPointer

func NewQNetworkProxyFromPointer(cthis unsafe.Pointer) *QNetworkProxy

func QNetworkProxy_ApplicationProxy

func QNetworkProxy_ApplicationProxy() *QNetworkProxy

func (*QNetworkProxy) ApplicationProxy

func (this *QNetworkProxy) ApplicationProxy() *QNetworkProxy

Returns the application level network proxying.

If a QAbstractSocket or QTcpSocket has the QNetworkProxy::DefaultProxy type, then the QNetworkProxy returned by this function is used.

See also QNetworkProxyFactory, setApplicationProxy(), QAbstractSocket::proxy(), and QTcpServer::proxy().

func (*QNetworkProxy) Capabilities

func (this *QNetworkProxy) Capabilities() int

Returns the capabilities of this proxy server.

This function was introduced in Qt 4.5.

See also setCapabilities() and type().

func (*QNetworkProxy) CapabilityItemName

func (this *QNetworkProxy) CapabilityItemName(val int) string

func (*QNetworkProxy) GetCthis

func (this *QNetworkProxy) GetCthis() unsafe.Pointer

func (*QNetworkProxy) HasRawHeader

func (this *QNetworkProxy) HasRawHeader(headerName qtcore.QByteArray_ITF) bool

Returns true if the raw header headerName is in use for this proxy. Returns false if the proxy is not of type HttpProxy or HttpCachingProxy.

This function was introduced in Qt 5.0.

See also rawHeader() and setRawHeader().

func (*QNetworkProxy) Header

func (this *QNetworkProxy) Header(header int) *qtcore.QVariant

Returns the value of the known network header header if it is in use for this proxy. If it is not present, returns QVariant() (i.e., an invalid variant).

This function was introduced in Qt 5.0.

See also QNetworkRequest::KnownHeaders, rawHeader(), and setHeader().

func (*QNetworkProxy) HostName

func (this *QNetworkProxy) HostName() string

Returns the host name of the proxy host.

See also setHostName(), setPort(), and port().

func (*QNetworkProxy) IsCachingProxy

func (this *QNetworkProxy) IsCachingProxy() bool

Returns true if this proxy supports the QNetworkProxy::CachingCapability capability.

In Qt 4.4, the capability was tied to the proxy type, but since Qt 4.5 it is possible to remove the capability of caching from a proxy by calling setCapabilities().

This function was introduced in Qt 4.4.

See also capabilities(), type(), and isTransparentProxy().

func (*QNetworkProxy) IsTransparentProxy

func (this *QNetworkProxy) IsTransparentProxy() bool

Returns true if this proxy supports transparent tunneling of TCP connections. This matches the QNetworkProxy::TunnelingCapability capability.

In Qt 4.4, the capability was tied to the proxy type, but since Qt 4.5 it is possible to remove the capability of caching from a proxy by calling setCapabilities().

This function was introduced in Qt 4.4.

See also capabilities(), type(), and isCachingProxy().

func (*QNetworkProxy) NewForInherit

func (*QNetworkProxy) NewForInherit() *QNetworkProxy

Constructs a QNetworkProxy with DefaultProxy type; the proxy type is determined by applicationProxy(), which defaults to NoProxy.

See also setType() and setApplicationProxy().

func (*QNetworkProxy) NewForInherit1

func (*QNetworkProxy) NewForInherit1(type_ int, hostName string, port uint16, user string, password string) *QNetworkProxy

Constructs a QNetworkProxy with DefaultProxy type; the proxy type is determined by applicationProxy(), which defaults to NoProxy.

See also setType() and setApplicationProxy().

func (*QNetworkProxy) NewForInherit1p

func (*QNetworkProxy) NewForInherit1p(type_ int) *QNetworkProxy

Constructs a QNetworkProxy with DefaultProxy type; the proxy type is determined by applicationProxy(), which defaults to NoProxy.

See also setType() and setApplicationProxy().

func (*QNetworkProxy) NewForInherit1p1

func (*QNetworkProxy) NewForInherit1p1(type_ int, hostName string) *QNetworkProxy

Constructs a QNetworkProxy with DefaultProxy type; the proxy type is determined by applicationProxy(), which defaults to NoProxy.

See also setType() and setApplicationProxy().

func (*QNetworkProxy) NewForInherit1p2

func (*QNetworkProxy) NewForInherit1p2(type_ int, hostName string, port uint16) *QNetworkProxy

Constructs a QNetworkProxy with DefaultProxy type; the proxy type is determined by applicationProxy(), which defaults to NoProxy.

See also setType() and setApplicationProxy().

func (*QNetworkProxy) NewForInherit1p3

func (*QNetworkProxy) NewForInherit1p3(type_ int, hostName string, port uint16, user string) *QNetworkProxy

Constructs a QNetworkProxy with DefaultProxy type; the proxy type is determined by applicationProxy(), which defaults to NoProxy.

See also setType() and setApplicationProxy().

func (*QNetworkProxy) NewFromPointer

func (*QNetworkProxy) NewFromPointer(cthis unsafe.Pointer) *QNetworkProxy

func (*QNetworkProxy) Operator_equal

func (this *QNetworkProxy) Operator_equal(other unsafe.Pointer) *QNetworkProxy

func (*QNetworkProxy) Operator_equal1

func (this *QNetworkProxy) Operator_equal1(other QNetworkProxy_ITF) *QNetworkProxy

func (*QNetworkProxy) Operator_equal_equal

func (this *QNetworkProxy) Operator_equal_equal(other QNetworkProxy_ITF) bool

func (*QNetworkProxy) Operator_not_equal

func (this *QNetworkProxy) Operator_not_equal(other QNetworkProxy_ITF) bool

func (*QNetworkProxy) Password

func (this *QNetworkProxy) Password() string

Returns the password used for authentication.

See also user(), setPassword(), and setUser().

func (*QNetworkProxy) Port

func (this *QNetworkProxy) Port() uint16

Returns the port of the proxy host.

See also setHostName(), setPort(), and hostName().

func (*QNetworkProxy) ProxyTypeItemName

func (this *QNetworkProxy) ProxyTypeItemName(val int) string

func (*QNetworkProxy) QNetworkProxy_PTR

func (ptr *QNetworkProxy) QNetworkProxy_PTR() *QNetworkProxy

func (*QNetworkProxy) RawHeader

func (this *QNetworkProxy) RawHeader(headerName qtcore.QByteArray_ITF) *qtcore.QByteArray

Returns the raw form of header headerName. If no such header is present or the proxy is not of type HttpProxy or HttpCachingProxy, an empty QByteArray is returned, which may be indistinguishable from a header that is present but has no content (use hasRawHeader() to find out if the header exists or not).

Raw headers can be set with setRawHeader() or with setHeader().

This function was introduced in Qt 5.0.

See also header() and setRawHeader().

func (*QNetworkProxy) SetApplicationProxy

func (this *QNetworkProxy) SetApplicationProxy(proxy QNetworkProxy_ITF)

Sets the application level network proxying to be networkProxy.

If a QAbstractSocket or QTcpSocket has the QNetworkProxy::DefaultProxy type, then the QNetworkProxy set with this function is used. If you want more flexibility in determining which proxy is used, use the QNetworkProxyFactory class.

Setting a default proxy value with this function will override the application proxy factory set with QNetworkProxyFactory::setApplicationProxyFactory, and disable the use of a system proxy.

See also QNetworkProxyFactory, applicationProxy(), QAbstractSocket::setProxy(), and QTcpServer::setProxy().

func (*QNetworkProxy) SetCapabilities

func (this *QNetworkProxy) SetCapabilities(capab int)

Sets the capabilities of this proxy to capabilities.

This function was introduced in Qt 4.5.

See also setType() and capabilities().

func (*QNetworkProxy) SetCthis

func (this *QNetworkProxy) SetCthis(cthis unsafe.Pointer)

func (*QNetworkProxy) SetHeader

func (this *QNetworkProxy) SetHeader(header int, value qtcore.QVariant_ITF)

Sets the value of the known header header to be value, overriding any previously set headers. This operation also sets the equivalent raw HTTP header.

If the proxy is not of type HttpProxy or HttpCachingProxy this has no effect.

This function was introduced in Qt 5.0.

See also QNetworkRequest::KnownHeaders, setRawHeader(), and header().

func (*QNetworkProxy) SetHostName

func (this *QNetworkProxy) SetHostName(hostName string)

Sets the host name of the proxy host to be hostName.

See also hostName(), setPort(), and port().

func (*QNetworkProxy) SetPassword

func (this *QNetworkProxy) SetPassword(password string)

Sets the password for proxy authentication to be password.

See also user(), setUser(), and password().

func (*QNetworkProxy) SetPort

func (this *QNetworkProxy) SetPort(port uint16)

Sets the port of the proxy host to be port.

See also hostName(), setHostName(), and port().

func (*QNetworkProxy) SetRawHeader

func (this *QNetworkProxy) SetRawHeader(headerName qtcore.QByteArray_ITF, value qtcore.QByteArray_ITF)

Sets the header headerName to be of value headerValue. If headerName corresponds to a known header (see QNetworkRequest::KnownHeaders), the raw format will be parsed and the corresponding "cooked" header will be set as well.

For example:

request.setRawHeader(QByteArray("Last-Modified"), QByteArray("Sun, 06 Nov 1994 08:49:37 GMT"));

will also set the known header LastModifiedHeader to be the QDateTime object of the parsed date.

Note: Setting the same header twice overrides the previous setting. To accomplish the behaviour of multiple HTTP headers of the same name, you should concatenate the two values, separating them with a comma (",") and set one single raw header.

If the proxy is not of type HttpProxy or HttpCachingProxy this has no effect.

This function was introduced in Qt 5.0.

See also QNetworkRequest::KnownHeaders, setHeader(), hasRawHeader(), and rawHeader().

func (*QNetworkProxy) SetType

func (this *QNetworkProxy) SetType(type_ int)

Sets the proxy type for this instance to be type.

Note that changing the type of a proxy does not change the set of capabilities this QNetworkProxy object holds if any capabilities have been set with setCapabilities().

See also type() and setCapabilities().

func (*QNetworkProxy) SetUser

func (this *QNetworkProxy) SetUser(userName string)

Sets the user name for proxy authentication to be user.

See also user(), setPassword(), and password().

func (*QNetworkProxy) Swap

func (this *QNetworkProxy) Swap(other QNetworkProxy_ITF)

Swaps this network proxy instance with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

func (*QNetworkProxy) Type

func (this *QNetworkProxy) Type() int

Returns the proxy type for this instance.

See also setType().

func (*QNetworkProxy) User

func (this *QNetworkProxy) User() string

Returns the user name used for authentication.

See also setUser(), setPassword(), and password().

type QNetworkProxyFactory

type QNetworkProxyFactory struct {
	*qtrt.CObject
}

func NewQNetworkProxyFactory

func NewQNetworkProxyFactory() *QNetworkProxyFactory

func NewQNetworkProxyFactoryFromPointer

func NewQNetworkProxyFactoryFromPointer(cthis unsafe.Pointer) *QNetworkProxyFactory

func (*QNetworkProxyFactory) GetCthis

func (this *QNetworkProxyFactory) GetCthis() unsafe.Pointer

func (*QNetworkProxyFactory) NewForInherit

func (*QNetworkProxyFactory) NewForInherit() *QNetworkProxyFactory

func (*QNetworkProxyFactory) NewFromPointer

func (*QNetworkProxyFactory) NewFromPointer(cthis unsafe.Pointer) *QNetworkProxyFactory

func (*QNetworkProxyFactory) QNetworkProxyFactory_PTR

func (ptr *QNetworkProxyFactory) QNetworkProxyFactory_PTR() *QNetworkProxyFactory

func (*QNetworkProxyFactory) SetApplicationProxyFactory

func (this *QNetworkProxyFactory) SetApplicationProxyFactory(factory QNetworkProxyFactory_ITF)

func (*QNetworkProxyFactory) SetCthis

func (this *QNetworkProxyFactory) SetCthis(cthis unsafe.Pointer)

func (*QNetworkProxyFactory) SetUseSystemConfiguration

func (this *QNetworkProxyFactory) SetUseSystemConfiguration(enable bool)

func (*QNetworkProxyFactory) UsesSystemConfiguration

func (this *QNetworkProxyFactory) UsesSystemConfiguration() bool

type QNetworkProxyFactory_ITF

type QNetworkProxyFactory_ITF interface {
	QNetworkProxyFactory_PTR() *QNetworkProxyFactory
}

type QNetworkProxyQuery

type QNetworkProxyQuery struct {
	*qtrt.CObject
}

func NewQNetworkProxyQuery

func NewQNetworkProxyQuery() *QNetworkProxyQuery

func NewQNetworkProxyQuery1

func NewQNetworkProxyQuery1(requestUrl qtcore.QUrl_ITF, queryType int) *QNetworkProxyQuery

func NewQNetworkProxyQuery1p

func NewQNetworkProxyQuery1p(requestUrl qtcore.QUrl_ITF) *QNetworkProxyQuery

func NewQNetworkProxyQuery2

func NewQNetworkProxyQuery2(hostname string, port int, protocolTag string, queryType int) *QNetworkProxyQuery

func NewQNetworkProxyQuery2p

func NewQNetworkProxyQuery2p(hostname string, port int) *QNetworkProxyQuery

func NewQNetworkProxyQuery2p1

func NewQNetworkProxyQuery2p1(hostname string, port int, protocolTag string) *QNetworkProxyQuery

func NewQNetworkProxyQuery3

func NewQNetworkProxyQuery3(bindPort uint16, protocolTag string, queryType int) *QNetworkProxyQuery

func NewQNetworkProxyQuery3p

func NewQNetworkProxyQuery3p(bindPort uint16) *QNetworkProxyQuery

func NewQNetworkProxyQuery3p1

func NewQNetworkProxyQuery3p1(bindPort uint16, protocolTag string) *QNetworkProxyQuery

func NewQNetworkProxyQuery4

func NewQNetworkProxyQuery4(networkConfiguration QNetworkConfiguration_ITF, requestUrl qtcore.QUrl_ITF, queryType int) *QNetworkProxyQuery

func NewQNetworkProxyQuery4p

func NewQNetworkProxyQuery4p(networkConfiguration QNetworkConfiguration_ITF, requestUrl qtcore.QUrl_ITF) *QNetworkProxyQuery

func NewQNetworkProxyQuery5

func NewQNetworkProxyQuery5(networkConfiguration QNetworkConfiguration_ITF, hostname string, port int, protocolTag string, queryType int) *QNetworkProxyQuery

func NewQNetworkProxyQuery5p

func NewQNetworkProxyQuery5p(networkConfiguration QNetworkConfiguration_ITF, hostname string, port int) *QNetworkProxyQuery

func NewQNetworkProxyQuery5p1

func NewQNetworkProxyQuery5p1(networkConfiguration QNetworkConfiguration_ITF, hostname string, port int, protocolTag string) *QNetworkProxyQuery

func NewQNetworkProxyQuery6

func NewQNetworkProxyQuery6(networkConfiguration QNetworkConfiguration_ITF, bindPort uint16, protocolTag string, queryType int) *QNetworkProxyQuery

func NewQNetworkProxyQuery6p

func NewQNetworkProxyQuery6p(networkConfiguration QNetworkConfiguration_ITF, bindPort uint16) *QNetworkProxyQuery

func NewQNetworkProxyQuery6p1

func NewQNetworkProxyQuery6p1(networkConfiguration QNetworkConfiguration_ITF, bindPort uint16, protocolTag string) *QNetworkProxyQuery

func NewQNetworkProxyQueryFromPointer

func NewQNetworkProxyQueryFromPointer(cthis unsafe.Pointer) *QNetworkProxyQuery

func (*QNetworkProxyQuery) GetCthis

func (this *QNetworkProxyQuery) GetCthis() unsafe.Pointer

func (*QNetworkProxyQuery) LocalPort

func (this *QNetworkProxyQuery) LocalPort() int

func (*QNetworkProxyQuery) NetworkConfiguration

func (this *QNetworkProxyQuery) NetworkConfiguration() *QNetworkConfiguration

func (*QNetworkProxyQuery) NewForInherit

func (*QNetworkProxyQuery) NewForInherit() *QNetworkProxyQuery

func (*QNetworkProxyQuery) NewForInherit1

func (*QNetworkProxyQuery) NewForInherit1(requestUrl qtcore.QUrl_ITF, queryType int) *QNetworkProxyQuery

func (*QNetworkProxyQuery) NewForInherit1p

func (*QNetworkProxyQuery) NewForInherit1p(requestUrl qtcore.QUrl_ITF) *QNetworkProxyQuery

func (*QNetworkProxyQuery) NewForInherit2

func (*QNetworkProxyQuery) NewForInherit2(hostname string, port int, protocolTag string, queryType int) *QNetworkProxyQuery

func (*QNetworkProxyQuery) NewForInherit2p

func (*QNetworkProxyQuery) NewForInherit2p(hostname string, port int) *QNetworkProxyQuery

func (*QNetworkProxyQuery) NewForInherit2p1

func (*QNetworkProxyQuery) NewForInherit2p1(hostname string, port int, protocolTag string) *QNetworkProxyQuery

func (*QNetworkProxyQuery) NewForInherit3

func (*QNetworkProxyQuery) NewForInherit3(bindPort uint16, protocolTag string, queryType int) *QNetworkProxyQuery

func (*QNetworkProxyQuery) NewForInherit3p

func (*QNetworkProxyQuery) NewForInherit3p(bindPort uint16) *QNetworkProxyQuery

func (*QNetworkProxyQuery) NewForInherit3p1

func (*QNetworkProxyQuery) NewForInherit3p1(bindPort uint16, protocolTag string) *QNetworkProxyQuery

func (*QNetworkProxyQuery) NewForInherit4

func (*QNetworkProxyQuery) NewForInherit4(networkConfiguration QNetworkConfiguration_ITF, requestUrl qtcore.QUrl_ITF, queryType int) *QNetworkProxyQuery

func (*QNetworkProxyQuery) NewForInherit4p

func (*QNetworkProxyQuery) NewForInherit4p(networkConfiguration QNetworkConfiguration_ITF, requestUrl qtcore.QUrl_ITF) *QNetworkProxyQuery

func (*QNetworkProxyQuery) NewForInherit5

func (*QNetworkProxyQuery) NewForInherit5(networkConfiguration QNetworkConfiguration_ITF, hostname string, port int, protocolTag string, queryType int) *QNetworkProxyQuery

func (*QNetworkProxyQuery) NewForInherit5p

func (*QNetworkProxyQuery) NewForInherit5p(networkConfiguration QNetworkConfiguration_ITF, hostname string, port int) *QNetworkProxyQuery

func (*QNetworkProxyQuery) NewForInherit5p1

func (*QNetworkProxyQuery) NewForInherit5p1(networkConfiguration QNetworkConfiguration_ITF, hostname string, port int, protocolTag string) *QNetworkProxyQuery

func (*QNetworkProxyQuery) NewForInherit6

func (*QNetworkProxyQuery) NewForInherit6(networkConfiguration QNetworkConfiguration_ITF, bindPort uint16, protocolTag string, queryType int) *QNetworkProxyQuery

func (*QNetworkProxyQuery) NewForInherit6p

func (*QNetworkProxyQuery) NewForInherit6p(networkConfiguration QNetworkConfiguration_ITF, bindPort uint16) *QNetworkProxyQuery

func (*QNetworkProxyQuery) NewForInherit6p1

func (*QNetworkProxyQuery) NewForInherit6p1(networkConfiguration QNetworkConfiguration_ITF, bindPort uint16, protocolTag string) *QNetworkProxyQuery

func (*QNetworkProxyQuery) NewFromPointer

func (*QNetworkProxyQuery) NewFromPointer(cthis unsafe.Pointer) *QNetworkProxyQuery

func (*QNetworkProxyQuery) Operator_equal

func (this *QNetworkProxyQuery) Operator_equal(other unsafe.Pointer) *QNetworkProxyQuery

func (*QNetworkProxyQuery) Operator_equal1

func (this *QNetworkProxyQuery) Operator_equal1(other QNetworkProxyQuery_ITF) *QNetworkProxyQuery

func (*QNetworkProxyQuery) Operator_equal_equal

func (this *QNetworkProxyQuery) Operator_equal_equal(other QNetworkProxyQuery_ITF) bool

func (*QNetworkProxyQuery) Operator_not_equal

func (this *QNetworkProxyQuery) Operator_not_equal(other QNetworkProxyQuery_ITF) bool

func (*QNetworkProxyQuery) PeerHostName

func (this *QNetworkProxyQuery) PeerHostName() string

func (*QNetworkProxyQuery) PeerPort

func (this *QNetworkProxyQuery) PeerPort() int

func (*QNetworkProxyQuery) ProtocolTag

func (this *QNetworkProxyQuery) ProtocolTag() string

func (*QNetworkProxyQuery) QNetworkProxyQuery_PTR

func (ptr *QNetworkProxyQuery) QNetworkProxyQuery_PTR() *QNetworkProxyQuery

func (*QNetworkProxyQuery) QueryType

func (this *QNetworkProxyQuery) QueryType() int

func (*QNetworkProxyQuery) QueryTypeItemName

func (this *QNetworkProxyQuery) QueryTypeItemName(val int) string

func (*QNetworkProxyQuery) SetCthis

func (this *QNetworkProxyQuery) SetCthis(cthis unsafe.Pointer)

func (*QNetworkProxyQuery) SetLocalPort

func (this *QNetworkProxyQuery) SetLocalPort(port int)

func (*QNetworkProxyQuery) SetNetworkConfiguration

func (this *QNetworkProxyQuery) SetNetworkConfiguration(networkConfiguration QNetworkConfiguration_ITF)

func (*QNetworkProxyQuery) SetPeerHostName

func (this *QNetworkProxyQuery) SetPeerHostName(hostname string)

func (*QNetworkProxyQuery) SetPeerPort

func (this *QNetworkProxyQuery) SetPeerPort(port int)

func (*QNetworkProxyQuery) SetProtocolTag

func (this *QNetworkProxyQuery) SetProtocolTag(protocolTag string)

func (*QNetworkProxyQuery) SetQueryType

func (this *QNetworkProxyQuery) SetQueryType(type_ int)

func (*QNetworkProxyQuery) SetUrl

func (this *QNetworkProxyQuery) SetUrl(url qtcore.QUrl_ITF)

func (*QNetworkProxyQuery) Swap

func (this *QNetworkProxyQuery) Swap(other QNetworkProxyQuery_ITF)

Swaps this network proxy instance with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

func (*QNetworkProxyQuery) Url

func (this *QNetworkProxyQuery) Url() *qtcore.QUrl

type QNetworkProxyQuery_ITF

type QNetworkProxyQuery_ITF interface {
	QNetworkProxyQuery_PTR() *QNetworkProxyQuery
}

type QNetworkProxyQuery__QueryType

type QNetworkProxyQuery__QueryType = int
const QNetworkProxyQuery__SctpServer QNetworkProxyQuery__QueryType = 102
const QNetworkProxyQuery__SctpSocket QNetworkProxyQuery__QueryType = 2
const QNetworkProxyQuery__TcpServer QNetworkProxyQuery__QueryType = 100
const QNetworkProxyQuery__TcpSocket QNetworkProxyQuery__QueryType = 0
const QNetworkProxyQuery__UdpSocket QNetworkProxyQuery__QueryType = 1
const QNetworkProxyQuery__UrlRequest QNetworkProxyQuery__QueryType = 101

type QNetworkProxy_ITF

type QNetworkProxy_ITF interface {
	QNetworkProxy_PTR() *QNetworkProxy
}

type QNetworkProxy__Capability

type QNetworkProxy__Capability = int
const QNetworkProxy__CachingCapability QNetworkProxy__Capability = 8
const QNetworkProxy__HostNameLookupCapability QNetworkProxy__Capability = 16
const QNetworkProxy__ListeningCapability QNetworkProxy__Capability = 2
const QNetworkProxy__SctpListeningCapability QNetworkProxy__Capability = 64
const QNetworkProxy__SctpTunnelingCapability QNetworkProxy__Capability = 32
const QNetworkProxy__TunnelingCapability QNetworkProxy__Capability = 1
const QNetworkProxy__UdpTunnelingCapability QNetworkProxy__Capability = 4

type QNetworkProxy__ProxyType

type QNetworkProxy__ProxyType = int

This enum describes the types of network proxying provided in Qt.

There are two types of proxies that Qt understands: transparent proxies and caching proxies. The first group consists of proxies that can handle any arbitrary data transfer, while the second can only handle specific requests. The caching proxies only make sense for the specific classes where they can be used.

The table below lists different proxy types and their capabilities. Since each proxy type has different capabilities, it is important to understand them before choosing a proxy type.

Proxy typeDescriptionDefault capabilities

SOCKS 5Generic proxy for any kind of connection. Supports TCP, UDP, binding to a port (incoming connections) and authentication.TunnelingCapability, ListeningCapability, UdpTunnelingCapability, HostNameLookupCapability HTTPImplemented using the "CONNECT" command, supports only outgoing TCP connections; supports authentication.TunnelingCapability, CachingCapability, HostNameLookupCapability Caching-only HTTPImplemented using normal HTTP commands, it is useful only in the context of HTTP requests (see QNetworkAccessManager)CachingCapability, HostNameLookupCapability Caching FTPImplemented using an FTP proxy, it is useful only in the context of FTP requests (see QNetworkAccessManager)CachingCapability, HostNameLookupCapability

Also note that you shouldn't set the application default proxy (setApplicationProxy()) to a proxy that doesn't have the TunnelingCapability capability. If you do, QTcpSocket will not know how to open connections.

See also setType(), type(), capabilities(), and setCapabilities().

const QNetworkProxy__DefaultProxy QNetworkProxy__ProxyType = 0

Proxy is determined based on the application proxy set using setApplicationProxy()

const QNetworkProxy__FtpCachingProxy QNetworkProxy__ProxyType = 5

Proxying for FTP requests only

const QNetworkProxy__HttpCachingProxy QNetworkProxy__ProxyType = 4

Proxying for HTTP requests only

const QNetworkProxy__HttpProxy QNetworkProxy__ProxyType = 3

HTTP transparent proxying is used

const QNetworkProxy__NoProxy QNetworkProxy__ProxyType = 2

No proxying is used

const QNetworkProxy__Socks5Proxy QNetworkProxy__ProxyType = 1

type QNetworkReply

type QNetworkReply struct {
	*qtcore.QIODevice
}

func NewQNetworkReply

func NewQNetworkReply(parent qtcore.QObject_ITF) *QNetworkReply

func NewQNetworkReplyFromPointer

func NewQNetworkReplyFromPointer(cthis unsafe.Pointer) *QNetworkReply

func NewQNetworkReplyp

func NewQNetworkReplyp() *QNetworkReply

func (*QNetworkReply) Abort

func (this *QNetworkReply) Abort()

Aborts the operation immediately and close down any network connections still open. Uploads still in progress are also aborted.

The finished() signal will also be emitted.

See also close() and finished().

func (*QNetworkReply) Attribute

func (this *QNetworkReply) Attribute(code int) *qtcore.QVariant

Returns the attribute associated with the code code. If the attribute has not been set, it returns an invalid QVariant (type QMetaType::UnknownType).

You can expect the default values listed in QNetworkRequest::Attribute to be applied to the values returned by this function.

See also setAttribute() and QNetworkRequest::Attribute.

func (*QNetworkReply) Close

func (this *QNetworkReply) Close()

Reimplemented from QIODevice::close().

Closes this device for reading. Unread data is discarded, but the network resources are not discarded until they are finished. In particular, if any upload is in progress, it will continue until it is done.

The finished() signal is emitted when all operations are over and the network resources are freed.

See also abort() and finished().

func (*QNetworkReply) DownloadProgress

func (this *QNetworkReply) DownloadProgress(bytesReceived int64, bytesTotal int64)

This signal is emitted to indicate the progress of the download part of this network request, if there's any. If there's no download associated with this request, this signal will be emitted once with 0 as the value of both bytesReceived and bytesTotal.

The bytesReceived parameter indicates the number of bytes received, while bytesTotal indicates the total number of bytes expected to be downloaded. If the number of bytes to be downloaded is not known, bytesTotal will be -1.

The download is finished when bytesReceived is equal to bytesTotal. At that time, bytesTotal will not be -1.

Note that the values of both bytesReceived and bytesTotal may be different from size(), the total number of bytes obtained through read() or readAll(), or the value of the header(ContentLengthHeader). The reason for that is that there may be protocol overhead or the data may be compressed during the download.

See also uploadProgress() and bytesAvailable().

func (*QNetworkReply) Encrypted

func (this *QNetworkReply) Encrypted()

This signal is emitted when an SSL/TLS session has successfully completed the initial handshake. At this point, no user data has been transmitted. The signal can be used to perform additional checks on the certificate chain, for example to notify users when the certificate for a website has changed. If the reply does not match the expected criteria then it should be aborted by calling QNetworkReply::abort() by a slot connected to this signal. The SSL configuration in use can be inspected using the QNetworkReply::sslConfiguration() method.

Internally, QNetworkAccessManager may open multiple connections to a server, in order to allow it process requests in parallel. These connections may be reused, which means that the encrypted() signal would not be emitted. This means that you are only guaranteed to receive this signal for the first connection to a site in the lifespan of the QNetworkAccessManager.

This function was introduced in Qt 5.1.

See also QSslSocket::encrypted() and QNetworkAccessManager::encrypted().

func (*QNetworkReply) Error

func (this *QNetworkReply) Error() int

Returns the error that was found during the processing of this request. If no error was found, returns NoError.

See also setError().

func (*QNetworkReply) Error1

func (this *QNetworkReply) Error1(arg0 int)

Returns the error that was found during the processing of this request. If no error was found, returns NoError.

See also setError().

func (*QNetworkReply) Finished

func (this *QNetworkReply) Finished()

This signal is emitted when the reply has finished processing. After this signal is emitted, there will be no more updates to the reply's data or metadata.

Unless close() or abort() have been called, the reply will be still be opened for reading, so the data can be retrieved by calls to read() or readAll(). In particular, if no calls to read() were made as a result of readyRead(), a call to readAll() will retrieve the full contents in a QByteArray.

This signal is emitted in tandem with QNetworkAccessManager::finished() where that signal's reply parameter is this object.

Note: Do not delete the object in the slot connected to this signal. Use deleteLater().

You can also use isFinished() to check if a QNetworkReply has finished even before you receive the finished() signal.

See also setFinished(), QNetworkAccessManager::finished(), and isFinished().

func (*QNetworkReply) GetCthis

func (this *QNetworkReply) GetCthis() unsafe.Pointer

func (*QNetworkReply) HasRawHeader

func (this *QNetworkReply) HasRawHeader(headerName qtcore.QByteArray_ITF) bool

Returns true if the raw header of name headerName was sent by the remote server

See also rawHeader().

func (*QNetworkReply) Header

func (this *QNetworkReply) Header(header int) *qtcore.QVariant

Returns the value of the known header header, if that header was sent by the remote server. If the header was not sent, returns an invalid QVariant.

See also rawHeader(), setHeader(), and QNetworkRequest::header().

func (*QNetworkReply) IgnoreSslErrors

func (this *QNetworkReply) IgnoreSslErrors()

If this function is called, SSL errors related to network connection will be ignored, including certificate validation errors.

Warning: Be sure to always let the user inspect the errors reported by the sslErrors() signal, and only call this method upon confirmation from the user that proceeding is ok. If there are unexpected errors, the reply should be aborted. Calling this method without inspecting the actual errors will most likely pose a security risk for your application. Use it with great care!

This function can be called from the slot connected to the sslErrors() signal, which indicates which errors were found.

Note: If HTTP Strict Transport Security is enabled for QNetworkAccessManager, this function has no effect.

See also sslConfiguration(), sslErrors(), and QSslSocket::ignoreSslErrors().

func (*QNetworkReply) InheritSetAttribute

func (this *QNetworkReply) InheritSetAttribute(f func(code int, value *qtcore.QVariant))

void setAttribute(QNetworkRequest::Attribute, const QVariant &)

func (*QNetworkReply) InheritSetError

func (this *QNetworkReply) InheritSetError(f func(errorCode int, errorString string))

void setError(QNetworkReply::NetworkError, const QString &)

func (*QNetworkReply) InheritSetFinished

func (this *QNetworkReply) InheritSetFinished(f func(arg0 bool))

void setFinished(bool)

func (*QNetworkReply) InheritSetHeader

func (this *QNetworkReply) InheritSetHeader(f func(header int, value *qtcore.QVariant))

void setHeader(QNetworkRequest::KnownHeaders, const QVariant &)

func (*QNetworkReply) InheritSetOperation

func (this *QNetworkReply) InheritSetOperation(f func(operation int))

void setOperation(QNetworkAccessManager::Operation)

func (*QNetworkReply) InheritSetRawHeader

func (this *QNetworkReply) InheritSetRawHeader(f func(headerName *qtcore.QByteArray, value *qtcore.QByteArray))

void setRawHeader(const QByteArray &, const QByteArray &)

func (*QNetworkReply) InheritSetRequest

func (this *QNetworkReply) InheritSetRequest(f func(request *QNetworkRequest))

void setRequest(const QNetworkRequest &)

func (*QNetworkReply) InheritSetSslConfigurationImplementation

func (this *QNetworkReply) InheritSetSslConfigurationImplementation(f func(arg0 *QSslConfiguration))

void setSslConfigurationImplementation(const QSslConfiguration &)

func (*QNetworkReply) InheritSetUrl

func (this *QNetworkReply) InheritSetUrl(f func(url *qtcore.QUrl))

void setUrl(const QUrl &)

func (*QNetworkReply) InheritSslConfigurationImplementation

func (this *QNetworkReply) InheritSslConfigurationImplementation(f func(arg0 *QSslConfiguration))

void sslConfigurationImplementation(QSslConfiguration &)

func (*QNetworkReply) InheritWriteData

func (this *QNetworkReply) InheritWriteData(f func(data string, len_ int64) int64)

long long writeData(const char *, qint64)

func (*QNetworkReply) IsFinished

func (this *QNetworkReply) IsFinished() bool

Returns true when the reply has finished or was aborted.

This function was introduced in Qt 4.6.

See also isRunning().

func (*QNetworkReply) IsRunning

func (this *QNetworkReply) IsRunning() bool

Returns true when the request is still processing and the reply has not finished or was aborted yet.

This function was introduced in Qt 4.6.

See also isFinished().

func (*QNetworkReply) IsSequential

func (this *QNetworkReply) IsSequential() bool

func (*QNetworkReply) Manager

func (this *QNetworkReply) Manager() *QNetworkAccessManager

Returns the QNetworkAccessManager that was used to create this QNetworkReply object. Initially, it is also the parent object.

func (*QNetworkReply) MetaDataChanged

func (this *QNetworkReply) MetaDataChanged()

This signal is emitted whenever the metadata in this reply changes. metadata is any information that is not the content (data) itself, including the network headers. In the majority of cases, the metadata will be known fully by the time the first byte of data is received. However, it is possible to receive updates of headers or other metadata during the processing of the data.

See also header(), rawHeaderList(), rawHeader(), and hasRawHeader().

func (*QNetworkReply) MetaObject

func (this *QNetworkReply) MetaObject() *qtcore.QMetaObject

func (*QNetworkReply) NetworkErrorItemName

func (this *QNetworkReply) NetworkErrorItemName(val int) string

func (*QNetworkReply) NewForInherit

func (*QNetworkReply) NewForInherit(parent qtcore.QObject_ITF) *QNetworkReply

Creates a QNetworkReply object with parent parent.

You cannot directly instantiate QNetworkReply objects. Use QNetworkAccessManager functions to do that.

func (*QNetworkReply) NewForInheritp

func (*QNetworkReply) NewForInheritp() *QNetworkReply

Creates a QNetworkReply object with parent parent.

You cannot directly instantiate QNetworkReply objects. Use QNetworkAccessManager functions to do that.

func (*QNetworkReply) NewFromPointer

func (*QNetworkReply) NewFromPointer(cthis unsafe.Pointer) *QNetworkReply

func (*QNetworkReply) Operation

func (this *QNetworkReply) Operation() int

Returns the operation that was posted for this reply.

See also setOperation().

func (*QNetworkReply) PreSharedKeyAuthenticationRequired

func (this *QNetworkReply) PreSharedKeyAuthenticationRequired(authenticator QSslPreSharedKeyAuthenticator_ITF)

This signal is emitted if the SSL/TLS handshake negotiates a PSK ciphersuite, and therefore a PSK authentication is then required.

When using PSK, the client must send to the server a valid identity and a valid pre shared key, in order for the SSL handshake to continue. Applications can provide this information in a slot connected to this signal, by filling in the passed authenticator object according to their needs.

Note: Ignoring this signal, or failing to provide the required credentials, will cause the handshake to fail, and therefore the connection to be aborted.

Note: The authenticator object is owned by the reply and must not be deleted by the application.

This function was introduced in Qt 5.5.

See also QSslPreSharedKeyAuthenticator.

func (*QNetworkReply) QNetworkReply_PTR

func (ptr *QNetworkReply) QNetworkReply_PTR() *QNetworkReply

func (*QNetworkReply) RawHeader

func (this *QNetworkReply) RawHeader(headerName qtcore.QByteArray_ITF) *qtcore.QByteArray

Returns the raw contents of the header headerName as sent by the remote server. If there is no such header, returns an empty byte array, which may be indistinguishable from an empty header. Use hasRawHeader() to verify if the server sent such header field.

See also setRawHeader(), hasRawHeader(), and header().

func (*QNetworkReply) ReadBufferSize

func (this *QNetworkReply) ReadBufferSize() int64

Returns the size of the read buffer, in bytes.

See also setReadBufferSize().

func (*QNetworkReply) RedirectAllowed

func (this *QNetworkReply) RedirectAllowed()

When client code handling the redirected() signal has verified the new URL, it emits this signal to allow the redirect to go ahead. This protocol applies to network requests whose redirects policy is set to QNetworkRequest::UserVerifiedRedirectPolicy

This function was introduced in Qt 5.9.

See also QNetworkRequest::UserVerifiedRedirectPolicy, QNetworkAccessManager::setRedirectPolicy(), and QNetworkRequest::RedirectPolicyAttribute.

func (*QNetworkReply) Redirected

func (this *QNetworkReply) Redirected(url qtcore.QUrl_ITF)

This signal is emitted if the QNetworkRequest::FollowRedirectsAttribute was set in the request and the server responded with a 3xx status (specifically 301, 302, 303, 305, 307 or 308 status code) with a valid url in the location header, indicating a HTTP redirect. The url parameter contains the new redirect url as returned by the server in the location header.

This function was introduced in Qt 5.6.

See also QNetworkRequest::FollowRedirectsAttribute.

func (*QNetworkReply) Request

func (this *QNetworkReply) Request() *QNetworkRequest

Returns the request that was posted for this reply. In special, note that the URL for the request may be different than that of the reply.

See also QNetworkRequest::url(), url(), and setRequest().

func (*QNetworkReply) SetAttribute

func (this *QNetworkReply) SetAttribute(code int, value qtcore.QVariant_ITF)

Sets the attribute code to have value value. If code was previously set, it will be overridden. If value is an invalid QVariant, the attribute will be unset.

See also attribute() and QNetworkRequest::setAttribute().

func (*QNetworkReply) SetCthis

func (this *QNetworkReply) SetCthis(cthis unsafe.Pointer)

func (*QNetworkReply) SetError

func (this *QNetworkReply) SetError(errorCode int, errorString string)

Sets the error condition to be errorCode. The human-readable message is set with errorString.

Calling setError() does not emit the error(QNetworkReply::NetworkError) signal.

See also error() and errorString().

func (*QNetworkReply) SetFinished

func (this *QNetworkReply) SetFinished(arg0 bool)

Sets the reply as finished.

After having this set the replies data must not change.

This function was introduced in Qt 4.8.

See also finished() and isFinished().

func (*QNetworkReply) SetHeader

func (this *QNetworkReply) SetHeader(header int, value qtcore.QVariant_ITF)

Sets the known header header to be of value value. The corresponding raw form of the header will be set as well.

See also header(), setRawHeader(), and QNetworkRequest::setHeader().

func (*QNetworkReply) SetOperation

func (this *QNetworkReply) SetOperation(operation int)

Sets the associated operation for this object to be operation. This value will be returned by operation().

Note: The operation should be set when this object is created and not changed again.

See also operation() and setRequest().

func (*QNetworkReply) SetRawHeader

func (this *QNetworkReply) SetRawHeader(headerName qtcore.QByteArray_ITF, value qtcore.QByteArray_ITF)

Sets the raw header headerName to be of value value. If headerName was previously set, it is overridden. Multiple HTTP headers of the same name are functionally equivalent to one single header with the values concatenated, separated by commas.

If headerName matches a known header, the value value will be parsed and the corresponding parsed form will also be set.

See also rawHeader(), header(), setHeader(), and QNetworkRequest::setRawHeader().

func (*QNetworkReply) SetReadBufferSize

func (this *QNetworkReply) SetReadBufferSize(size int64)

Sets the size of the read buffer to be size bytes. The read buffer is the buffer that holds data that is being downloaded off the network, before it is read with QIODevice::read(). Setting the buffer size to 0 will make the buffer unlimited in size.

QNetworkReply will try to stop reading from the network once this buffer is full (i.e., bytesAvailable() returns size or more), thus causing the download to throttle down as well. If the buffer is not limited in size, QNetworkReply will try to download as fast as possible from the network.

Unlike QAbstractSocket::setReadBufferSize(), QNetworkReply cannot guarantee precision in the read buffer size. That is, bytesAvailable() can return more than size.

See also readBufferSize().

func (*QNetworkReply) SetRequest

func (this *QNetworkReply) SetRequest(request QNetworkRequest_ITF)

Sets the associated request for this object to be request. This value will be returned by request().

Note: The request should be set when this object is created and not changed again.

See also request() and setOperation().

func (*QNetworkReply) SetSslConfiguration

func (this *QNetworkReply) SetSslConfiguration(configuration QSslConfiguration_ITF)

Sets the SSL configuration for the network connection associated with this request, if possible, to be that of config.

See also sslConfiguration().

func (*QNetworkReply) SetSslConfigurationImplementation

func (this *QNetworkReply) SetSslConfigurationImplementation(arg0 QSslConfiguration_ITF)

This virtual method is provided to enable overriding the behavior of setSslConfiguration(). setSslConfiguration() is a public wrapper for this method. If you override this method use configuration to set the SSL configuration.

This function was introduced in Qt 5.0.

See also sslConfigurationImplementation() and setSslConfiguration().

func (*QNetworkReply) SetUrl

func (this *QNetworkReply) SetUrl(url qtcore.QUrl_ITF)

Sets the URL being processed to be url. Normally, the URL matches that of the request that was posted, but for a variety of reasons it can be different (for example, a file path being made absolute or canonical).

See also url(), request(), and QNetworkRequest::url().

func (*QNetworkReply) SslConfiguration

func (this *QNetworkReply) SslConfiguration() *QSslConfiguration

Returns the SSL configuration and state associated with this reply, if SSL was used. It will contain the remote server's certificate, its certificate chain leading to the Certificate Authority as well as the encryption ciphers in use.

The peer's certificate and its certificate chain will be known by the time sslErrors() is emitted, if it's emitted.

See also setSslConfiguration().

func (*QNetworkReply) SslConfigurationImplementation

func (this *QNetworkReply) SslConfigurationImplementation(arg0 QSslConfiguration_ITF)

This virtual method is provided to enable overriding the behavior of sslConfiguration(). sslConfiguration() is a public wrapper for this method. The configuration will be returned in configuration.

This function was introduced in Qt 5.0.

See also setSslConfigurationImplementation() and sslConfiguration().

func (*QNetworkReply) UploadProgress

func (this *QNetworkReply) UploadProgress(bytesSent int64, bytesTotal int64)

This signal is emitted to indicate the progress of the upload part of this network request, if there's any. If there's no upload associated with this request, this signal will not be emitted.

The bytesSent parameter indicates the number of bytes uploaded, while bytesTotal indicates the total number of bytes to be uploaded. If the number of bytes to be uploaded could not be determined, bytesTotal will be -1.

The upload is finished when bytesSent is equal to bytesTotal. At that time, bytesTotal will not be -1.

See also downloadProgress().

func (*QNetworkReply) Url

func (this *QNetworkReply) Url() *qtcore.QUrl

Returns the URL of the content downloaded or uploaded. Note that the URL may be different from that of the original request. If the QNetworkRequest::FollowRedirectsAttribute was set in the request, then this function returns the current url that the network API is accessing, i.e the url emitted in the QNetworkReply::redirected signal.

See also request(), setUrl(), QNetworkRequest::url(), and redirected().

func (*QNetworkReply) WriteData

func (this *QNetworkReply) WriteData(data string, len_ int64) int64

type QNetworkReply_ITF

type QNetworkReply_ITF interface {
	qtcore.QIODevice_ITF
	QNetworkReply_PTR() *QNetworkReply
}

type QNetworkReply__NetworkError

type QNetworkReply__NetworkError = int

Indicates all possible error conditions found during the processing of the request.

Note: When the HTTP protocol returns a redirect no error will be reported. You can check if there is a redirect with the QNetworkRequest::RedirectionTargetAttribute attribute.

See also error().

const QNetworkReply__AuthenticationRequiredError QNetworkReply__NetworkError = 204
const QNetworkReply__BackgroundRequestNotAllowedError QNetworkReply__NetworkError = 9

the background request is not currently allowed due to platform policy.

const QNetworkReply__ConnectionRefusedError QNetworkReply__NetworkError = 1

the remote server refused the connection (the server is not accepting requests)

const QNetworkReply__ContentAccessDenied QNetworkReply__NetworkError = 201
const QNetworkReply__ContentConflictError QNetworkReply__NetworkError = 206
const QNetworkReply__ContentGoneError QNetworkReply__NetworkError = 207
const QNetworkReply__ContentNotFoundError QNetworkReply__NetworkError = 203
const QNetworkReply__ContentOperationNotPermittedError QNetworkReply__NetworkError = 202
const QNetworkReply__ContentReSendError QNetworkReply__NetworkError = 205
const QNetworkReply__HostNotFoundError QNetworkReply__NetworkError = 3

the remote host name was not found (invalid hostname)

const QNetworkReply__InsecureRedirectError QNetworkReply__NetworkError = 11
const QNetworkReply__InternalServerError QNetworkReply__NetworkError = 401
const QNetworkReply__NetworkSessionFailedError QNetworkReply__NetworkError = 8

the connection was broken due to disconnection from the network or failure to start the network.

const QNetworkReply__NoError QNetworkReply__NetworkError = 0

no error condition.

const QNetworkReply__OperationCanceledError QNetworkReply__NetworkError = 5

the operation was canceled via calls to abort() or close() before it was finished.

const QNetworkReply__OperationNotImplementedError QNetworkReply__NetworkError = 402
const QNetworkReply__ProtocolFailure QNetworkReply__NetworkError = 399
const QNetworkReply__ProtocolInvalidOperationError QNetworkReply__NetworkError = 302
const QNetworkReply__ProtocolUnknownError QNetworkReply__NetworkError = 301
const QNetworkReply__ProxyAuthenticationRequiredError QNetworkReply__NetworkError = 105
const QNetworkReply__ProxyConnectionClosedError QNetworkReply__NetworkError = 102
const QNetworkReply__ProxyConnectionRefusedError QNetworkReply__NetworkError = 101
const QNetworkReply__ProxyNotFoundError QNetworkReply__NetworkError = 103
const QNetworkReply__ProxyTimeoutError QNetworkReply__NetworkError = 104
const QNetworkReply__RemoteHostClosedError QNetworkReply__NetworkError = 2

the remote server closed the connection prematurely, before the entire reply was received and processed

const QNetworkReply__ServiceUnavailableError QNetworkReply__NetworkError = 403
const QNetworkReply__SslHandshakeFailedError QNetworkReply__NetworkError = 6

the SSL/TLS handshake failed and the encrypted channel could not be established. The sslErrors() signal should have been emitted.

const QNetworkReply__TemporaryNetworkFailureError QNetworkReply__NetworkError = 7

the connection was broken due to disconnection from the network, however the system has initiated roaming to another access point. The request should be resubmitted and will be processed as soon as the connection is re-established.

const QNetworkReply__TimeoutError QNetworkReply__NetworkError = 4

the connection to the remote server timed out

const QNetworkReply__TooManyRedirectsError QNetworkReply__NetworkError = 10
const QNetworkReply__UnknownContentError QNetworkReply__NetworkError = 299
const QNetworkReply__UnknownNetworkError QNetworkReply__NetworkError = 99
const QNetworkReply__UnknownProxyError QNetworkReply__NetworkError = 199
const QNetworkReply__UnknownServerError QNetworkReply__NetworkError = 499

type QNetworkRequest

type QNetworkRequest struct {
	*qtrt.CObject
}

func NewQNetworkRequest

func NewQNetworkRequest(url qtcore.QUrl_ITF) *QNetworkRequest

func NewQNetworkRequestFromPointer

func NewQNetworkRequestFromPointer(cthis unsafe.Pointer) *QNetworkRequest

func NewQNetworkRequestp

func NewQNetworkRequestp() *QNetworkRequest

func (*QNetworkRequest) Attribute

func (this *QNetworkRequest) Attribute(code int, defaultValue qtcore.QVariant_ITF) *qtcore.QVariant

Returns the attribute associated with the code code. If the attribute has not been set, it returns defaultValue.

Note: This function does not apply the defaults listed in QNetworkRequest::Attribute.

See also setAttribute() and QNetworkRequest::Attribute.

func (*QNetworkRequest) AttributeItemName

func (this *QNetworkRequest) AttributeItemName(val int) string

func (*QNetworkRequest) Attributep

func (this *QNetworkRequest) Attributep(code int) *qtcore.QVariant

Returns the attribute associated with the code code. If the attribute has not been set, it returns defaultValue.

Note: This function does not apply the defaults listed in QNetworkRequest::Attribute.

See also setAttribute() and QNetworkRequest::Attribute.

func (*QNetworkRequest) CacheLoadControlItemName

func (this *QNetworkRequest) CacheLoadControlItemName(val int) string

func (*QNetworkRequest) GetCthis

func (this *QNetworkRequest) GetCthis() unsafe.Pointer

func (*QNetworkRequest) HasRawHeader

func (this *QNetworkRequest) HasRawHeader(headerName qtcore.QByteArray_ITF) bool

Returns true if the raw header headerName is present in this network request.

See also rawHeader() and setRawHeader().

func (*QNetworkRequest) Header

func (this *QNetworkRequest) Header(header int) *qtcore.QVariant

Returns the value of the known network header header if it is present in this request. If it is not present, returns QVariant() (i.e., an invalid variant).

See also KnownHeaders, rawHeader(), and setHeader().

func (*QNetworkRequest) KnownHeadersItemName

func (this *QNetworkRequest) KnownHeadersItemName(val int) string

func (*QNetworkRequest) LoadControlItemName

func (this *QNetworkRequest) LoadControlItemName(val int) string

func (*QNetworkRequest) MaximumRedirectsAllowed

func (this *QNetworkRequest) MaximumRedirectsAllowed() int

Returns the maximum number of redirects allowed to be followed for this request.

This function was introduced in Qt 5.6.

See also setMaximumRedirectsAllowed().

func (*QNetworkRequest) NewForInherit

func (*QNetworkRequest) NewForInherit(url qtcore.QUrl_ITF) *QNetworkRequest

Constructs a QNetworkRequest object with url as the URL to be requested.

See also url() and setUrl().

func (*QNetworkRequest) NewForInheritp

func (*QNetworkRequest) NewForInheritp() *QNetworkRequest

Constructs a QNetworkRequest object with url as the URL to be requested.

See also url() and setUrl().

func (*QNetworkRequest) NewFromPointer

func (*QNetworkRequest) NewFromPointer(cthis unsafe.Pointer) *QNetworkRequest

func (*QNetworkRequest) Operator_equal

func (this *QNetworkRequest) Operator_equal(other unsafe.Pointer) *QNetworkRequest

func (*QNetworkRequest) Operator_equal1

func (this *QNetworkRequest) Operator_equal1(other QNetworkRequest_ITF) *QNetworkRequest

func (*QNetworkRequest) Operator_equal_equal

func (this *QNetworkRequest) Operator_equal_equal(other QNetworkRequest_ITF) bool

func (*QNetworkRequest) Operator_not_equal

func (this *QNetworkRequest) Operator_not_equal(other QNetworkRequest_ITF) bool

func (*QNetworkRequest) OriginatingObject

func (this *QNetworkRequest) OriginatingObject() *qtcore.QObject

Returns a reference to the object that initiated this network request; returns 0 if not set or the object has been destroyed.

This function was introduced in Qt 4.6.

See also setOriginatingObject().

func (*QNetworkRequest) Priority

func (this *QNetworkRequest) Priority() int

Return the priority of this request.

This function was introduced in Qt 4.7.

See also setPriority().

func (*QNetworkRequest) PriorityItemName

func (this *QNetworkRequest) PriorityItemName(val int) string

func (*QNetworkRequest) QNetworkRequest_PTR

func (ptr *QNetworkRequest) QNetworkRequest_PTR() *QNetworkRequest

func (*QNetworkRequest) RawHeader

func (this *QNetworkRequest) RawHeader(headerName qtcore.QByteArray_ITF) *qtcore.QByteArray

Returns the raw form of header headerName. If no such header is present, an empty QByteArray is returned, which may be indistinguishable from a header that is present but has no content (use hasRawHeader() to find out if the header exists or not).

Raw headers can be set with setRawHeader() or with setHeader().

See also header() and setRawHeader().

func (*QNetworkRequest) RedirectPolicyItemName

func (this *QNetworkRequest) RedirectPolicyItemName(val int) string

func (*QNetworkRequest) SetAttribute

func (this *QNetworkRequest) SetAttribute(code int, value qtcore.QVariant_ITF)

Sets the attribute associated with code code to be value value. If the attribute is already set, the previous value is discarded. In special, if value is an invalid QVariant, the attribute is unset.

See also attribute() and QNetworkRequest::Attribute.

func (*QNetworkRequest) SetCthis

func (this *QNetworkRequest) SetCthis(cthis unsafe.Pointer)

func (*QNetworkRequest) SetHeader

func (this *QNetworkRequest) SetHeader(header int, value qtcore.QVariant_ITF)

Sets the value of the known header header to be value, overriding any previously set headers. This operation also sets the equivalent raw HTTP header.

See also KnownHeaders, setRawHeader(), and header().

func (*QNetworkRequest) SetMaximumRedirectsAllowed

func (this *QNetworkRequest) SetMaximumRedirectsAllowed(maximumRedirectsAllowed int)

Sets the maximum number of redirects allowed to be followed for this request to maxRedirectsAllowed.

This function was introduced in Qt 5.6.

See also maximumRedirectsAllowed().

func (*QNetworkRequest) SetOriginatingObject

func (this *QNetworkRequest) SetOriginatingObject(object qtcore.QObject_ITF)

Allows setting a reference to the object initiating the request.

For example Qt WebKit sets the originating object to the QWebFrame that initiated the request.

This function was introduced in Qt 4.6.

See also originatingObject().

func (*QNetworkRequest) SetPriority

func (this *QNetworkRequest) SetPriority(priority int)

Set the priority of this request to priority.

Note: The priority is only a hint to the network access manager. It can use it or not. Currently it is used for HTTP to decide which request should be sent first to a server.

This function was introduced in Qt 4.7.

See also priority().

func (*QNetworkRequest) SetRawHeader

func (this *QNetworkRequest) SetRawHeader(headerName qtcore.QByteArray_ITF, value qtcore.QByteArray_ITF)

Sets the header headerName to be of value headerValue. If headerName corresponds to a known header (see QNetworkRequest::KnownHeaders), the raw format will be parsed and the corresponding "cooked" header will be set as well.

For example:

request.setRawHeader(QByteArray("Last-Modified"), QByteArray("Sun, 06 Nov 1994 08:49:37 GMT"));

will also set the known header LastModifiedHeader to be the QDateTime object of the parsed date.

Note: Setting the same header twice overrides the previous setting. To accomplish the behaviour of multiple HTTP headers of the same name, you should concatenate the two values, separating them with a comma (",") and set one single raw header.

See also KnownHeaders, setHeader(), hasRawHeader(), and rawHeader().

func (*QNetworkRequest) SetSslConfiguration

func (this *QNetworkRequest) SetSslConfiguration(configuration QSslConfiguration_ITF)

Sets this network request's SSL configuration to be config. The settings that apply are the private key, the local certificate, the SSL protocol (SSLv2, SSLv3, TLSv1.0 where applicable), the CA certificates and the ciphers that the SSL backend is allowed to use.

See also sslConfiguration() and QSslConfiguration::defaultConfiguration().

func (*QNetworkRequest) SetUrl

func (this *QNetworkRequest) SetUrl(url qtcore.QUrl_ITF)

Sets the URL this network request is referring to be url.

See also url().

func (*QNetworkRequest) SslConfiguration

func (this *QNetworkRequest) SslConfiguration() *QSslConfiguration

Returns this network request's SSL configuration. By default this is the same as QSslConfiguration::defaultConfiguration().

See also setSslConfiguration() and QSslConfiguration::defaultConfiguration().

func (*QNetworkRequest) Swap

func (this *QNetworkRequest) Swap(other QNetworkRequest_ITF)

Swaps this network request with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

func (*QNetworkRequest) Url

func (this *QNetworkRequest) Url() *qtcore.QUrl

Returns the URL this network request is referring to.

See also setUrl().

type QNetworkRequest_ITF

type QNetworkRequest_ITF interface {
	QNetworkRequest_PTR() *QNetworkRequest
}

type QNetworkRequest__Attribute

type QNetworkRequest__Attribute = int

Attribute codes for the QNetworkRequest and QNetworkReply.

Attributes are extra meta-data that are used to control the behavior of the request and to pass further information from the reply back to the application. Attributes are also extensible, allowing custom implementations to pass custom values.

The following table explains what the default attribute codes are, the QVariant types associated, the default value if said attribute is missing and whether it's used in requests or replies.

This enum was introduced or modified in Qt 4.7.

const QNetworkRequest__AuthenticationReuseAttribute QNetworkRequest__Attribute = 12
const QNetworkRequest__BackgroundRequestAttribute QNetworkRequest__Attribute = 17
const QNetworkRequest__CacheLoadControlAttribute QNetworkRequest__Attribute = 4

Requests only, type: QMetaType::Int (default: QNetworkRequest::PreferNetwork) Controls how the cache should be accessed. The possible values are those of QNetworkRequest::CacheLoadControl. Note that the default QNetworkAccessManager implementation does not support caching. However, this attribute may be used by certain backends to modify their requests (for example, for caching proxies).

const QNetworkRequest__CacheSaveControlAttribute QNetworkRequest__Attribute = 5

Requests only, type: QMetaType::Bool (default: true) Controls if the data obtained should be saved to cache for future uses. If the value is false, the data obtained will not be automatically cached. If true, data may be cached, provided it is cacheable (what is cacheable depends on the protocol being used).

const QNetworkRequest__ConnectionEncryptedAttribute QNetworkRequest__Attribute = 3

Replies only, type: QMetaType::Bool (default: false) Indicates whether the data was obtained through an encrypted (secure) connection.

const QNetworkRequest__CookieLoadControlAttribute QNetworkRequest__Attribute = 11
const QNetworkRequest__CookieSaveControlAttribute QNetworkRequest__Attribute = 13
const QNetworkRequest__CustomVerbAttribute QNetworkRequest__Attribute = 10
const QNetworkRequest__DoNotBufferUploadDataAttribute QNetworkRequest__Attribute = 7

Requests only, type: QMetaType::Bool (default: false) Indicates whether the QNetworkAccessManager code is allowed to buffer the upload data, e.g. when doing a HTTP POST. When using this flag with sequential upload data, the ContentLengthHeader header must be set.

const QNetworkRequest__DownloadBufferAttribute QNetworkRequest__Attribute = 15
const QNetworkRequest__EmitAllUploadProgressSignalsAttribute QNetworkRequest__Attribute = 20
const QNetworkRequest__FollowRedirectsAttribute QNetworkRequest__Attribute = 21
const QNetworkRequest__HTTP2AllowedAttribute QNetworkRequest__Attribute = 22
const QNetworkRequest__HTTP2WasUsedAttribute QNetworkRequest__Attribute = 23
const QNetworkRequest__Http2DirectAttribute QNetworkRequest__Attribute = 26
const QNetworkRequest__HttpPipeliningAllowedAttribute QNetworkRequest__Attribute = 8

Requests only, type: QMetaType::Bool (default: false) Indicates whether the QNetworkAccessManager code is allowed to use HTTP pipelining with this request.

const QNetworkRequest__HttpPipeliningWasUsedAttribute QNetworkRequest__Attribute = 9

Replies only, type: QMetaType::Bool Indicates whether the HTTP pipelining was used for receiving this reply.

const QNetworkRequest__HttpReasonPhraseAttribute QNetworkRequest__Attribute = 1

Replies only, type: QMetaType::QByteArray (no default) Indicates the HTTP reason phrase as received from the HTTP server (like "Ok", "Found", "Not Found", "Access Denied", etc.) This is the human-readable representation of the status code (see above). If the connection was not HTTP-based, this attribute will not be present.

const QNetworkRequest__HttpStatusCodeAttribute QNetworkRequest__Attribute = 0
const QNetworkRequest__MaximumDownloadBufferSizeAttribute QNetworkRequest__Attribute = 14
const QNetworkRequest__OriginalContentLengthAttribute QNetworkRequest__Attribute = 24
const QNetworkRequest__RedirectPolicyAttribute QNetworkRequest__Attribute = 25
const QNetworkRequest__RedirectionTargetAttribute QNetworkRequest__Attribute = 2

Replies only, type: QMetaType::QUrl (no default) If present, it indicates that the server is redirecting the request to a different URL. The Network Access API does not by default follow redirections: the application can determine if the requested redirection should be allowed, according to its security policies, or it can set QNetworkRequest::FollowRedirectsAttribute to true (in which case the redirection will be followed and this attribute will not be present in the reply). The returned URL might be relative. Use QUrl::resolved() to create an absolute URL out of it.

const QNetworkRequest__ResourceTypeAttribute QNetworkRequest__Attribute = 27
const QNetworkRequest__SourceIsFromCacheAttribute QNetworkRequest__Attribute = 6

Replies only, type: QMetaType::Bool (default: false) Indicates whether the data was obtained from cache or not.

const QNetworkRequest__SpdyAllowedAttribute QNetworkRequest__Attribute = 18
const QNetworkRequest__SpdyWasUsedAttribute QNetworkRequest__Attribute = 19
const QNetworkRequest__SynchronousRequestAttribute QNetworkRequest__Attribute = 16
const QNetworkRequest__User QNetworkRequest__Attribute = 1000
const QNetworkRequest__UserMax QNetworkRequest__Attribute = 32767

type QNetworkRequest__CacheLoadControl

type QNetworkRequest__CacheLoadControl = int

Controls the caching mechanism of QNetworkAccessManager.

const QNetworkRequest__AlwaysCache QNetworkRequest__CacheLoadControl = 3

only load from cache, indicating error if the item was not cached (i.e., off-line mode)

const QNetworkRequest__AlwaysNetwork QNetworkRequest__CacheLoadControl = 0

always load from network and do not check if the cache has a valid entry (similar to the "Reload" feature in browsers); in addition, force intermediate caches to re-validate.

const QNetworkRequest__PreferCache QNetworkRequest__CacheLoadControl = 2

load from cache if available, otherwise load from network. Note that this can return possibly stale (but not expired) items from cache.

const QNetworkRequest__PreferNetwork QNetworkRequest__CacheLoadControl = 1

default value; load from the network if the cached entry is older than the network entry. This will never return stale data from the cache, but revalidate resources that have become stale.

type QNetworkRequest__KnownHeaders

type QNetworkRequest__KnownHeaders = int

List of known header types that QNetworkRequest parses. Each known header is also represented in raw form with its full HTTP name.

See also header(), setHeader(), rawHeader(), and setRawHeader().

const QNetworkRequest__ContentDispositionHeader QNetworkRequest__KnownHeaders = 6

Corresponds to the HTTP Content-Disposition header and contains a string containing the disposition type (for instance, attachment) and a parameter (for instance, filename).

const QNetworkRequest__ContentLengthHeader QNetworkRequest__KnownHeaders = 1

Corresponds to the HTTP Content-Length header and contains the length in bytes of the data transmitted.

const QNetworkRequest__ContentTypeHeader QNetworkRequest__KnownHeaders = 0

Corresponds to the HTTP Content-Type header and contains a string containing the media (MIME) type and any auxiliary data (for instance, charset).

const QNetworkRequest__CookieHeader QNetworkRequest__KnownHeaders = 4

Corresponds to the HTTP Cookie header and contains a QList<QNetworkCookie> representing the cookies to be sent back to the server.

const QNetworkRequest__ETagHeader QNetworkRequest__KnownHeaders = 10
const QNetworkRequest__IfMatchHeader QNetworkRequest__KnownHeaders = 11
const QNetworkRequest__IfModifiedSinceHeader QNetworkRequest__KnownHeaders = 9
const QNetworkRequest__IfNoneMatchHeader QNetworkRequest__KnownHeaders = 12
const QNetworkRequest__LastModifiedHeader QNetworkRequest__KnownHeaders = 3

Corresponds to the HTTP Last-Modified header and contains a QDateTime representing the last modification date of the contents.

const QNetworkRequest__LocationHeader QNetworkRequest__KnownHeaders = 2

Corresponds to the HTTP Location header and contains a URL representing the actual location of the data, including the destination URL in case of redirections.

const QNetworkRequest__ServerHeader QNetworkRequest__KnownHeaders = 8

The Server header received by HTTP clients.

const QNetworkRequest__SetCookieHeader QNetworkRequest__KnownHeaders = 5

Corresponds to the HTTP Set-Cookie header and contains a QList<QNetworkCookie> representing the cookies sent by the server to be stored locally.

const QNetworkRequest__UserAgentHeader QNetworkRequest__KnownHeaders = 7

The User-Agent header sent by HTTP clients.

type QNetworkRequest__LoadControl

type QNetworkRequest__LoadControl = int

Indicates if an aspect of the request's loading mechanism has been manually overridden, e.g. by Qt WebKit.

This enum was introduced or modified in Qt 4.7.

const QNetworkRequest__Automatic QNetworkRequest__LoadControl = 0

default value: indicates default behaviour.

const QNetworkRequest__Manual QNetworkRequest__LoadControl = 1

indicates behaviour has been manually overridden.

type QNetworkRequest__Priority

type QNetworkRequest__Priority = int

This enum lists the possible network request priorities.

This enum was introduced or modified in Qt 4.7.

const QNetworkRequest__HighPriority QNetworkRequest__Priority = 1

High priority

const QNetworkRequest__LowPriority QNetworkRequest__Priority = 5

Low priority

const QNetworkRequest__NormalPriority QNetworkRequest__Priority = 3

Normal priority

type QNetworkRequest__RedirectPolicy

type QNetworkRequest__RedirectPolicy = int

Indicates whether the Network Access API should automatically follow a HTTP redirect response or not.

This enum was introduced or modified in Qt 5.9.

const QNetworkRequest__ManualRedirectPolicy QNetworkRequest__RedirectPolicy = 0

Default value: not following any redirects.

const QNetworkRequest__NoLessSafeRedirectPolicy QNetworkRequest__RedirectPolicy = 1

Only "http"->"http", "http" -> "https" or "https" -> "https" redirects are allowed. Equivalent to setting the old FollowRedirectsAttribute to true

const QNetworkRequest__SameOriginRedirectPolicy QNetworkRequest__RedirectPolicy = 2
const QNetworkRequest__UserVerifiedRedirectPolicy QNetworkRequest__RedirectPolicy = 3

Client decides whether to follow each redirect by handling the redirected() signal, emitting redirectAllowed() on the QNetworkReply object to allow the redirect or aborting/finishing it to reject the redirect. This can be used, for example, to ask the user whether to accept the redirect, or to decide based on some app-specific configuration.

type QNetworkSession

type QNetworkSession struct {
	*qtcore.QObject
}

func NewQNetworkSession

func NewQNetworkSession(connConfig QNetworkConfiguration_ITF, parent qtcore.QObject_ITF) *QNetworkSession

func NewQNetworkSessionFromPointer

func NewQNetworkSessionFromPointer(cthis unsafe.Pointer) *QNetworkSession

func NewQNetworkSessionp

func NewQNetworkSessionp(connConfig QNetworkConfiguration_ITF) *QNetworkSession

func (*QNetworkSession) Accept

func (this *QNetworkSession) Accept()

Instructs the session to permanently accept the new access point. Once this function has been called the session may not return to the old access point.

The old access point may be closed in the process if there are no other network sessions for it. Therefore any open socket that still uses the old access point may become unusable and should be closed before completing the migration.

func (*QNetworkSession) ActiveTime

func (this *QNetworkSession) ActiveTime() uint64

Returns the number of seconds that the session has been active.

func (*QNetworkSession) BytesReceived

func (this *QNetworkSession) BytesReceived() uint64

Returns the amount of data received in bytes; otherwise 0.

This field value includes the usage across all open network sessions which use the same network interface.

If the session is based on a service network configuration the number of sent bytes across all active member configurations are returned.

This function may not always be supported on all platforms and returns 0. The platform capability can be detected via QNetworkConfigurationManager::DataStatistics.

Note: On some platforms this function may run the main event loop.

func (*QNetworkSession) BytesWritten

func (this *QNetworkSession) BytesWritten() uint64

Returns the amount of data sent in bytes; otherwise 0.

This field value includes the usage across all open network sessions which use the same network interface.

If the session is based on a service network configuration the number of sent bytes across all active member configurations are returned.

This function may not always be supported on all platforms and returns 0. The platform capability can be detected via QNetworkConfigurationManager::DataStatistics.

Note: On some platforms this function may run the main event loop.

func (*QNetworkSession) Close

func (this *QNetworkSession) Close()

Decreases the session counter on the associated network configuration. If the session counter reaches zero the active network interface is shut down. This also means that state() will only change from Connected to Disconnected if the current session was the last open session.

If the platform does not support out-of-process sessions calling this function does not stop the interface. In this case stop() has to be used to force a shut down. The platform capabilities can be detected via QNetworkConfigurationManager::capabilities().

Note that this call is asynchronous. Depending on the outcome of this call the results can be enquired by connecting to the stateChanged(), opened() or error() signals.

See also open(), stop(), and isOpen().

func (*QNetworkSession) Closed

func (this *QNetworkSession) Closed()

This signal is emitted when the network session has been closed.

func (*QNetworkSession) Configuration

func (this *QNetworkSession) Configuration() *QNetworkConfiguration

Returns the QNetworkConfiguration that this network session object is based on.

See also QNetworkConfiguration.

func (*QNetworkSession) ConnectNotify

func (this *QNetworkSession) ConnectNotify(signal qtcore.QMetaMethod_ITF)

func (*QNetworkSession) DisconnectNotify

func (this *QNetworkSession) DisconnectNotify(signal qtcore.QMetaMethod_ITF)

func (*QNetworkSession) Error

func (this *QNetworkSession) Error() int

Returns the type of error that last occurred.

See also state() and errorString().

func (*QNetworkSession) Error1

func (this *QNetworkSession) Error1(arg0 int)

Returns the type of error that last occurred.

See also state() and errorString().

func (*QNetworkSession) ErrorString

func (this *QNetworkSession) ErrorString() string

Returns a human-readable description of the last device error that occurred.

See also error().

func (*QNetworkSession) GetCthis

func (this *QNetworkSession) GetCthis() unsafe.Pointer

func (*QNetworkSession) Ignore

func (this *QNetworkSession) Ignore()

This function indicates that the application does not wish to roam the session.

See also migrate().

func (*QNetworkSession) InheritConnectNotify

func (this *QNetworkSession) InheritConnectNotify(f func(signal *qtcore.QMetaMethod))

void connectNotify(const QMetaMethod &)

func (*QNetworkSession) InheritDisconnectNotify

func (this *QNetworkSession) InheritDisconnectNotify(f func(signal *qtcore.QMetaMethod))

void disconnectNotify(const QMetaMethod &)

func (*QNetworkSession) Interface

func (this *QNetworkSession) Interface() *QNetworkInterface

Returns the network interface that is used by this session.

This function only returns a valid QNetworkInterface when this session is Connected.

The returned interface may change as a result of a roaming process.

See also state().

func (*QNetworkSession) IsOpen

func (this *QNetworkSession) IsOpen() bool

Returns true if this session is open. If the number of all open sessions is greater than zero the underlying network interface will remain connected/up.

The session can be controlled via open() and close().

func (*QNetworkSession) MetaObject

func (this *QNetworkSession) MetaObject() *qtcore.QMetaObject

func (*QNetworkSession) Migrate

func (this *QNetworkSession) Migrate()

Instructs the session to roam to the new access point. The old access point remains active until the application calls accept().

The newConfigurationActivated() signal is emitted once roaming has been completed.

See also accept().

func (*QNetworkSession) NewConfigurationActivated

func (this *QNetworkSession) NewConfigurationActivated()

This signal is emitted once the session has roamed to the new access point. The application may reopen its socket and test the suitability of the new network link. Subsequently it must either accept() or reject() the new access point.

See also accept() and reject().

func (*QNetworkSession) NewForInherit

func (*QNetworkSession) NewForInherit(connConfig QNetworkConfiguration_ITF, parent qtcore.QObject_ITF) *QNetworkSession

Constructs a session based on connectionConfig with the given parent.

See also QNetworkConfiguration.

func (*QNetworkSession) NewForInheritp

func (*QNetworkSession) NewForInheritp(connConfig QNetworkConfiguration_ITF) *QNetworkSession

Constructs a session based on connectionConfig with the given parent.

See also QNetworkConfiguration.

func (*QNetworkSession) NewFromPointer

func (*QNetworkSession) NewFromPointer(cthis unsafe.Pointer) *QNetworkSession

func (*QNetworkSession) Open

func (this *QNetworkSession) Open()

Creates an open session which increases the session counter on the underlying network interface. The system will not terminate a network interface until the session reference counter reaches zero. Therefore an open session allows an application to register its use of the interface.

As a result of calling open() the interface will be started if it is not connected/up yet. Some platforms may not provide support for out-of-process sessions. On such platforms the session counter ignores any sessions held by another process. The platform capabilities can be detected via QNetworkConfigurationManager::capabilities().

Note that this call is asynchronous. Depending on the outcome of this call the results can be enquired by connecting to the stateChanged(), opened() or error() signals.

It is not a requirement to open a session in order to monitor the underlying network interface.

See also close(), stop(), and isOpen().

func (*QNetworkSession) Opened

func (this *QNetworkSession) Opened()

This signal is emitted when the network session has been opened.

The underlying network interface will not be shut down as long as the session remains open. Note that this feature is dependent on system wide session support.

func (*QNetworkSession) PreferredConfigurationChanged

func (this *QNetworkSession) PreferredConfigurationChanged(config QNetworkConfiguration_ITF, isSeamless bool)

This signal is emitted when the preferred configuration/access point for the session changes. Only sessions which are based on service network configurations may emit this signal. config can be used to determine access point specific details such as proxy settings and isSeamless indicates whether roaming will break the sessions IP address.

As a consequence to this signal the application must either start the roaming process by calling migrate() or choose to ignore() the new access point.

If the roaming process is non-seamless the IP address will change which means that a socket becomes invalid. However seamless mobility can ensure that the local IP address does not change. This is achieved by using a virtual IP address which is bound to the actual link address. During the roaming process the virtual address is attached to the new link address.

Some platforms may support the concept of Forced Roaming and Application Level Roaming (ALR). Forced roaming implies that the platform may simply roam to a new configuration without consulting applications. It is up to the application to detect the link layer loss and reestablish its sockets. In contrast ALR provides the opportunity to prevent the system from roaming. If this session is based on a configuration that supports roaming the application can choose whether it wants to be consulted (ALR use case) by connecting to this signal. For as long as this signal connection remains the session remains registered as a roaming stakeholder; otherwise roaming will be enforced by the platform.

See also migrate(), ignore(), and QNetworkConfiguration::isRoamingAvailable().

func (*QNetworkSession) QNetworkSession_PTR

func (ptr *QNetworkSession) QNetworkSession_PTR() *QNetworkSession

func (*QNetworkSession) Reject

func (this *QNetworkSession) Reject()

The new access point is not suitable for the application. By calling this function the session returns to the previous access point/configuration. This action may invalidate any socket that has been created via the not desired access point.

See also accept().

func (*QNetworkSession) SessionErrorItemName

func (this *QNetworkSession) SessionErrorItemName(val int) string

func (*QNetworkSession) SessionProperty

func (this *QNetworkSession) SessionProperty(key string) *qtcore.QVariant

Returns the value for property key.

A network session can have properties attached which may describe the session in more details. This function can be used to gain access to those properties.

The following property keys are guaranteed to be specified on all platforms:

KeyDescription

ActiveConfigurationIf the session isOpen() this property returns the identifier of the QNetworkConfiguration that is used by this session; otherwise an empty string.The main purpose of this key is to determine which Internet access point is used if the session is based on a ServiceNetwork. The following code snippet highlights the difference:

QNetworkConfigurationManager mgr;
QNetworkConfiguration ap = mgr.defaultConfiguration();
QNetworkSession *session = new QNetworkSession(ap);
... //code activates session

QString ident = session->sessionProperty("ActiveConfiguration").toString();
if ( ap.type() == QNetworkConfiguration::ServiceNetwork ) {
    Q_ASSERT( ap.identifier() != ident );
    Q_ASSERT( ap.children().contains( mgr.configurationFromIdentifier(ident) ) );
} else if ( ap.type() == QNetworkConfiguration::InternetAccessPoint ) {
    Q_ASSERT( ap.identifier() == ident );
}
            \endcode

UserChoiceConfigurationIf the session isOpen() and is bound to a QNetworkConfiguration of type UserChoice, this property returns the identifier of the QNetworkConfiguration that the configuration resolved to when open() was called; otherwise an empty string.The purpose of this key is to determine the real QNetworkConfiguration that the session is using. This key is different from ActiveConfiguration in that this key may return an identifier for either a service network or a Internet access points configurations, whereas ActiveConfiguration always returns identifiers to Internet access points configurations.

ConnectInBackgroundSetting this property to true before calling open() implies that the connection attempt is made but if no connection can be established, the user is not connsulted and asked to select a suitable connection. This property is not set by default and support for it depends on the platform. AutoCloseSessionTimeoutIf the session requires polling to keep its state up to date, this property holds the timeout in milliseconds before the session will automatically close. If the value of this property is -1 the session will not automatically close. This property is set to -1 by default.The purpose of this property is to minimize resource use on platforms that use polling to update the state of the session. Applications can set the value of this property to the desired timeout before the session is closed. In response to the closed() signal the network session should be deleted to ensure that all polling is stopped. The session can then be recreated once it is required again. This property has no effect for sessions that do not require polling.

See also setSessionProperty().

func (*QNetworkSession) SetCthis

func (this *QNetworkSession) SetCthis(cthis unsafe.Pointer)

func (*QNetworkSession) SetSessionProperty

func (this *QNetworkSession) SetSessionProperty(key string, value qtcore.QVariant_ITF)

Sets the property value on the session. The property is identified using key. Removing an already set property can be achieved by passing an invalid QVariant.

Note that the UserChoiceConfiguration and ActiveConfiguration properties are read only and cannot be changed using this method.

See also sessionProperty().

func (*QNetworkSession) State

func (this *QNetworkSession) State() int

Returns the state of the session.

If the session is based on a single access point configuration the state of the session is the same as the state of the associated network interface. Therefore a network session object can be used to monitor network interfaces.

A QNetworkConfiguration::ServiceNetwork based session summarizes the state of all its children and therefore returns the Connected state if at least one of the service network's children() configurations is active.

Note that it is not required to hold an open session in order to obtain the network interface state. A connected but closed session may be used to monitor network interfaces whereas an open and connected session object may prevent the network interface from being shut down.

See also error() and stateChanged().

func (*QNetworkSession) StateChanged

func (this *QNetworkSession) StateChanged(arg0 int)

This signal is emitted whenever the state of the network session changes. The state parameter is the new state.

See also state().

func (*QNetworkSession) StateItemName

func (this *QNetworkSession) StateItemName(val int) string

func (*QNetworkSession) Stop

func (this *QNetworkSession) Stop()

Invalidates all open sessions against the network interface and therefore stops the underlying network interface. This function always changes the session's state() flag to Disconnected.

See also open() and close().

func (*QNetworkSession) UsagePolicies

func (this *QNetworkSession) UsagePolicies() int

Returns the network usage policies currently in force by the system.

func (*QNetworkSession) UsagePoliciesChanged

func (this *QNetworkSession) UsagePoliciesChanged(usagePolicies int)

This signal is emitted when the usagePolicies in force are changed by the system.

This function was introduced in Qt 5.0.

func (*QNetworkSession) UsagePolicyItemName

func (this *QNetworkSession) UsagePolicyItemName(val int) string

func (*QNetworkSession) WaitForOpened

func (this *QNetworkSession) WaitForOpened(msecs int) bool

Waits until the session has been opened, up to msecs milliseconds. If the session has been opened, this function returns true; otherwise it returns false. 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 the session to be opened:

session->open();
if (session->waitForOpened(1000))
    qDebug("Open!");

If msecs is -1, this function will not time out.

See also open() and error().

func (*QNetworkSession) WaitForOpenedp

func (this *QNetworkSession) WaitForOpenedp() bool

Waits until the session has been opened, up to msecs milliseconds. If the session has been opened, this function returns true; otherwise it returns false. 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 the session to be opened:

session->open();
if (session->waitForOpened(1000))
    qDebug("Open!");

If msecs is -1, this function will not time out.

See also open() and error().

type QNetworkSession_ITF

type QNetworkSession_ITF interface {
	qtcore.QObject_ITF
	QNetworkSession_PTR() *QNetworkSession
}

type QNetworkSession__SessionError

type QNetworkSession__SessionError = int

This enum describes the session errors that can occur.

const QNetworkSession__InvalidConfigurationError QNetworkSession__SessionError = 4

The operation cannot currently be performed for the current configuration.

const QNetworkSession__OperationNotSupportedError QNetworkSession__SessionError = 3

The operation is not supported for current configuration.

const QNetworkSession__RoamingError QNetworkSession__SessionError = 2

The session cannot roam to a new configuration.

const QNetworkSession__SessionAbortedError QNetworkSession__SessionError = 1

The session was aborted by the user or system.

const QNetworkSession__UnknownSessionError QNetworkSession__SessionError = 0

An unidentified error occurred.

type QNetworkSession__State

type QNetworkSession__State = int

This enum describes the connectivity state of the session. If the session is based on a single access point configuration the state of the session is the same as the state of the associated network interface.

const QNetworkSession__Closing QNetworkSession__State = 4

The network session is in the process of being shut down.

const QNetworkSession__Connected QNetworkSession__State = 3

The network session is connected. If the current process wishes to use this session it has to register its interest by calling open(). A network session is considered to be ready for socket operations if it isOpen() and connected.

const QNetworkSession__Connecting QNetworkSession__State = 2

The network session is being established.

const QNetworkSession__Disconnected QNetworkSession__State = 5

The network session is not connected. The associated QNetworkConfiguration has the state QNetworkConfiguration::Discovered.

const QNetworkSession__Invalid QNetworkSession__State = 0

The session is invalid due to an invalid configuration. This may happen due to a removed access point or a configuration that was invalid to begin with.

const QNetworkSession__NotAvailable QNetworkSession__State = 1

The session is based on a defined but not yet discovered QNetworkConfiguration (see QNetworkConfiguration::StateFlag).

const QNetworkSession__Roaming QNetworkSession__State = 6

The network session is roaming from one access point to another access point.

type QNetworkSession__UsagePolicy

type QNetworkSession__UsagePolicy = int
const QNetworkSession__NoBackgroundTrafficPolicy QNetworkSession__UsagePolicy = 1
const QNetworkSession__NoPolicy QNetworkSession__UsagePolicy = 0

type QSslCertificate

type QSslCertificate struct {
	*qtrt.CObject
}

func NewQSslCertificate

func NewQSslCertificate(device qtcore.QIODevice_ITF, format int) *QSslCertificate

func NewQSslCertificate1

func NewQSslCertificate1(data qtcore.QByteArray_ITF, format int) *QSslCertificate

func NewQSslCertificate1p

func NewQSslCertificate1p() *QSslCertificate

func NewQSslCertificate1p1

func NewQSslCertificate1p1(data qtcore.QByteArray_ITF) *QSslCertificate

func NewQSslCertificateFromPointer

func NewQSslCertificateFromPointer(cthis unsafe.Pointer) *QSslCertificate

func NewQSslCertificatep

func NewQSslCertificatep(device qtcore.QIODevice_ITF) *QSslCertificate

func (*QSslCertificate) Clear

func (this *QSslCertificate) Clear()

Clears the contents of this certificate, making it a null certificate.

See also isNull().

func (*QSslCertificate) Digest

func (this *QSslCertificate) Digest(algorithm int) *qtcore.QByteArray

Returns a cryptographic digest of this certificate. By default, an MD5 digest will be generated, but you can also specify a custom algorithm.

func (*QSslCertificate) Digestp

func (this *QSslCertificate) Digestp() *qtcore.QByteArray

Returns a cryptographic digest of this certificate. By default, an MD5 digest will be generated, but you can also specify a custom algorithm.

func (*QSslCertificate) EffectiveDate

func (this *QSslCertificate) EffectiveDate() *qtcore.QDateTime

Returns the date-time that the certificate becomes valid, or an empty QDateTime if this is a null certificate.

See also expiryDate().

func (*QSslCertificate) ExpiryDate

func (this *QSslCertificate) ExpiryDate() *qtcore.QDateTime

Returns the date-time that the certificate expires, or an empty QDateTime if this is a null certificate.

See also effectiveDate().

func (*QSslCertificate) GetCthis

func (this *QSslCertificate) GetCthis() unsafe.Pointer

func (*QSslCertificate) Handle

func (this *QSslCertificate) Handle() int

Returns a pointer to the native certificate handle, if there is one, or a null pointer otherwise.

You can use this handle, together with the native API, to access extended information about the certificate.

Warning: Use of this function has a high probability of being non-portable, and its return value may vary from platform to platform or change from minor release to minor release.

func (*QSslCertificate) IsBlacklisted

func (this *QSslCertificate) IsBlacklisted() bool

Returns true if this certificate is blacklisted; otherwise returns false.

See also isNull().

func (*QSslCertificate) IsNull

func (this *QSslCertificate) IsNull() bool

Returns true if this is a null certificate (i.e., a certificate with no contents); otherwise returns false.

By default, QSslCertificate constructs a null certificate.

See also clear().

func (*QSslCertificate) IsSelfSigned

func (this *QSslCertificate) IsSelfSigned() bool

Returns true if this certificate is self signed; otherwise returns false.

A certificate is considered self-signed its issuer and subject are identical.

This function was introduced in Qt 5.4.

func (*QSslCertificate) IssuerDisplayName

func (this *QSslCertificate) IssuerDisplayName() string

Returns a name that describes the issuer. It returns the QSslCertificate::CommonName if available, otherwise falls back to the first QSslCertificate::Organization or the first QSslCertificate::OrganizationalUnitName.

This function was introduced in Qt 5.12.

See also issuerInfo().

func (*QSslCertificate) IssuerInfo

func (this *QSslCertificate) IssuerInfo(info int) *qtcore.QStringList

Returns the issuer information for the subject from the certificate, or an empty list if there is no information for subject in the certificate. There can be more than one entry of each type.

See also subjectInfo().

func (*QSslCertificate) IssuerInfo1

func (this *QSslCertificate) IssuerInfo1(attribute qtcore.QByteArray_ITF) *qtcore.QStringList

Returns the issuer information for the subject from the certificate, or an empty list if there is no information for subject in the certificate. There can be more than one entry of each type.

See also subjectInfo().

func (*QSslCertificate) NewForInherit

func (*QSslCertificate) NewForInherit(device qtcore.QIODevice_ITF, format int) *QSslCertificate

Constructs a QSslCertificate by reading format encoded data from device and using the first certificate found. You can later call isNull() to see if device contained a certificate, and if this certificate was loaded successfully.

func (*QSslCertificate) NewForInherit1

func (*QSslCertificate) NewForInherit1(data qtcore.QByteArray_ITF, format int) *QSslCertificate

Constructs a QSslCertificate by reading format encoded data from device and using the first certificate found. You can later call isNull() to see if device contained a certificate, and if this certificate was loaded successfully.

func (*QSslCertificate) NewForInherit1p

func (*QSslCertificate) NewForInherit1p() *QSslCertificate

Constructs a QSslCertificate by reading format encoded data from device and using the first certificate found. You can later call isNull() to see if device contained a certificate, and if this certificate was loaded successfully.

func (*QSslCertificate) NewForInherit1p1

func (*QSslCertificate) NewForInherit1p1(data qtcore.QByteArray_ITF) *QSslCertificate

Constructs a QSslCertificate by reading format encoded data from device and using the first certificate found. You can later call isNull() to see if device contained a certificate, and if this certificate was loaded successfully.

func (*QSslCertificate) NewForInheritp

func (*QSslCertificate) NewForInheritp(device qtcore.QIODevice_ITF) *QSslCertificate

Constructs a QSslCertificate by reading format encoded data from device and using the first certificate found. You can later call isNull() to see if device contained a certificate, and if this certificate was loaded successfully.

func (*QSslCertificate) NewFromPointer

func (*QSslCertificate) NewFromPointer(cthis unsafe.Pointer) *QSslCertificate

func (*QSslCertificate) Operator_equal

func (this *QSslCertificate) Operator_equal(other unsafe.Pointer) *QSslCertificate

func (*QSslCertificate) Operator_equal1

func (this *QSslCertificate) Operator_equal1(other QSslCertificate_ITF) *QSslCertificate

func (*QSslCertificate) Operator_equal_equal

func (this *QSslCertificate) Operator_equal_equal(other QSslCertificate_ITF) bool

func (*QSslCertificate) Operator_not_equal

func (this *QSslCertificate) Operator_not_equal(other QSslCertificate_ITF) bool

func (*QSslCertificate) PublicKey

func (this *QSslCertificate) PublicKey() *QSslKey

Returns the certificate subject's public key.

func (*QSslCertificate) QSslCertificate_PTR

func (ptr *QSslCertificate) QSslCertificate_PTR() *QSslCertificate

func (*QSslCertificate) SerialNumber

func (this *QSslCertificate) SerialNumber() *qtcore.QByteArray

Returns the certificate's serial number string in hexadecimal format.

func (*QSslCertificate) SetCthis

func (this *QSslCertificate) SetCthis(cthis unsafe.Pointer)

func (*QSslCertificate) SubjectDisplayName

func (this *QSslCertificate) SubjectDisplayName() string

Returns a name that describes the subject. It returns the QSslCertificate::CommonName if available, otherwise falls back to the first QSslCertificate::Organization or the first QSslCertificate::OrganizationalUnitName.

This function was introduced in Qt 5.12.

See also subjectInfo().

func (*QSslCertificate) SubjectInfo

func (this *QSslCertificate) SubjectInfo(info int) *qtcore.QStringList

Returns the information for the subject, or an empty list if there is no information for subject in the certificate. There can be more than one entry of each type.

See also issuerInfo().

func (*QSslCertificate) SubjectInfo1

func (this *QSslCertificate) SubjectInfo1(attribute qtcore.QByteArray_ITF) *qtcore.QStringList

Returns the information for the subject, or an empty list if there is no information for subject in the certificate. There can be more than one entry of each type.

See also issuerInfo().

func (*QSslCertificate) SubjectInfoItemName

func (this *QSslCertificate) SubjectInfoItemName(val int) string

func (*QSslCertificate) Swap

func (this *QSslCertificate) Swap(other QSslCertificate_ITF)

Swaps this certificate instance with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

func (*QSslCertificate) ToDer

func (this *QSslCertificate) ToDer() *qtcore.QByteArray

Returns this certificate converted to a DER (binary) encoded representation.

func (*QSslCertificate) ToPem

func (this *QSslCertificate) ToPem() *qtcore.QByteArray

Returns this certificate converted to a PEM (Base64) encoded representation.

func (*QSslCertificate) ToText

func (this *QSslCertificate) ToText() string

Returns this certificate converted to a human-readable text representation.

This function was introduced in Qt 5.0.

func (*QSslCertificate) Version

func (this *QSslCertificate) Version() *qtcore.QByteArray

Returns the certificate's version string.

type QSslCertificateExtension

type QSslCertificateExtension struct {
	*qtrt.CObject
}

func NewQSslCertificateExtension

func NewQSslCertificateExtension() *QSslCertificateExtension

func NewQSslCertificateExtensionFromPointer

func NewQSslCertificateExtensionFromPointer(cthis unsafe.Pointer) *QSslCertificateExtension

func (*QSslCertificateExtension) GetCthis

func (this *QSslCertificateExtension) GetCthis() unsafe.Pointer

func (*QSslCertificateExtension) IsCritical

func (this *QSslCertificateExtension) IsCritical() bool

Returns the criticality of the extension.

func (*QSslCertificateExtension) IsSupported

func (this *QSslCertificateExtension) IsSupported() bool

Returns the true if this extension is supported. In this case, supported simply means that the structure of the QVariant returned by the value() accessor will remain unchanged between versions. Unsupported extensions can be freely used, however there is no guarantee that the returned data will have the same structure between versions.

func (*QSslCertificateExtension) Name

func (this *QSslCertificateExtension) Name() string

Returns the name of the extension. If no name is known for the extension then the OID will be returned.

func (*QSslCertificateExtension) NewForInherit

Constructs a QSslCertificateExtension.

func (*QSslCertificateExtension) NewFromPointer

func (*QSslCertificateExtension) Oid

func (this *QSslCertificateExtension) Oid() string

Returns the ASN.1 OID of this extension.

func (*QSslCertificateExtension) Operator_equal

func (this *QSslCertificateExtension) Operator_equal(other unsafe.Pointer) *QSslCertificateExtension

func (*QSslCertificateExtension) Operator_equal1

func (*QSslCertificateExtension) QSslCertificateExtension_PTR

func (ptr *QSslCertificateExtension) QSslCertificateExtension_PTR() *QSslCertificateExtension

func (*QSslCertificateExtension) SetCthis

func (this *QSslCertificateExtension) SetCthis(cthis unsafe.Pointer)

func (*QSslCertificateExtension) Swap

Swaps this certificate extension instance with other. This function is very fast and never fails.

func (*QSslCertificateExtension) Value

func (this *QSslCertificateExtension) Value() *qtcore.QVariant

Returns the value of the extension. The structure of the value returned depends on the extension type.

type QSslCertificateExtension_ITF

type QSslCertificateExtension_ITF interface {
	QSslCertificateExtension_PTR() *QSslCertificateExtension
}

type QSslCertificate_ITF

type QSslCertificate_ITF interface {
	QSslCertificate_PTR() *QSslCertificate
}

type QSslCertificate__SubjectInfo

type QSslCertificate__SubjectInfo = int

Describes keys that you can pass to QSslCertificate::issuerInfo() or QSslCertificate::subjectInfo() to get information about the certificate issuer or subject.

const QSslCertificate__CommonName QSslCertificate__SubjectInfo = 1

"CN" The common name; most often this is used to store the host name.

const QSslCertificate__CountryName QSslCertificate__SubjectInfo = 4

"C" The country.

const QSslCertificate__DistinguishedNameQualifier QSslCertificate__SubjectInfo = 6

The distinguished name qualifier

const QSslCertificate__EmailAddress QSslCertificate__SubjectInfo = 8

The email address associated with the certificate

const QSslCertificate__LocalityName QSslCertificate__SubjectInfo = 2

"L" The locality.

const QSslCertificate__Organization QSslCertificate__SubjectInfo = 0

"O" The name of the organization.

const QSslCertificate__OrganizationalUnitName QSslCertificate__SubjectInfo = 3

"OU" The organizational unit name.

const QSslCertificate__SerialNumber QSslCertificate__SubjectInfo = 7

The certificate's serial number

const QSslCertificate__StateOrProvinceName QSslCertificate__SubjectInfo = 5

"ST" The state or province.

type QSslCipher

type QSslCipher struct {
	*qtrt.CObject
}

func NewQSslCipher

func NewQSslCipher() *QSslCipher

func NewQSslCipher1

func NewQSslCipher1(name string) *QSslCipher

func NewQSslCipher2

func NewQSslCipher2(name string, protocol int) *QSslCipher

func NewQSslCipherFromPointer

func NewQSslCipherFromPointer(cthis unsafe.Pointer) *QSslCipher

func (*QSslCipher) AuthenticationMethod

func (this *QSslCipher) AuthenticationMethod() string

Returns the cipher's authentication method as a QString.

func (*QSslCipher) EncryptionMethod

func (this *QSslCipher) EncryptionMethod() string

Returns the cipher's encryption method as a QString.

func (*QSslCipher) GetCthis

func (this *QSslCipher) GetCthis() unsafe.Pointer

func (*QSslCipher) IsNull

func (this *QSslCipher) IsNull() bool

Returns true if this is a null cipher; otherwise returns false.

func (*QSslCipher) KeyExchangeMethod

func (this *QSslCipher) KeyExchangeMethod() string

Returns the cipher's key exchange method as a QString.

func (*QSslCipher) Name

func (this *QSslCipher) Name() string

Returns the name of the cipher, or an empty QString if this is a null cipher.

See also isNull().

func (*QSslCipher) NewForInherit

func (*QSslCipher) NewForInherit() *QSslCipher

Constructs an empty QSslCipher object.

func (*QSslCipher) NewForInherit1

func (*QSslCipher) NewForInherit1(name string) *QSslCipher

Constructs an empty QSslCipher object.

func (*QSslCipher) NewForInherit2

func (*QSslCipher) NewForInherit2(name string, protocol int) *QSslCipher

Constructs an empty QSslCipher object.

func (*QSslCipher) NewFromPointer

func (*QSslCipher) NewFromPointer(cthis unsafe.Pointer) *QSslCipher

func (*QSslCipher) Operator_equal

func (this *QSslCipher) Operator_equal(other unsafe.Pointer) *QSslCipher

func (*QSslCipher) Operator_equal1

func (this *QSslCipher) Operator_equal1(other QSslCipher_ITF) *QSslCipher

func (*QSslCipher) Operator_equal_equal

func (this *QSslCipher) Operator_equal_equal(other QSslCipher_ITF) bool

func (*QSslCipher) Operator_not_equal

func (this *QSslCipher) Operator_not_equal(other QSslCipher_ITF) bool

func (*QSslCipher) Protocol

func (this *QSslCipher) Protocol() int

Returns the cipher's protocol type, or QSsl::UnknownProtocol if QSslCipher is unable to determine the protocol (protocolString() may contain more information).

See also protocolString().

func (*QSslCipher) ProtocolString

func (this *QSslCipher) ProtocolString() string

Returns the cipher's protocol as a QString.

See also protocol().

func (*QSslCipher) QSslCipher_PTR

func (ptr *QSslCipher) QSslCipher_PTR() *QSslCipher

func (*QSslCipher) SetCthis

func (this *QSslCipher) SetCthis(cthis unsafe.Pointer)

func (*QSslCipher) SupportedBits

func (this *QSslCipher) SupportedBits() int

Returns the number of bits supported by the cipher.

See also usedBits().

func (*QSslCipher) Swap

func (this *QSslCipher) Swap(other QSslCipher_ITF)

Swaps this cipher instance with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

func (*QSslCipher) UsedBits

func (this *QSslCipher) UsedBits() int

Returns the number of bits used by the cipher.

See also supportedBits().

type QSslCipher_ITF

type QSslCipher_ITF interface {
	QSslCipher_PTR() *QSslCipher
}

type QSslConfiguration

type QSslConfiguration struct {
	*qtrt.CObject
}

func NewQSslConfiguration

func NewQSslConfiguration() *QSslConfiguration

func NewQSslConfigurationFromPointer

func NewQSslConfigurationFromPointer(cthis unsafe.Pointer) *QSslConfiguration

func QSslConfiguration_DefaultConfiguration

func QSslConfiguration_DefaultConfiguration() *QSslConfiguration

func QSslConfiguration_DefaultDtlsConfiguration

func QSslConfiguration_DefaultDtlsConfiguration() *QSslConfiguration

func (*QSslConfiguration) DefaultConfiguration

func (this *QSslConfiguration) DefaultConfiguration() *QSslConfiguration

Returns the default SSL configuration to be used in new SSL connections.

The default SSL configuration consists of:

no local certificate and no private key protocol SecureProtocols the system's default CA certificate list the cipher list equal to the list of the SSL libraries' supported SSL ciphers that are 128 bits or more

See also QSslSocket::supportedCiphers() and setDefaultConfiguration().

func (*QSslConfiguration) DefaultDtlsConfiguration

func (this *QSslConfiguration) DefaultDtlsConfiguration() *QSslConfiguration

Returns the default DTLS configuration to be used in new DTLS connections.

The default DTLS configuration consists of:

no local certificate and no private key protocol DtlsV1_2OrLater the system's default CA certificate list the cipher list equal to the list of the SSL libraries' supported TLS 1.2 ciphers that use 128 or more secret bits for the cipher.

See also setDefaultDtlsConfiguration().

func (*QSslConfiguration) DiffieHellmanParameters

func (this *QSslConfiguration) DiffieHellmanParameters() *QSslDiffieHellmanParameters

Retrieves the current set of Diffie-Hellman parameters.

If no Diffie-Hellman parameters have been set, the QSslConfiguration object defaults to using the 1024-bit MODP group from RFC 2409.

This function was introduced in Qt 5.8.

See also setDiffieHellmanParameters().

func (*QSslConfiguration) DtlsCookieVerificationEnabled

func (this *QSslConfiguration) DtlsCookieVerificationEnabled() bool

This function returns true if DTLS cookie verification was enabled on a server-side socket.

See also setDtlsCookieVerificationEnabled().

func (*QSslConfiguration) EphemeralServerKey

func (this *QSslConfiguration) EphemeralServerKey() *QSslKey

Returns the ephemeral server key used for cipher algorithms with forward secrecy, e.g. DHE-RSA-AES128-SHA.

The ephemeral key is only available when running in client mode, i.e. QSslSocket::SslClientMode. When running in server mode or using a cipher algorithm without forward secrecy a null key is returned. The ephemeral server key will be set before emitting the encrypted() signal.

This function was introduced in Qt 5.7.

func (*QSslConfiguration) GetCthis

func (this *QSslConfiguration) GetCthis() unsafe.Pointer

func (*QSslConfiguration) IsNull

func (this *QSslConfiguration) IsNull() bool

Returns true if this is a null QSslConfiguration object.

A QSslConfiguration object is null if it has been default-constructed and no setter methods have been called.

See also setProtocol(), setLocalCertificate(), setPrivateKey(), setCiphers(), and setCaCertificates().

func (*QSslConfiguration) LocalCertificate

func (this *QSslConfiguration) LocalCertificate() *QSslCertificate

Returns the certificate to be presented to the peer during the SSL handshake process.

See also setLocalCertificate().

func (*QSslConfiguration) NewForInherit

func (*QSslConfiguration) NewForInherit() *QSslConfiguration

Constructs an empty SSL configuration. This configuration contains no valid settings and the state will be empty. isNull() will return true after this constructor is called.

Once any setter methods are called, isNull() will return false.

func (*QSslConfiguration) NewFromPointer

func (*QSslConfiguration) NewFromPointer(cthis unsafe.Pointer) *QSslConfiguration

func (*QSslConfiguration) NextNegotiatedProtocol

func (this *QSslConfiguration) NextNegotiatedProtocol() *qtcore.QByteArray

This function returns the protocol negotiated with the server if the Next Protocol Negotiation (NPN) or Application-Layer Protocol Negotiation (ALPN) TLS extension was enabled. In order for the NPN/ALPN extension to be enabled, setAllowedNextProtocols() needs to be called explicitly before connecting to the server.

If no protocol could be negotiated or the extension was not enabled, this function returns a QByteArray which is null.

This function was introduced in Qt 5.3.

See also setAllowedNextProtocols() and nextProtocolNegotiationStatus().

func (*QSslConfiguration) NextProtocolNegotiationStatus

func (this *QSslConfiguration) NextProtocolNegotiationStatus() int

This function returns the status of the Next Protocol Negotiation (NPN) or Application-Layer Protocol Negotiation (ALPN). If the feature has not been enabled through setAllowedNextProtocols(), this function returns NextProtocolNegotiationNone. The status will be set before emitting the encrypted() signal.

This function was introduced in Qt 5.3.

See also setAllowedNextProtocols(), allowedNextProtocols(), nextNegotiatedProtocol(), and QSslConfiguration::NextProtocolNegotiationStatus.

func (*QSslConfiguration) NextProtocolNegotiationStatusItemName

func (this *QSslConfiguration) NextProtocolNegotiationStatusItemName(val int) string

func (*QSslConfiguration) Operator_equal

func (this *QSslConfiguration) Operator_equal(other unsafe.Pointer) *QSslConfiguration

func (*QSslConfiguration) Operator_equal1

func (this *QSslConfiguration) Operator_equal1(other QSslConfiguration_ITF) *QSslConfiguration

func (*QSslConfiguration) Operator_equal_equal

func (this *QSslConfiguration) Operator_equal_equal(other QSslConfiguration_ITF) bool

func (*QSslConfiguration) Operator_not_equal

func (this *QSslConfiguration) Operator_not_equal(other QSslConfiguration_ITF) bool

func (*QSslConfiguration) PeerCertificate

func (this *QSslConfiguration) PeerCertificate() *QSslCertificate

Returns the peer's digital certificate (i.e., the immediate certificate of the host you are connected to), or a null certificate, if the peer has not assigned a certificate.

The peer certificate is checked automatically during the handshake phase, so this function is normally used to fetch the certificate for display or for connection diagnostic purposes. It contains information about the peer, including its host name, the certificate issuer, and the peer's public key.

Because the peer certificate is set during the handshake phase, it is safe to access the peer certificate from a slot connected to the QSslSocket::sslErrors() signal, QNetworkReply::sslErrors() signal, or the QSslSocket::encrypted() signal.

If a null certificate is returned, it can mean the SSL handshake failed, or it can mean the host you are connected to doesn't have a certificate, or it can mean there is no connection.

If you want to check the peer's complete chain of certificates, use peerCertificateChain() to get them all at once.

See also peerCertificateChain(), QSslSocket::sslErrors(), QSslSocket::ignoreSslErrors(), QNetworkReply::sslErrors(), and QNetworkReply::ignoreSslErrors().

func (*QSslConfiguration) PeerVerifyDepth

func (this *QSslConfiguration) PeerVerifyDepth() int

Returns the maximum number of certificates in the peer's certificate chain to be checked during the SSL handshake phase, or 0 (the default) if no maximum depth has been set, indicating that the whole certificate chain should be checked.

The certificates are checked in issuing order, starting with the peer's own certificate, then its issuer's certificate, and so on.

See also setPeerVerifyDepth() and peerVerifyMode().

func (*QSslConfiguration) PeerVerifyMode

func (this *QSslConfiguration) PeerVerifyMode() int

Returns the verify mode. This mode decides whether QSslSocket should request a certificate from the peer (i.e., the client requests a certificate from the server, or a server requesting a certificate from the client), and whether it should require that this certificate is valid.

The default mode is AutoVerifyPeer, which tells QSslSocket to use VerifyPeer for clients, QueryPeer for servers.

See also setPeerVerifyMode().

func (*QSslConfiguration) PreSharedKeyIdentityHint

func (this *QSslConfiguration) PreSharedKeyIdentityHint() *qtcore.QByteArray

Returns the identity hint.

This function was introduced in Qt 5.8.

See also setPreSharedKeyIdentityHint().

func (*QSslConfiguration) PrivateKey

func (this *QSslConfiguration) PrivateKey() *QSslKey

Returns the SSL key assigned to this connection or a null key if none has been assigned yet.

See also setPrivateKey() and localCertificate().

func (*QSslConfiguration) Protocol

func (this *QSslConfiguration) Protocol() int

Returns the protocol setting for this SSL configuration.

See also setProtocol().

func (*QSslConfiguration) QSslConfiguration_PTR

func (ptr *QSslConfiguration) QSslConfiguration_PTR() *QSslConfiguration

func (*QSslConfiguration) SessionCipher

func (this *QSslConfiguration) SessionCipher() *QSslCipher

Returns the socket's cryptographic cipher, or a null cipher if the connection isn't encrypted. The socket's cipher for the session is set during the handshake phase. The cipher is used to encrypt and decrypt data transmitted through the socket.

The SSL infrastructure also provides functions for setting the ordered list of ciphers from which the handshake phase will eventually select the session cipher. This ordered list must be in place before the handshake phase begins.

See also ciphers(), setCiphers(), and QSslSocket::supportedCiphers().

func (*QSslConfiguration) SessionProtocol

func (this *QSslConfiguration) SessionProtocol() int

Returns the socket's SSL/TLS protocol or UnknownProtocol if the connection isn't encrypted. The socket's protocol for the session is set during the handshake phase.

This function was introduced in Qt 5.4.

See also protocol() and setProtocol().

func (*QSslConfiguration) SessionTicket

func (this *QSslConfiguration) SessionTicket() *qtcore.QByteArray

If QSsl::SslOptionDisableSessionPersistence was turned off, this function returns the session ticket used in the SSL handshake in ASN.1 format, suitable to e.g. be persisted to disk. If no session ticket was used or QSsl::SslOptionDisableSessionPersistence was not turned off, this function returns an empty QByteArray.

Note: When persisting the session ticket to disk or similar, be careful not to expose the session to a potential attacker, as knowledge of the session allows for eavesdropping on data encrypted with the session parameters.

This function was introduced in Qt 5.2.

See also setSessionTicket(), QSsl::SslOptionDisableSessionPersistence, and setSslOption().

func (*QSslConfiguration) SessionTicketLifeTimeHint

func (this *QSslConfiguration) SessionTicketLifeTimeHint() int

If QSsl::SslOptionDisableSessionPersistence was turned off, this function returns the session ticket life time hint sent by the server (which might be 0). If the server did not send a session ticket (e.g. when resuming a session or when the server does not support it) or QSsl::SslOptionDisableSessionPersistence was not turned off, this function returns -1.

This function was introduced in Qt 5.2.

See also sessionTicket(), QSsl::SslOptionDisableSessionPersistence, and setSslOption().

func (*QSslConfiguration) SetBackendConfigurationOption

func (this *QSslConfiguration) SetBackendConfigurationOption(name qtcore.QByteArray_ITF, value qtcore.QVariant_ITF)

Sets the option name in the backend-specific configuration to value.

Options supported by the OpenSSL (>= 1.0.2) backend are available in the supported configuration file commands documentation. The expected type for the value parameter is a QByteArray for all options. The examples show how to use some of the options.

Note: The backend-specific configuration will be applied after the general configuration. Using the backend-specific configuration to set a general configuration option again will overwrite the general configuration option.

This function was introduced in Qt 5.11.

See also backendConfiguration() and setBackendConfiguration().

func (*QSslConfiguration) SetCthis

func (this *QSslConfiguration) SetCthis(cthis unsafe.Pointer)

func (*QSslConfiguration) SetDefaultConfiguration

func (this *QSslConfiguration) SetDefaultConfiguration(configuration QSslConfiguration_ITF)

Sets the default SSL configuration to be used in new SSL connections to be configuration. Existing connections are not affected by this call.

See also QSslSocket::supportedCiphers() and defaultConfiguration().

func (*QSslConfiguration) SetDefaultDtlsConfiguration

func (this *QSslConfiguration) SetDefaultDtlsConfiguration(configuration QSslConfiguration_ITF)

Sets the default DTLS configuration to be used in new DTLS connections to be configuration. Existing connections are not affected by this call.

See also defaultDtlsConfiguration().

func (*QSslConfiguration) SetDiffieHellmanParameters

func (this *QSslConfiguration) SetDiffieHellmanParameters(dhparams QSslDiffieHellmanParameters_ITF)

Sets a custom set of Diffie-Hellman parameters to be used by this socket when functioning as a server to dhparams.

If no Diffie-Hellman parameters have been set, the QSslConfiguration object defaults to using the 1024-bit MODP group from RFC 2409.

This function was introduced in Qt 5.8.

See also diffieHellmanParameters().

func (*QSslConfiguration) SetDtlsCookieVerificationEnabled

func (this *QSslConfiguration) SetDtlsCookieVerificationEnabled(enable bool)

This function enables DTLS cookie verification when enable is true.

See also dtlsCookieVerificationEnabled().

func (*QSslConfiguration) SetLocalCertificate

func (this *QSslConfiguration) SetLocalCertificate(certificate QSslCertificate_ITF)

Sets the certificate to be presented to the peer during SSL handshake to be certificate.

Setting the certificate once the connection has been established has no effect.

A certificate is the means of identification used in the SSL process. The local certificate is used by the remote end to verify the local user's identity against its list of Certification Authorities. In most cases, such as in HTTP web browsing, only servers identify to the clients, so the client does not send a certificate.

See also localCertificate().

func (*QSslConfiguration) SetPeerVerifyDepth

func (this *QSslConfiguration) SetPeerVerifyDepth(depth int)

Sets the maximum number of certificates in the peer's certificate chain to be checked during the SSL handshake phase, to depth. Setting a depth of 0 means that no maximum depth is set, indicating that the whole certificate chain should be checked.

The certificates are checked in issuing order, starting with the peer's own certificate, then its issuer's certificate, and so on.

See also peerVerifyDepth() and setPeerVerifyMode().

func (*QSslConfiguration) SetPeerVerifyMode

func (this *QSslConfiguration) SetPeerVerifyMode(mode int)

Sets the verify mode to mode. This mode decides whether QSslSocket should request a certificate from the peer (i.e., the client requests a certificate from the server, or a server requesting a certificate from the client), and whether it should require that this certificate is valid.

The default mode is AutoVerifyPeer, which tells QSslSocket to use VerifyPeer for clients, QueryPeer for servers.

See also peerVerifyMode().

func (*QSslConfiguration) SetPreSharedKeyIdentityHint

func (this *QSslConfiguration) SetPreSharedKeyIdentityHint(hint qtcore.QByteArray_ITF)

Sets the identity hint for a preshared key authentication to hint. This will affect the next initiated handshake; calling this function on an already-encrypted socket will not affect the socket's identity hint.

The identity hint is used in QSslSocket::SslServerMode only!

This function was introduced in Qt 5.8.

See also preSharedKeyIdentityHint().

func (*QSslConfiguration) SetPrivateKey

func (this *QSslConfiguration) SetPrivateKey(key QSslKey_ITF)

Sets the connection's private key to key. The private key and the local certificate are used by clients and servers that must prove their identity to SSL peers.

Both the key and the local certificate are required if you are creating an SSL server socket. If you are creating an SSL client socket, the key and local certificate are required if your client must identify itself to an SSL server.

See also privateKey() and setLocalCertificate().

func (*QSslConfiguration) SetProtocol

func (this *QSslConfiguration) SetProtocol(protocol int)

Sets the protocol setting for this configuration to be protocol.

Setting the protocol once the connection has already been established has no effect.

See also protocol().

func (*QSslConfiguration) SetSessionTicket

func (this *QSslConfiguration) SetSessionTicket(sessionTicket qtcore.QByteArray_ITF)

Sets the session ticket to be used in an SSL handshake. QSsl::SslOptionDisableSessionPersistence must be turned off for this to work, and sessionTicket must be in ASN.1 format as returned by sessionTicket().

This function was introduced in Qt 5.2.

See also sessionTicket(), QSsl::SslOptionDisableSessionPersistence, and setSslOption().

func (*QSslConfiguration) SetSslOption

func (this *QSslConfiguration) SetSslOption(option int, on bool)

Enables or disables an SSL compatibility option. If on is true, the option is enabled. If on is false, the option is disabled.

See also testSslOption().

func (*QSslConfiguration) Swap

func (this *QSslConfiguration) Swap(other QSslConfiguration_ITF)

Swaps this SSL configuration instance with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

func (*QSslConfiguration) TestSslOption

func (this *QSslConfiguration) TestSslOption(option int) bool

Returns true if the specified SSL compatibility option is enabled.

This function was introduced in Qt 4.8.

See also setSslOption().

type QSslConfiguration_ITF

type QSslConfiguration_ITF interface {
	QSslConfiguration_PTR() *QSslConfiguration
}

type QSslConfiguration__NextProtocolNegotiationStatus

type QSslConfiguration__NextProtocolNegotiationStatus = int

Describes the status of the Next Protocol Negotiation (NPN) or Application-Layer Protocol Negotiation (ALPN).

const QSslConfiguration__NextProtocolNegotiationNegotiated QSslConfiguration__NextProtocolNegotiationStatus = 1

A next protocol has been negotiated (see nextNegotiatedProtocol()).

const QSslConfiguration__NextProtocolNegotiationNone QSslConfiguration__NextProtocolNegotiationStatus = 0

No application protocol has been negotiated (yet).

const QSslConfiguration__NextProtocolNegotiationUnsupported QSslConfiguration__NextProtocolNegotiationStatus = 2

The client and server could not agree on a common next application protocol.

type QSslDiffieHellmanParameters

type QSslDiffieHellmanParameters struct {
	*qtrt.CObject
}

func NewQSslDiffieHellmanParameters

func NewQSslDiffieHellmanParameters() *QSslDiffieHellmanParameters

func NewQSslDiffieHellmanParametersFromPointer

func NewQSslDiffieHellmanParametersFromPointer(cthis unsafe.Pointer) *QSslDiffieHellmanParameters

func QSslDiffieHellmanParameters_DefaultParameters

func QSslDiffieHellmanParameters_DefaultParameters() *QSslDiffieHellmanParameters

func QSslDiffieHellmanParameters_FromEncoded

func QSslDiffieHellmanParameters_FromEncoded(encoded qtcore.QByteArray_ITF, format int) *QSslDiffieHellmanParameters

func QSslDiffieHellmanParameters_FromEncoded1

func QSslDiffieHellmanParameters_FromEncoded1(device qtcore.QIODevice_ITF, format int) *QSslDiffieHellmanParameters

func (*QSslDiffieHellmanParameters) DefaultParameters

func (this *QSslDiffieHellmanParameters) DefaultParameters() *QSslDiffieHellmanParameters

Returns the default QSslDiffieHellmanParameters used by QSslSocket.

This is currently the 1024-bit MODP group from RFC 2459, also known as the Second Oakley Group.

func (*QSslDiffieHellmanParameters) Error

func (this *QSslDiffieHellmanParameters) Error() int

Returns the error that caused the QSslDiffieHellmanParameters object to be invalid.

func (*QSslDiffieHellmanParameters) ErrorItemName

func (this *QSslDiffieHellmanParameters) ErrorItemName(val int) string

func (*QSslDiffieHellmanParameters) ErrorString

func (this *QSslDiffieHellmanParameters) ErrorString() string

Returns a human-readable description of the error that caused the QSslDiffieHellmanParameters object to be invalid.

func (*QSslDiffieHellmanParameters) FromEncoded

Constructs a QSslDiffieHellmanParameters object using the byte array encoded in either PEM or DER form as specified by encoding.

Use the isValid() method on the returned object to check whether the Diffie-Hellman parameters were valid and loaded correctly.

See also isValid() and QSslConfiguration.

func (*QSslDiffieHellmanParameters) FromEncoded1

Constructs a QSslDiffieHellmanParameters object using the byte array encoded in either PEM or DER form as specified by encoding.

Use the isValid() method on the returned object to check whether the Diffie-Hellman parameters were valid and loaded correctly.

See also isValid() and QSslConfiguration.

func (*QSslDiffieHellmanParameters) FromEncoded1p

Constructs a QSslDiffieHellmanParameters object using the byte array encoded in either PEM or DER form as specified by encoding.

Use the isValid() method on the returned object to check whether the Diffie-Hellman parameters were valid and loaded correctly.

See also isValid() and QSslConfiguration.

func (*QSslDiffieHellmanParameters) FromEncodedp

Constructs a QSslDiffieHellmanParameters object using the byte array encoded in either PEM or DER form as specified by encoding.

Use the isValid() method on the returned object to check whether the Diffie-Hellman parameters were valid and loaded correctly.

See also isValid() and QSslConfiguration.

func (*QSslDiffieHellmanParameters) GetCthis

func (this *QSslDiffieHellmanParameters) GetCthis() unsafe.Pointer

func (*QSslDiffieHellmanParameters) IsEmpty

func (this *QSslDiffieHellmanParameters) IsEmpty() bool

Returns true if this is a an empty QSslDiffieHellmanParameters instance.

Setting an empty QSslDiffieHellmanParameters instance on a QSslSocket-based server will disable Diffie-Hellman key exchange.

func (*QSslDiffieHellmanParameters) IsValid

func (this *QSslDiffieHellmanParameters) IsValid() bool

Returns true if this is a valid QSslDiffieHellmanParameters; otherwise false.

This method should be used after constructing a QSslDiffieHellmanParameters object to determine its validity.

If a QSslDiffieHellmanParameters object is not valid, you can use the error() method to determine what error prevented the object from being constructed.

See also error().

func (*QSslDiffieHellmanParameters) NewForInherit

Constructs an empty QSslDiffieHellmanParameters instance.

If an empty QSslDiffieHellmanParameters instance is set on a QSslConfiguration object, Diffie-Hellman negotiation will be disabled.

See also isValid() and QSslConfiguration.

func (*QSslDiffieHellmanParameters) NewFromPointer

func (*QSslDiffieHellmanParameters) Operator_equal

func (*QSslDiffieHellmanParameters) Operator_equal1

func (*QSslDiffieHellmanParameters) QSslDiffieHellmanParameters_PTR

func (ptr *QSslDiffieHellmanParameters) QSslDiffieHellmanParameters_PTR() *QSslDiffieHellmanParameters

func (*QSslDiffieHellmanParameters) SetCthis

func (this *QSslDiffieHellmanParameters) SetCthis(cthis unsafe.Pointer)

func (*QSslDiffieHellmanParameters) Swap

Swaps this QSslDiffieHellmanParameters with other. This function is very fast and never fails.

type QSslDiffieHellmanParameters_ITF

type QSslDiffieHellmanParameters_ITF interface {
	QSslDiffieHellmanParameters_PTR() *QSslDiffieHellmanParameters
}

type QSslDiffieHellmanParameters__Error

type QSslDiffieHellmanParameters__Error = int

Describes a QSslDiffieHellmanParameters error.

const QSslDiffieHellmanParameters__InvalidInputDataError QSslDiffieHellmanParameters__Error = 1

The given input data could not be used to construct a QSslDiffieHellmanParameters object.

const QSslDiffieHellmanParameters__NoError QSslDiffieHellmanParameters__Error = 0

No error occurred.

const QSslDiffieHellmanParameters__UnsafeParametersError QSslDiffieHellmanParameters__Error = 2

The Diffie-Hellman parameters are unsafe and should not be used.

type QSslEllipticCurve

type QSslEllipticCurve struct {
	*qtrt.CObject
}

func NewQSslEllipticCurve

func NewQSslEllipticCurve() *QSslEllipticCurve

func NewQSslEllipticCurveFromPointer

func NewQSslEllipticCurveFromPointer(cthis unsafe.Pointer) *QSslEllipticCurve

func QSslEllipticCurve_FromLongName

func QSslEllipticCurve_FromLongName(name string) *QSslEllipticCurve

func QSslEllipticCurve_FromShortName

func QSslEllipticCurve_FromShortName(name string) *QSslEllipticCurve

func (*QSslEllipticCurve) FromLongName

func (this *QSslEllipticCurve) FromLongName(name string) *QSslEllipticCurve

Returns an QSslEllipticCurve instance representing the named curve name. The name is a long name for the curve, whose exact spelling depends on the SSL implementation.

If the given name is not supported, returns an invalid QSslEllipticCurve instance.

Note: The OpenSSL implementation of this function treats the name case-sensitively.

See also longName().

func (*QSslEllipticCurve) FromShortName

func (this *QSslEllipticCurve) FromShortName(name string) *QSslEllipticCurve

Returns an QSslEllipticCurve instance representing the named curve name. The name is the conventional short name for the curve, as represented by RFC 4492 (for instance secp521r1), or as NIST short names (for instance P-256). The actual set of recognized names depends on the SSL implementation.

If the given name is not supported, returns an invalid QSslEllipticCurve instance.

Note: The OpenSSL implementation of this function treats the name case-sensitively.

See also shortName().

func (*QSslEllipticCurve) GetCthis

func (this *QSslEllipticCurve) GetCthis() unsafe.Pointer

func (*QSslEllipticCurve) IsTlsNamedCurve

func (this *QSslEllipticCurve) IsTlsNamedCurve() bool

Returns true if this elliptic curve is one of the named curves that can be used in the key exchange when using an elliptic curve cipher with TLS; false otherwise.

func (*QSslEllipticCurve) IsValid

func (this *QSslEllipticCurve) IsValid() bool

Returns true if this elliptic curve is a valid curve, false otherwise.

func (*QSslEllipticCurve) LongName

func (this *QSslEllipticCurve) LongName() string

Returns the conventional long name for this curve. If this curve is invalid, returns an empty string.

See also shortName().

func (*QSslEllipticCurve) NewForInherit

func (*QSslEllipticCurve) NewForInherit() *QSslEllipticCurve

Constructs an invalid elliptic curve.

See also isValid() and QSslConfiguration::supportedEllipticCurves().

func (*QSslEllipticCurve) NewFromPointer

func (*QSslEllipticCurve) NewFromPointer(cthis unsafe.Pointer) *QSslEllipticCurve

func (*QSslEllipticCurve) QSslEllipticCurve_PTR

func (ptr *QSslEllipticCurve) QSslEllipticCurve_PTR() *QSslEllipticCurve

func (*QSslEllipticCurve) SetCthis

func (this *QSslEllipticCurve) SetCthis(cthis unsafe.Pointer)

func (*QSslEllipticCurve) ShortName

func (this *QSslEllipticCurve) ShortName() string

Returns the conventional short name for this curve. If this curve is invalid, returns an empty string.

See also longName().

type QSslEllipticCurve_ITF

type QSslEllipticCurve_ITF interface {
	QSslEllipticCurve_PTR() *QSslEllipticCurve
}

type QSslError

type QSslError struct {
	*qtrt.CObject
}

func NewQSslError

func NewQSslError() *QSslError

func NewQSslError1

func NewQSslError1(error int) *QSslError

func NewQSslError2

func NewQSslError2(error int, certificate QSslCertificate_ITF) *QSslError

func NewQSslErrorFromPointer

func NewQSslErrorFromPointer(cthis unsafe.Pointer) *QSslError

func (*QSslError) Certificate

func (this *QSslError) Certificate() *QSslCertificate

Returns the certificate associated with this error, or a null certificate if the error does not relate to any certificate.

See also error() and errorString().

func (*QSslError) Error

func (this *QSslError) Error() int

Returns the type of the error.

See also errorString() and certificate().

func (*QSslError) ErrorString

func (this *QSslError) ErrorString() string

Returns a short localized human-readable description of the error.

See also error() and certificate().

func (*QSslError) GetCthis

func (this *QSslError) GetCthis() unsafe.Pointer

func (*QSslError) NewForInherit

func (*QSslError) NewForInherit() *QSslError

Constructs a QSslError object with no error and default certificate.

func (*QSslError) NewForInherit1

func (*QSslError) NewForInherit1(error int) *QSslError

Constructs a QSslError object with no error and default certificate.

func (*QSslError) NewForInherit2

func (*QSslError) NewForInherit2(error int, certificate QSslCertificate_ITF) *QSslError

Constructs a QSslError object with no error and default certificate.

func (*QSslError) NewFromPointer

func (*QSslError) NewFromPointer(cthis unsafe.Pointer) *QSslError

func (*QSslError) Operator_equal

func (this *QSslError) Operator_equal(other unsafe.Pointer) *QSslError

func (*QSslError) Operator_equal1

func (this *QSslError) Operator_equal1(other QSslError_ITF) *QSslError

func (*QSslError) Operator_equal_equal

func (this *QSslError) Operator_equal_equal(other QSslError_ITF) bool

func (*QSslError) Operator_not_equal

func (this *QSslError) Operator_not_equal(other QSslError_ITF) bool

func (*QSslError) QSslError_PTR

func (ptr *QSslError) QSslError_PTR() *QSslError

func (*QSslError) SetCthis

func (this *QSslError) SetCthis(cthis unsafe.Pointer)

func (*QSslError) SslErrorItemName

func (this *QSslError) SslErrorItemName(val int) string

func (*QSslError) Swap

func (this *QSslError) Swap(other QSslError_ITF)

Swaps this error instance with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

type QSslError_ITF

type QSslError_ITF interface {
	QSslError_PTR() *QSslError
}

type QSslError__SslError

type QSslError__SslError = int

Describes all recognized errors that can occur during an SSL handshake.

ConstantValue QSslError::NoError0 QSslError::UnableToGetIssuerCertificate1 QSslError::UnableToDecryptCertificateSignature2 QSslError::UnableToDecodeIssuerPublicKey3 QSslError::CertificateSignatureFailed4 QSslError::CertificateNotYetValid5 QSslError::CertificateExpired6 QSslError::InvalidNotBeforeField7 QSslError::InvalidNotAfterField8 QSslError::SelfSignedCertificate9 QSslError::UnspecifiedError-1

See also QSslError::errorString().

const QSslError__AuthorityIssuerSerialNumberMismatch QSslError__SslError = 20

0

const QSslError__CertificateBlacklisted QSslError__SslError = 24

4

const QSslError__CertificateExpired QSslError__SslError = 6
const QSslError__CertificateNotYetValid QSslError__SslError = 5
const QSslError__CertificateRejected QSslError__SslError = 18

8

const QSslError__CertificateRevoked QSslError__SslError = 13

3

const QSslError__CertificateSignatureFailed QSslError__SslError = 4
const QSslError__CertificateUntrusted QSslError__SslError = 17

7

const QSslError__HostNameMismatch QSslError__SslError = 22

2

const QSslError__InvalidCaCertificate QSslError__SslError = 14

4

const QSslError__InvalidNotAfterField QSslError__SslError = 8
const QSslError__InvalidNotBeforeField QSslError__SslError = 7
const QSslError__InvalidPurpose QSslError__SslError = 16

6

const QSslError__NoError QSslError__SslError = 0
const QSslError__NoPeerCertificate QSslError__SslError = 21

1

const QSslError__NoSslSupport QSslError__SslError = 23

3

const QSslError__PathLengthExceeded QSslError__SslError = 15

5

const QSslError__SelfSignedCertificate QSslError__SslError = 9
const QSslError__SelfSignedCertificateInChain QSslError__SslError = 10

0

const QSslError__SubjectIssuerMismatch QSslError__SslError = 19

9

const QSslError__UnableToDecodeIssuerPublicKey QSslError__SslError = 3
const QSslError__UnableToDecryptCertificateSignature QSslError__SslError = 2
const QSslError__UnableToGetIssuerCertificate QSslError__SslError = 1
const QSslError__UnableToGetLocalIssuerCertificate QSslError__SslError = 11

1

const QSslError__UnableToVerifyFirstCertificate QSslError__SslError = 12

2

const QSslError__UnspecifiedError QSslError__SslError = -1

type QSslKey

type QSslKey struct {
	*qtrt.CObject
}

func NewQSslKey

func NewQSslKey() *QSslKey

func NewQSslKey1

func NewQSslKey1(encoded qtcore.QByteArray_ITF, algorithm int, format int, type_ int, passPhrase qtcore.QByteArray_ITF) *QSslKey

func NewQSslKey1p

func NewQSslKey1p(encoded qtcore.QByteArray_ITF, algorithm int) *QSslKey

func NewQSslKey1p1

func NewQSslKey1p1(encoded qtcore.QByteArray_ITF, algorithm int, format int) *QSslKey

func NewQSslKey1p2

func NewQSslKey1p2(encoded qtcore.QByteArray_ITF, algorithm int, format int, type_ int) *QSslKey

func NewQSslKey2

func NewQSslKey2(device qtcore.QIODevice_ITF, algorithm int, format int, type_ int, passPhrase qtcore.QByteArray_ITF) *QSslKey

func NewQSslKey2p

func NewQSslKey2p(device qtcore.QIODevice_ITF, algorithm int) *QSslKey

func NewQSslKey2p1

func NewQSslKey2p1(device qtcore.QIODevice_ITF, algorithm int, format int) *QSslKey

func NewQSslKey2p2

func NewQSslKey2p2(device qtcore.QIODevice_ITF, algorithm int, format int, type_ int) *QSslKey

func NewQSslKeyFromPointer

func NewQSslKeyFromPointer(cthis unsafe.Pointer) *QSslKey

func (*QSslKey) Algorithm

func (this *QSslKey) Algorithm() int

Returns the key algorithm.

func (*QSslKey) Clear

func (this *QSslKey) Clear()

Clears the contents of this key, making it a null key.

See also isNull().

func (*QSslKey) GetCthis

func (this *QSslKey) GetCthis() unsafe.Pointer

func (*QSslKey) Handle

func (this *QSslKey) Handle() int

Returns a pointer to the native key handle, if it is available; otherwise a null pointer is returned.

You can use this handle together with the native API to access extended information about the key.

Warning: Use of this function has a high probability of being non-portable, and its return value may vary across platforms, and between minor Qt releases.

func (*QSslKey) IsNull

func (this *QSslKey) IsNull() bool

Returns true if this is a null key; otherwise false.

See also clear().

func (*QSslKey) Length

func (this *QSslKey) Length() int

Returns the length of the key in bits, or -1 if the key is null.

func (*QSslKey) NewForInherit

func (*QSslKey) NewForInherit() *QSslKey

Constructs a null key.

See also isNull().

func (*QSslKey) NewForInherit1

func (*QSslKey) NewForInherit1(encoded qtcore.QByteArray_ITF, algorithm int, format int, type_ int, passPhrase qtcore.QByteArray_ITF) *QSslKey

Constructs a null key.

See also isNull().

func (*QSslKey) NewForInherit1p

func (*QSslKey) NewForInherit1p(encoded qtcore.QByteArray_ITF, algorithm int) *QSslKey

Constructs a null key.

See also isNull().

func (*QSslKey) NewForInherit1p1

func (*QSslKey) NewForInherit1p1(encoded qtcore.QByteArray_ITF, algorithm int, format int) *QSslKey

Constructs a null key.

See also isNull().

func (*QSslKey) NewForInherit1p2

func (*QSslKey) NewForInherit1p2(encoded qtcore.QByteArray_ITF, algorithm int, format int, type_ int) *QSslKey

Constructs a null key.

See also isNull().

func (*QSslKey) NewForInherit2

func (*QSslKey) NewForInherit2(device qtcore.QIODevice_ITF, algorithm int, format int, type_ int, passPhrase qtcore.QByteArray_ITF) *QSslKey

Constructs a null key.

See also isNull().

func (*QSslKey) NewForInherit2p

func (*QSslKey) NewForInherit2p(device qtcore.QIODevice_ITF, algorithm int) *QSslKey

Constructs a null key.

See also isNull().

func (*QSslKey) NewForInherit2p1

func (*QSslKey) NewForInherit2p1(device qtcore.QIODevice_ITF, algorithm int, format int) *QSslKey

Constructs a null key.

See also isNull().

func (*QSslKey) NewForInherit2p2

func (*QSslKey) NewForInherit2p2(device qtcore.QIODevice_ITF, algorithm int, format int, type_ int) *QSslKey

Constructs a null key.

See also isNull().

func (*QSslKey) NewFromPointer

func (*QSslKey) NewFromPointer(cthis unsafe.Pointer) *QSslKey

func (*QSslKey) Operator_equal

func (this *QSslKey) Operator_equal(other unsafe.Pointer) *QSslKey

func (*QSslKey) Operator_equal1

func (this *QSslKey) Operator_equal1(other QSslKey_ITF) *QSslKey

func (*QSslKey) Operator_equal_equal

func (this *QSslKey) Operator_equal_equal(key QSslKey_ITF) bool

func (*QSslKey) Operator_not_equal

func (this *QSslKey) Operator_not_equal(key QSslKey_ITF) bool

func (*QSslKey) QSslKey_PTR

func (ptr *QSslKey) QSslKey_PTR() *QSslKey

func (*QSslKey) SetCthis

func (this *QSslKey) SetCthis(cthis unsafe.Pointer)

func (*QSslKey) Swap

func (this *QSslKey) Swap(other QSslKey_ITF)

Swaps this ssl key with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

func (*QSslKey) ToDer

func (this *QSslKey) ToDer(passPhrase qtcore.QByteArray_ITF) *qtcore.QByteArray

Returns the key in DER encoding.

The passPhrase argument should be omitted as DER cannot be encrypted. It will be removed in a future version of Qt.

func (*QSslKey) ToDerp

func (this *QSslKey) ToDerp() *qtcore.QByteArray

Returns the key in DER encoding.

The passPhrase argument should be omitted as DER cannot be encrypted. It will be removed in a future version of Qt.

func (*QSslKey) ToPem

func (this *QSslKey) ToPem(passPhrase qtcore.QByteArray_ITF) *qtcore.QByteArray

Returns the key in PEM encoding. The result is encrypted with passPhrase if the key is a private key and passPhrase is non-empty.

func (*QSslKey) ToPemp

func (this *QSslKey) ToPemp() *qtcore.QByteArray

Returns the key in PEM encoding. The result is encrypted with passPhrase if the key is a private key and passPhrase is non-empty.

func (*QSslKey) Type

func (this *QSslKey) Type() int

Returns the type of the key (i.e., PublicKey or PrivateKey).

type QSslKey_ITF

type QSslKey_ITF interface {
	QSslKey_PTR() *QSslKey
}

type QSslPreSharedKeyAuthenticator

type QSslPreSharedKeyAuthenticator struct {
	*qtrt.CObject
}

func NewQSslPreSharedKeyAuthenticator

func NewQSslPreSharedKeyAuthenticator() *QSslPreSharedKeyAuthenticator

func NewQSslPreSharedKeyAuthenticatorFromPointer

func NewQSslPreSharedKeyAuthenticatorFromPointer(cthis unsafe.Pointer) *QSslPreSharedKeyAuthenticator

func (*QSslPreSharedKeyAuthenticator) GetCthis

func (this *QSslPreSharedKeyAuthenticator) GetCthis() unsafe.Pointer

func (*QSslPreSharedKeyAuthenticator) Identity

Returns the PSK client identity.

See also setIdentity().

func (*QSslPreSharedKeyAuthenticator) IdentityHint

func (this *QSslPreSharedKeyAuthenticator) IdentityHint() *qtcore.QByteArray

Returns the PSK identity hint as provided by the server. The interpretation of this hint is left to the application.

func (*QSslPreSharedKeyAuthenticator) MaximumIdentityLength

func (this *QSslPreSharedKeyAuthenticator) MaximumIdentityLength() int

Returns the maximum length, in bytes, of the PSK client identity.

Note: it is possible to set an identity whose length is greater than maximumIdentityLength(); in this case, only the first maximumIdentityLength() bytes will be actually sent to the server.

See also setIdentity().

func (*QSslPreSharedKeyAuthenticator) MaximumPreSharedKeyLength

func (this *QSslPreSharedKeyAuthenticator) MaximumPreSharedKeyLength() int

Returns the maximum length, in bytes, of the pre shared key.

Note: it is possible to set a key whose length is greater than the maximumPreSharedKeyLength(); in this case, only the first maximumPreSharedKeyLength() bytes will be actually sent to the server.

See also setPreSharedKey().

func (*QSslPreSharedKeyAuthenticator) NewForInherit

Constructs a default QSslPreSharedKeyAuthenticator object.

The identity hint, the identity and the key will be initialized to empty byte arrays; the maximum length for both the identity and the key will be initialized to 0.

func (*QSslPreSharedKeyAuthenticator) NewFromPointer

func (*QSslPreSharedKeyAuthenticator) Operator_equal

func (*QSslPreSharedKeyAuthenticator) Operator_equal1

func (*QSslPreSharedKeyAuthenticator) PreSharedKey

func (this *QSslPreSharedKeyAuthenticator) PreSharedKey() *qtcore.QByteArray

Returns the pre shared key.

See also setPreSharedKey().

func (*QSslPreSharedKeyAuthenticator) QSslPreSharedKeyAuthenticator_PTR

func (ptr *QSslPreSharedKeyAuthenticator) QSslPreSharedKeyAuthenticator_PTR() *QSslPreSharedKeyAuthenticator

func (*QSslPreSharedKeyAuthenticator) SetCthis

func (this *QSslPreSharedKeyAuthenticator) SetCthis(cthis unsafe.Pointer)

func (*QSslPreSharedKeyAuthenticator) SetIdentity

func (this *QSslPreSharedKeyAuthenticator) SetIdentity(identity qtcore.QByteArray_ITF)

Sets the PSK client identity (to be advised to the server) to identity.

Note: it is possible to set an identity whose length is greater than maximumIdentityLength(); in this case, only the first maximumIdentityLength() bytes will be actually sent to the server.

See also identity() and maximumIdentityLength().

func (*QSslPreSharedKeyAuthenticator) SetPreSharedKey

func (this *QSslPreSharedKeyAuthenticator) SetPreSharedKey(preSharedKey qtcore.QByteArray_ITF)

Sets the pre shared key to preSharedKey.

Note: it is possible to set a key whose length is greater than the maximumPreSharedKeyLength(); in this case, only the first maximumPreSharedKeyLength() bytes will be actually sent to the server.

See also preSharedKey(), maximumPreSharedKeyLength(), and QByteArray::fromHex().

func (*QSslPreSharedKeyAuthenticator) Swap

Swaps the QSslPreSharedKeyAuthenticator object authenticator with this object. This operation is very fast and never fails.

type QSslPreSharedKeyAuthenticator_ITF

type QSslPreSharedKeyAuthenticator_ITF interface {
	QSslPreSharedKeyAuthenticator_PTR() *QSslPreSharedKeyAuthenticator
}

type QSslSocket

type QSslSocket struct {
	*QTcpSocket
}

func NewQSslSocket

func NewQSslSocket(parent qtcore.QObject_ITF) *QSslSocket

func NewQSslSocketFromPointer

func NewQSslSocketFromPointer(cthis unsafe.Pointer) *QSslSocket

func NewQSslSocketp

func NewQSslSocketp() *QSslSocket

func (*QSslSocket) Abort

func (this *QSslSocket) Abort()

Aborts the current connection and resets the socket. Unlike disconnectFromHost(), this function immediately closes the socket, clearing any pending data in the write buffer.

See also disconnectFromHost() and close().

func (*QSslSocket) AddCaCertificate

func (this *QSslSocket) AddCaCertificate(certificate QSslCertificate_ITF)

Adds the certificate to this socket's CA certificate database. The CA certificate database is used by the socket during the handshake phase to validate the peer's certificate.

To add multiple certificates, use addCaCertificates().

See also caCertificates() and setCaCertificates().

func (*QSslSocket) AddCaCertificates

func (this *QSslSocket) AddCaCertificates(path string, format int, syntax int) bool

Searches all files in the path for certificates encoded in the specified format and adds them to this socket's CA certificate database. path must be a file or a pattern matching one or more files, as specified by syntax. Returns true if one or more certificates are added to the socket's CA certificate database; otherwise returns false.

The CA certificate database is used by the socket during the handshake phase to validate the peer's certificate.

For more precise control, use addCaCertificate().

See also addCaCertificate() and QSslCertificate::fromPath().

func (*QSslSocket) AddCaCertificatesp

func (this *QSslSocket) AddCaCertificatesp(path string) bool

Searches all files in the path for certificates encoded in the specified format and adds them to this socket's CA certificate database. path must be a file or a pattern matching one or more files, as specified by syntax. Returns true if one or more certificates are added to the socket's CA certificate database; otherwise returns false.

The CA certificate database is used by the socket during the handshake phase to validate the peer's certificate.

For more precise control, use addCaCertificate().

See also addCaCertificate() and QSslCertificate::fromPath().

func (*QSslSocket) AddCaCertificatesp1

func (this *QSslSocket) AddCaCertificatesp1(path string, format int) bool

Searches all files in the path for certificates encoded in the specified format and adds them to this socket's CA certificate database. path must be a file or a pattern matching one or more files, as specified by syntax. Returns true if one or more certificates are added to the socket's CA certificate database; otherwise returns false.

The CA certificate database is used by the socket during the handshake phase to validate the peer's certificate.

For more precise control, use addCaCertificate().

See also addCaCertificate() and QSslCertificate::fromPath().

func (*QSslSocket) AddDefaultCaCertificate

func (this *QSslSocket) AddDefaultCaCertificate(certificate QSslCertificate_ITF)

Adds certificate to the default CA certificate database. Each SSL socket's CA certificate database is initialized to the default CA certificate database.

See also defaultCaCertificates() and addCaCertificates().

func (*QSslSocket) AddDefaultCaCertificates

func (this *QSslSocket) AddDefaultCaCertificates(path string, format int, syntax int) bool

Searches all files in the path for certificates with the specified encoding and adds them to the default CA certificate database. path can be an explicit file, or it can contain wildcards in the format specified by syntax. Returns true if any CA certificates are added to the default database.

Each SSL socket's CA certificate database is initialized to the default CA certificate database.

See also defaultCaCertificates(), addCaCertificates(), and addDefaultCaCertificate().

func (*QSslSocket) AddDefaultCaCertificatesp

func (this *QSslSocket) AddDefaultCaCertificatesp(path string) bool

Searches all files in the path for certificates with the specified encoding and adds them to the default CA certificate database. path can be an explicit file, or it can contain wildcards in the format specified by syntax. Returns true if any CA certificates are added to the default database.

Each SSL socket's CA certificate database is initialized to the default CA certificate database.

See also defaultCaCertificates(), addCaCertificates(), and addDefaultCaCertificate().

func (*QSslSocket) AddDefaultCaCertificatesp1

func (this *QSslSocket) AddDefaultCaCertificatesp1(path string, format int) bool

Searches all files in the path for certificates with the specified encoding and adds them to the default CA certificate database. path can be an explicit file, or it can contain wildcards in the format specified by syntax. Returns true if any CA certificates are added to the default database.

Each SSL socket's CA certificate database is initialized to the default CA certificate database.

See also defaultCaCertificates(), addCaCertificates(), and addDefaultCaCertificate().

func (*QSslSocket) AtEnd

func (this *QSslSocket) AtEnd() bool

Reimplemented from QAbstractSocket::atEnd().

func (*QSslSocket) BytesAvailable

func (this *QSslSocket) BytesAvailable() int64

Reimplemented from QAbstractSocket::bytesAvailable().

Returns the number of decrypted bytes that are immediately available for reading.

func (*QSslSocket) BytesToWrite

func (this *QSslSocket) BytesToWrite() int64

Reimplemented from QAbstractSocket::bytesToWrite().

Returns the number of unencrypted bytes that are waiting to be encrypted and written to the network.

func (*QSslSocket) CanReadLine

func (this *QSslSocket) CanReadLine() bool

Reimplemented from QAbstractSocket::canReadLine().

Returns true if you can read one while line (terminated by a single ASCII '\n' character) of decrypted characters; otherwise, false is returned.

func (*QSslSocket) Close

func (this *QSslSocket) Close()

Reimplemented from QAbstractSocket::close().

func (*QSslSocket) ConnectToHost

func (this *QSslSocket) ConnectToHost(hostName string, port uint16, openMode int, protocol int)

func (*QSslSocket) ConnectToHostEncrypted

func (this *QSslSocket) ConnectToHostEncrypted(hostName string, port uint16, mode int, protocol int)

Starts an encrypted connection to the device hostName on port, using mode as the OpenMode. This is equivalent to calling connectToHost() to establish the connection, followed by a call to startClientEncryption(). The protocol parameter can be used to specify which network protocol to use (eg. IPv4 or IPv6).

QSslSocket first enters the HostLookupState. Then, after entering either the event loop or one of the waitFor...() functions, it enters the ConnectingState, emits connected(), and then initiates the SSL client handshake. At each state change, QSslSocket emits signal stateChanged().

After initiating the SSL client handshake, if the identity of the peer can't be established, signal sslErrors() is emitted. If you want to ignore the errors and continue connecting, you must call ignoreSslErrors(), either from inside a slot function connected to the sslErrors() signal, or prior to entering encrypted mode. If ignoreSslErrors() is not called, the connection is dropped, signal disconnected() is emitted, and QSslSocket returns to the UnconnectedState.

If the SSL handshake is successful, QSslSocket emits encrypted().

QSslSocket socket;
connect(&socket, SIGNAL(encrypted()), receiver, SLOT(socketEncrypted()));

socket.connectToHostEncrypted("imap", 993);
socket->write("1 CAPABILITY\r\n");

Note: The example above shows that text can be written to the socket immediately after requesting the encrypted connection, before the encrypted() signal has been emitted. In such cases, the text is queued in the object and written to the socket after the connection is established and the encrypted() signal has been emitted.

The default for mode is ReadWrite.

If you want to create a QSslSocket on the server side of a connection, you should instead call startServerEncryption() upon receiving the incoming connection through QTcpServer.

See also connectToHost(), startClientEncryption(), waitForConnected(), and waitForEncrypted().

func (*QSslSocket) ConnectToHostEncrypted1

func (this *QSslSocket) ConnectToHostEncrypted1(hostName string, port uint16, sslPeerName string, mode int, protocol int)

Starts an encrypted connection to the device hostName on port, using mode as the OpenMode. This is equivalent to calling connectToHost() to establish the connection, followed by a call to startClientEncryption(). The protocol parameter can be used to specify which network protocol to use (eg. IPv4 or IPv6).

QSslSocket first enters the HostLookupState. Then, after entering either the event loop or one of the waitFor...() functions, it enters the ConnectingState, emits connected(), and then initiates the SSL client handshake. At each state change, QSslSocket emits signal stateChanged().

After initiating the SSL client handshake, if the identity of the peer can't be established, signal sslErrors() is emitted. If you want to ignore the errors and continue connecting, you must call ignoreSslErrors(), either from inside a slot function connected to the sslErrors() signal, or prior to entering encrypted mode. If ignoreSslErrors() is not called, the connection is dropped, signal disconnected() is emitted, and QSslSocket returns to the UnconnectedState.

If the SSL handshake is successful, QSslSocket emits encrypted().

QSslSocket socket;
connect(&socket, SIGNAL(encrypted()), receiver, SLOT(socketEncrypted()));

socket.connectToHostEncrypted("imap", 993);
socket->write("1 CAPABILITY\r\n");

Note: The example above shows that text can be written to the socket immediately after requesting the encrypted connection, before the encrypted() signal has been emitted. In such cases, the text is queued in the object and written to the socket after the connection is established and the encrypted() signal has been emitted.

The default for mode is ReadWrite.

If you want to create a QSslSocket on the server side of a connection, you should instead call startServerEncryption() upon receiving the incoming connection through QTcpServer.

See also connectToHost(), startClientEncryption(), waitForConnected(), and waitForEncrypted().

func (*QSslSocket) ConnectToHostEncrypted1p

func (this *QSslSocket) ConnectToHostEncrypted1p(hostName string, port uint16, sslPeerName string)

Starts an encrypted connection to the device hostName on port, using mode as the OpenMode. This is equivalent to calling connectToHost() to establish the connection, followed by a call to startClientEncryption(). The protocol parameter can be used to specify which network protocol to use (eg. IPv4 or IPv6).

QSslSocket first enters the HostLookupState. Then, after entering either the event loop or one of the waitFor...() functions, it enters the ConnectingState, emits connected(), and then initiates the SSL client handshake. At each state change, QSslSocket emits signal stateChanged().

After initiating the SSL client handshake, if the identity of the peer can't be established, signal sslErrors() is emitted. If you want to ignore the errors and continue connecting, you must call ignoreSslErrors(), either from inside a slot function connected to the sslErrors() signal, or prior to entering encrypted mode. If ignoreSslErrors() is not called, the connection is dropped, signal disconnected() is emitted, and QSslSocket returns to the UnconnectedState.

If the SSL handshake is successful, QSslSocket emits encrypted().

QSslSocket socket;
connect(&socket, SIGNAL(encrypted()), receiver, SLOT(socketEncrypted()));

socket.connectToHostEncrypted("imap", 993);
socket->write("1 CAPABILITY\r\n");

Note: The example above shows that text can be written to the socket immediately after requesting the encrypted connection, before the encrypted() signal has been emitted. In such cases, the text is queued in the object and written to the socket after the connection is established and the encrypted() signal has been emitted.

The default for mode is ReadWrite.

If you want to create a QSslSocket on the server side of a connection, you should instead call startServerEncryption() upon receiving the incoming connection through QTcpServer.

See also connectToHost(), startClientEncryption(), waitForConnected(), and waitForEncrypted().

func (*QSslSocket) ConnectToHostEncrypted1p1

func (this *QSslSocket) ConnectToHostEncrypted1p1(hostName string, port uint16, sslPeerName string, mode int)

Starts an encrypted connection to the device hostName on port, using mode as the OpenMode. This is equivalent to calling connectToHost() to establish the connection, followed by a call to startClientEncryption(). The protocol parameter can be used to specify which network protocol to use (eg. IPv4 or IPv6).

QSslSocket first enters the HostLookupState. Then, after entering either the event loop or one of the waitFor...() functions, it enters the ConnectingState, emits connected(), and then initiates the SSL client handshake. At each state change, QSslSocket emits signal stateChanged().

After initiating the SSL client handshake, if the identity of the peer can't be established, signal sslErrors() is emitted. If you want to ignore the errors and continue connecting, you must call ignoreSslErrors(), either from inside a slot function connected to the sslErrors() signal, or prior to entering encrypted mode. If ignoreSslErrors() is not called, the connection is dropped, signal disconnected() is emitted, and QSslSocket returns to the UnconnectedState.

If the SSL handshake is successful, QSslSocket emits encrypted().

QSslSocket socket;
connect(&socket, SIGNAL(encrypted()), receiver, SLOT(socketEncrypted()));

socket.connectToHostEncrypted("imap", 993);
socket->write("1 CAPABILITY\r\n");

Note: The example above shows that text can be written to the socket immediately after requesting the encrypted connection, before the encrypted() signal has been emitted. In such cases, the text is queued in the object and written to the socket after the connection is established and the encrypted() signal has been emitted.

The default for mode is ReadWrite.

If you want to create a QSslSocket on the server side of a connection, you should instead call startServerEncryption() upon receiving the incoming connection through QTcpServer.

See also connectToHost(), startClientEncryption(), waitForConnected(), and waitForEncrypted().

func (*QSslSocket) ConnectToHostEncryptedp

func (this *QSslSocket) ConnectToHostEncryptedp(hostName string, port uint16)

Starts an encrypted connection to the device hostName on port, using mode as the OpenMode. This is equivalent to calling connectToHost() to establish the connection, followed by a call to startClientEncryption(). The protocol parameter can be used to specify which network protocol to use (eg. IPv4 or IPv6).

QSslSocket first enters the HostLookupState. Then, after entering either the event loop or one of the waitFor...() functions, it enters the ConnectingState, emits connected(), and then initiates the SSL client handshake. At each state change, QSslSocket emits signal stateChanged().

After initiating the SSL client handshake, if the identity of the peer can't be established, signal sslErrors() is emitted. If you want to ignore the errors and continue connecting, you must call ignoreSslErrors(), either from inside a slot function connected to the sslErrors() signal, or prior to entering encrypted mode. If ignoreSslErrors() is not called, the connection is dropped, signal disconnected() is emitted, and QSslSocket returns to the UnconnectedState.

If the SSL handshake is successful, QSslSocket emits encrypted().

QSslSocket socket;
connect(&socket, SIGNAL(encrypted()), receiver, SLOT(socketEncrypted()));

socket.connectToHostEncrypted("imap", 993);
socket->write("1 CAPABILITY\r\n");

Note: The example above shows that text can be written to the socket immediately after requesting the encrypted connection, before the encrypted() signal has been emitted. In such cases, the text is queued in the object and written to the socket after the connection is established and the encrypted() signal has been emitted.

The default for mode is ReadWrite.

If you want to create a QSslSocket on the server side of a connection, you should instead call startServerEncryption() upon receiving the incoming connection through QTcpServer.

See also connectToHost(), startClientEncryption(), waitForConnected(), and waitForEncrypted().

func (*QSslSocket) ConnectToHostEncryptedp1

func (this *QSslSocket) ConnectToHostEncryptedp1(hostName string, port uint16, mode int)

Starts an encrypted connection to the device hostName on port, using mode as the OpenMode. This is equivalent to calling connectToHost() to establish the connection, followed by a call to startClientEncryption(). The protocol parameter can be used to specify which network protocol to use (eg. IPv4 or IPv6).

QSslSocket first enters the HostLookupState. Then, after entering either the event loop or one of the waitFor...() functions, it enters the ConnectingState, emits connected(), and then initiates the SSL client handshake. At each state change, QSslSocket emits signal stateChanged().

After initiating the SSL client handshake, if the identity of the peer can't be established, signal sslErrors() is emitted. If you want to ignore the errors and continue connecting, you must call ignoreSslErrors(), either from inside a slot function connected to the sslErrors() signal, or prior to entering encrypted mode. If ignoreSslErrors() is not called, the connection is dropped, signal disconnected() is emitted, and QSslSocket returns to the UnconnectedState.

If the SSL handshake is successful, QSslSocket emits encrypted().

QSslSocket socket;
connect(&socket, SIGNAL(encrypted()), receiver, SLOT(socketEncrypted()));

socket.connectToHostEncrypted("imap", 993);
socket->write("1 CAPABILITY\r\n");

Note: The example above shows that text can be written to the socket immediately after requesting the encrypted connection, before the encrypted() signal has been emitted. In such cases, the text is queued in the object and written to the socket after the connection is established and the encrypted() signal has been emitted.

The default for mode is ReadWrite.

If you want to create a QSslSocket on the server side of a connection, you should instead call startServerEncryption() upon receiving the incoming connection through QTcpServer.

See also connectToHost(), startClientEncryption(), waitForConnected(), and waitForEncrypted().

func (*QSslSocket) ConnectToHostp

func (this *QSslSocket) ConnectToHostp(hostName string, port uint16)

func (*QSslSocket) ConnectToHostp1

func (this *QSslSocket) ConnectToHostp1(hostName string, port uint16, openMode int)

func (*QSslSocket) DisconnectFromHost

func (this *QSslSocket) DisconnectFromHost()

func (*QSslSocket) Encrypted

func (this *QSslSocket) Encrypted()

This signal is emitted when QSslSocket enters encrypted mode. After this signal has been emitted, QSslSocket::isEncrypted() will return true, and all further transmissions on the socket will be encrypted.

See also QSslSocket::connectToHostEncrypted() and QSslSocket::isEncrypted().

func (*QSslSocket) EncryptedBytesAvailable

func (this *QSslSocket) EncryptedBytesAvailable() int64

Returns the number of encrypted bytes that are awaiting decryption. Normally, this function will return 0 because QSslSocket decrypts its incoming data as soon as it can.

This function was introduced in Qt 4.4.

func (*QSslSocket) EncryptedBytesToWrite

func (this *QSslSocket) EncryptedBytesToWrite() int64

Returns the number of encrypted bytes that are waiting to be written to the network.

This function was introduced in Qt 4.4.

func (*QSslSocket) EncryptedBytesWritten

func (this *QSslSocket) EncryptedBytesWritten(totalBytes int64)

This signal is emitted when QSslSocket writes its encrypted data to the network. The written parameter contains the number of bytes that were successfully written.

This function was introduced in Qt 4.4.

See also QIODevice::bytesWritten().

func (*QSslSocket) Flush

func (this *QSslSocket) Flush() bool

This function writes as much as possible from the internal write buffer to the underlying network socket, without blocking. If any data was written, this function returns true; otherwise false is returned.

Call this function if you need QSslSocket to start sending buffered data immediately. The number of bytes successfully written depends on the operating system. In most cases, you do not need to call this function, because QAbstractSocket will start sending data automatically once control goes back to the event loop. In the absence of an event loop, call waitForBytesWritten() instead.

See also write() and waitForBytesWritten().

func (*QSslSocket) GetCthis

func (this *QSslSocket) GetCthis() unsafe.Pointer

func (*QSslSocket) IgnoreSslErrors

func (this *QSslSocket) IgnoreSslErrors()

This slot tells QSslSocket to ignore errors during QSslSocket's handshake phase and continue connecting. If you want to continue with the connection even if errors occur during the handshake phase, then you must call this slot, either from a slot connected to sslErrors(), or before the handshake phase. If you don't call this slot, either in response to errors or before the handshake, the connection will be dropped after the sslErrors() signal has been emitted.

If there are no errors during the SSL handshake phase (i.e., the identity of the peer is established with no problems), QSslSocket will not emit the sslErrors() signal, and it is unnecessary to call this function.

Warning: Be sure to always let the user inspect the errors reported by the sslErrors() signal, and only call this method upon confirmation from the user that proceeding is ok. If there are unexpected errors, the connection should be aborted. Calling this method without inspecting the actual errors will most likely pose a security risk for your application. Use it with great care!

See also sslErrors().

func (*QSslSocket) InheritReadData

func (this *QSslSocket) InheritReadData(f func(data string, maxlen int64) int64)

long long readData(char *, qint64)

func (*QSslSocket) InheritWriteData

func (this *QSslSocket) InheritWriteData(f func(data string, len_ int64) int64)

long long writeData(const char *, qint64)

func (*QSslSocket) IsEncrypted

func (this *QSslSocket) IsEncrypted() bool

Returns true if the socket is encrypted; otherwise, false is returned.

An encrypted socket encrypts all data that is written by calling write() or putChar() before the data is written to the network, and decrypts all incoming data as the data is received from the network, before you call read(), readLine() or getChar().

QSslSocket emits encrypted() when it enters encrypted mode.

You can call sessionCipher() to find which cryptographic cipher is used to encrypt and decrypt your data.

See also mode().

func (*QSslSocket) LocalCertificate

func (this *QSslSocket) LocalCertificate() *QSslCertificate

Returns the socket's local certificate, or an empty certificate if no local certificate has been assigned.

See also setLocalCertificate() and privateKey().

func (*QSslSocket) MetaObject

func (this *QSslSocket) MetaObject() *qtcore.QMetaObject

func (*QSslSocket) Mode

func (this *QSslSocket) Mode() int

Returns the current mode for the socket; either UnencryptedMode, where QSslSocket behaves identially to QTcpSocket, or one of SslClientMode or SslServerMode, where the client is either negotiating or in encrypted mode.

When the mode changes, QSslSocket emits modeChanged()

See also SslMode.

func (*QSslSocket) ModeChanged

func (this *QSslSocket) ModeChanged(newMode int)

This signal is emitted when QSslSocket changes from QSslSocket::UnencryptedMode to either QSslSocket::SslClientMode or QSslSocket::SslServerMode. mode is the new mode.

See also QSslSocket::mode().

func (*QSslSocket) NewForInherit

func (*QSslSocket) NewForInherit(parent qtcore.QObject_ITF) *QSslSocket

Constructs a QSslSocket object. parent is passed to QObject's constructor. The new socket's cipher suite is set to the one returned by the static method defaultCiphers().

func (*QSslSocket) NewForInheritp

func (*QSslSocket) NewForInheritp() *QSslSocket

Constructs a QSslSocket object. parent is passed to QObject's constructor. The new socket's cipher suite is set to the one returned by the static method defaultCiphers().

func (*QSslSocket) NewFromPointer

func (*QSslSocket) NewFromPointer(cthis unsafe.Pointer) *QSslSocket

func (*QSslSocket) PeerCertificate

func (this *QSslSocket) PeerCertificate() *QSslCertificate

Returns the peer's digital certificate (i.e., the immediate certificate of the host you are connected to), or a null certificate, if the peer has not assigned a certificate.

The peer certificate is checked automatically during the handshake phase, so this function is normally used to fetch the certificate for display or for connection diagnostic purposes. It contains information about the peer, including its host name, the certificate issuer, and the peer's public key.

Because the peer certificate is set during the handshake phase, it is safe to access the peer certificate from a slot connected to the sslErrors() signal or the encrypted() signal.

If a null certificate is returned, it can mean the SSL handshake failed, or it can mean the host you are connected to doesn't have a certificate, or it can mean there is no connection.

If you want to check the peer's complete chain of certificates, use peerCertificateChain() to get them all at once.

See also peerCertificateChain().

func (*QSslSocket) PeerVerifyDepth

func (this *QSslSocket) PeerVerifyDepth() int

Returns the maximum number of certificates in the peer's certificate chain to be checked during the SSL handshake phase, or 0 (the default) if no maximum depth has been set, indicating that the whole certificate chain should be checked.

The certificates are checked in issuing order, starting with the peer's own certificate, then its issuer's certificate, and so on.

This function was introduced in Qt 4.4.

See also setPeerVerifyDepth() and peerVerifyMode().

func (*QSslSocket) PeerVerifyError

func (this *QSslSocket) PeerVerifyError(error QSslError_ITF)

QSslSocket can emit this signal several times during the SSL handshake, before encryption has been established, to indicate that an error has occurred while establishing the identity of the peer. The error is usually an indication that QSslSocket is unable to securely identify the peer.

This signal provides you with an early indication when something's wrong. By connecting to this signal, you can manually choose to tear down the connection from inside the connected slot before the handshake has completed. If no action is taken, QSslSocket will proceed to emitting QSslSocket::sslErrors().

This function was introduced in Qt 4.4.

See also sslErrors().

func (*QSslSocket) PeerVerifyMode

func (this *QSslSocket) PeerVerifyMode() int

Returns the socket's verify mode. This mode decides whether QSslSocket should request a certificate from the peer (i.e., the client requests a certificate from the server, or a server requesting a certificate from the client), and whether it should require that this certificate is valid.

The default mode is AutoVerifyPeer, which tells QSslSocket to use VerifyPeer for clients and QueryPeer for servers.

This function was introduced in Qt 4.4.

See also setPeerVerifyMode(), peerVerifyDepth(), and mode().

func (*QSslSocket) PeerVerifyModeItemName

func (this *QSslSocket) PeerVerifyModeItemName(val int) string

func (*QSslSocket) PeerVerifyName

func (this *QSslSocket) PeerVerifyName() string

Returns the different hostname for the certificate validation, as set by setPeerVerifyName or by connectToHostEncrypted.

This function was introduced in Qt 4.8.

See also setPeerVerifyName() and connectToHostEncrypted().

func (*QSslSocket) PreSharedKeyAuthenticationRequired

func (this *QSslSocket) PreSharedKeyAuthenticationRequired(authenticator QSslPreSharedKeyAuthenticator_ITF)

QSslSocket emits this signal when it negotiates a PSK ciphersuite, and therefore a PSK authentication is then required.

When using PSK, the client must send to the server a valid identity and a valid pre shared key, in order for the SSL handshake to continue. Applications can provide this information in a slot connected to this signal, by filling in the passed authenticator object according to their needs.

Note: Ignoring this signal, or failing to provide the required credentials, will cause the handshake to fail, and therefore the connection to be aborted.

Note: The authenticator object is owned by the socket and must not be deleted by the application.

This function was introduced in Qt 5.5.

See also QSslPreSharedKeyAuthenticator.

func (*QSslSocket) PrivateKey

func (this *QSslSocket) PrivateKey() *QSslKey

Returns this socket's private key.

See also setPrivateKey() and localCertificate().

func (*QSslSocket) Protocol

func (this *QSslSocket) Protocol() int

Returns the socket's SSL protocol. By default, QSsl::SecureProtocols is used.

See also setProtocol().

func (*QSslSocket) QSslSocket_PTR

func (ptr *QSslSocket) QSslSocket_PTR() *QSslSocket

func (*QSslSocket) ReadData

func (this *QSslSocket) ReadData(data string, maxlen int64) int64

Reimplemented from QAbstractSocket::readData().

func (*QSslSocket) Resume

func (this *QSslSocket) Resume()

Reimplemented from QAbstractSocket::resume().

Continues data transfer on the socket after it has been paused. If "setPauseMode(QAbstractSocket::PauseOnSslErrors);" has been called on this socket and a sslErrors() signal is received, calling this method is necessary for the socket to continue.

This function was introduced in Qt 5.0.

See also QAbstractSocket::pauseMode() and QAbstractSocket::setPauseMode().

func (*QSslSocket) SessionCipher

func (this *QSslSocket) SessionCipher() *QSslCipher

Returns the socket's cryptographic cipher, or a null cipher if the connection isn't encrypted. The socket's cipher for the session is set during the handshake phase. The cipher is used to encrypt and decrypt data transmitted through the socket.

QSslSocket also provides functions for setting the ordered list of ciphers from which the handshake phase will eventually select the session cipher. This ordered list must be in place before the handshake phase begins.

See also ciphers(), setCiphers(), setDefaultCiphers(), defaultCiphers(), and supportedCiphers().

func (*QSslSocket) SessionProtocol

func (this *QSslSocket) SessionProtocol() int

Returns the socket's SSL/TLS protocol or UnknownProtocol if the connection isn't encrypted. The socket's protocol for the session is set during the handshake phase.

This function was introduced in Qt 5.4.

See also protocol() and setProtocol().

func (*QSslSocket) SetCiphers

func (this *QSslSocket) SetCiphers(ciphers string)

func (*QSslSocket) SetCthis

func (this *QSslSocket) SetCthis(cthis unsafe.Pointer)

func (*QSslSocket) SetLocalCertificate

func (this *QSslSocket) SetLocalCertificate(certificate QSslCertificate_ITF)

Sets the socket's local certificate to certificate. The local certificate is necessary if you need to confirm your identity to the peer. It is used together with the private key; if you set the local certificate, you must also set the private key.

The local certificate and private key are always necessary for server sockets, but are also rarely used by client sockets if the server requires the client to authenticate.

Note: Secure Transport SSL backend on macOS may update the default keychain (the default is probably your login keychain) by importing your local certificates and keys. This can also result in system dialogs showing up and asking for permission when your application is using these private keys. If such behavior is undesired, set the QT_SSL_USE_TEMPORARY_KEYCHAIN environment variable to a non-zero value; this will prompt QSslSocket to use its own temporary keychain.

See also localCertificate() and setPrivateKey().

func (*QSslSocket) SetLocalCertificate1

func (this *QSslSocket) SetLocalCertificate1(fileName string, format int)

Sets the socket's local certificate to certificate. The local certificate is necessary if you need to confirm your identity to the peer. It is used together with the private key; if you set the local certificate, you must also set the private key.

The local certificate and private key are always necessary for server sockets, but are also rarely used by client sockets if the server requires the client to authenticate.

Note: Secure Transport SSL backend on macOS may update the default keychain (the default is probably your login keychain) by importing your local certificates and keys. This can also result in system dialogs showing up and asking for permission when your application is using these private keys. If such behavior is undesired, set the QT_SSL_USE_TEMPORARY_KEYCHAIN environment variable to a non-zero value; this will prompt QSslSocket to use its own temporary keychain.

See also localCertificate() and setPrivateKey().

func (*QSslSocket) SetLocalCertificate1p

func (this *QSslSocket) SetLocalCertificate1p(fileName string)

Sets the socket's local certificate to certificate. The local certificate is necessary if you need to confirm your identity to the peer. It is used together with the private key; if you set the local certificate, you must also set the private key.

The local certificate and private key are always necessary for server sockets, but are also rarely used by client sockets if the server requires the client to authenticate.

Note: Secure Transport SSL backend on macOS may update the default keychain (the default is probably your login keychain) by importing your local certificates and keys. This can also result in system dialogs showing up and asking for permission when your application is using these private keys. If such behavior is undesired, set the QT_SSL_USE_TEMPORARY_KEYCHAIN environment variable to a non-zero value; this will prompt QSslSocket to use its own temporary keychain.

See also localCertificate() and setPrivateKey().

func (*QSslSocket) SetPeerVerifyDepth

func (this *QSslSocket) SetPeerVerifyDepth(depth int)

Sets the maximum number of certificates in the peer's certificate chain to be checked during the SSL handshake phase, to depth. Setting a depth of 0 means that no maximum depth is set, indicating that the whole certificate chain should be checked.

The certificates are checked in issuing order, starting with the peer's own certificate, then its issuer's certificate, and so on.

This function was introduced in Qt 4.4.

See also peerVerifyDepth() and setPeerVerifyMode().

func (*QSslSocket) SetPeerVerifyMode

func (this *QSslSocket) SetPeerVerifyMode(mode int)

Sets the socket's verify mode to mode. This mode decides whether QSslSocket should request a certificate from the peer (i.e., the client requests a certificate from the server, or a server requesting a certificate from the client), and whether it should require that this certificate is valid.

The default mode is AutoVerifyPeer, which tells QSslSocket to use VerifyPeer for clients and QueryPeer for servers.

Setting this mode after encryption has started has no effect on the current connection.

This function was introduced in Qt 4.4.

See also peerVerifyMode(), setPeerVerifyDepth(), and mode().

func (*QSslSocket) SetPeerVerifyName

func (this *QSslSocket) SetPeerVerifyName(hostName string)

Sets a different host name, given by hostName, for the certificate validation instead of the one used for the TCP connection.

This function was introduced in Qt 4.8.

See also peerVerifyName() and connectToHostEncrypted().

func (*QSslSocket) SetPrivateKey

func (this *QSslSocket) SetPrivateKey(key QSslKey_ITF)

Sets the socket's private key to key. The private key and the local certificate are used by clients and servers that must prove their identity to SSL peers.

Both the key and the local certificate are required if you are creating an SSL server socket. If you are creating an SSL client socket, the key and local certificate are required if your client must identify itself to an SSL server.

See also privateKey() and setLocalCertificate().

func (*QSslSocket) SetPrivateKey1

func (this *QSslSocket) SetPrivateKey1(fileName string, algorithm int, format int, passPhrase qtcore.QByteArray_ITF)

Sets the socket's private key to key. The private key and the local certificate are used by clients and servers that must prove their identity to SSL peers.

Both the key and the local certificate are required if you are creating an SSL server socket. If you are creating an SSL client socket, the key and local certificate are required if your client must identify itself to an SSL server.

See also privateKey() and setLocalCertificate().

func (*QSslSocket) SetPrivateKey1p

func (this *QSslSocket) SetPrivateKey1p(fileName string)

Sets the socket's private key to key. The private key and the local certificate are used by clients and servers that must prove their identity to SSL peers.

Both the key and the local certificate are required if you are creating an SSL server socket. If you are creating an SSL client socket, the key and local certificate are required if your client must identify itself to an SSL server.

See also privateKey() and setLocalCertificate().

func (*QSslSocket) SetPrivateKey1p1

func (this *QSslSocket) SetPrivateKey1p1(fileName string, algorithm int)

Sets the socket's private key to key. The private key and the local certificate are used by clients and servers that must prove their identity to SSL peers.

Both the key and the local certificate are required if you are creating an SSL server socket. If you are creating an SSL client socket, the key and local certificate are required if your client must identify itself to an SSL server.

See also privateKey() and setLocalCertificate().

func (*QSslSocket) SetPrivateKey1p2

func (this *QSslSocket) SetPrivateKey1p2(fileName string, algorithm int, format int)

Sets the socket's private key to key. The private key and the local certificate are used by clients and servers that must prove their identity to SSL peers.

Both the key and the local certificate are required if you are creating an SSL server socket. If you are creating an SSL client socket, the key and local certificate are required if your client must identify itself to an SSL server.

See also privateKey() and setLocalCertificate().

func (*QSslSocket) SetProtocol

func (this *QSslSocket) SetProtocol(protocol int)

Sets the socket's SSL protocol to protocol. This will affect the next initiated handshake; calling this function on an already-encrypted socket will not affect the socket's protocol.

See also protocol().

func (*QSslSocket) SetReadBufferSize

func (this *QSslSocket) SetReadBufferSize(size int64)

Reimplemented from QAbstractSocket::setReadBufferSize().

Sets the size of QSslSocket's internal read buffer to be size bytes.

This function was introduced in Qt 4.4.

func (*QSslSocket) SetSocketDescriptor

func (this *QSslSocket) SetSocketDescriptor(socketDescriptor int64, state int, openMode int) bool

Reimplemented from QAbstractSocket::setSocketDescriptor().

Initializes QSslSocket with the native socket descriptor socketDescriptor. Returns true if socketDescriptor is accepted as a valid socket descriptor; otherwise returns false. The socket is opened in the mode specified by openMode, and enters the socket state specified by state.

Note: It is not possible to initialize two sockets with the same native socket descriptor.

See also socketDescriptor().

func (*QSslSocket) SetSocketDescriptorp

func (this *QSslSocket) SetSocketDescriptorp(socketDescriptor int64) bool

Reimplemented from QAbstractSocket::setSocketDescriptor().

Initializes QSslSocket with the native socket descriptor socketDescriptor. Returns true if socketDescriptor is accepted as a valid socket descriptor; otherwise returns false. The socket is opened in the mode specified by openMode, and enters the socket state specified by state.

Note: It is not possible to initialize two sockets with the same native socket descriptor.

See also socketDescriptor().

func (*QSslSocket) SetSocketDescriptorp1

func (this *QSslSocket) SetSocketDescriptorp1(socketDescriptor int64, state int) bool

Reimplemented from QAbstractSocket::setSocketDescriptor().

Initializes QSslSocket with the native socket descriptor socketDescriptor. Returns true if socketDescriptor is accepted as a valid socket descriptor; otherwise returns false. The socket is opened in the mode specified by openMode, and enters the socket state specified by state.

Note: It is not possible to initialize two sockets with the same native socket descriptor.

See also socketDescriptor().

func (*QSslSocket) SetSocketOption

func (this *QSslSocket) SetSocketOption(option int, value qtcore.QVariant_ITF)

Reimplemented from QAbstractSocket::setSocketOption().

Sets the given option to the value described by value.

This function was introduced in Qt 4.6.

See also socketOption().

func (*QSslSocket) SetSslConfiguration

func (this *QSslSocket) SetSslConfiguration(config QSslConfiguration_ITF)

Sets the socket's SSL configuration to be the contents of configuration. This function sets the local certificate, the ciphers, the private key and the CA certificates to those stored in configuration.

It is not possible to set the SSL-state related fields.

This function was introduced in Qt 4.4.

See also sslConfiguration(), setLocalCertificate(), setPrivateKey(), setCaCertificates(), and setCiphers().

func (*QSslSocket) SocketOption

func (this *QSslSocket) SocketOption(option int) *qtcore.QVariant

Reimplemented from QAbstractSocket::socketOption().

Returns the value of the option option.

This function was introduced in Qt 4.6.

See also setSocketOption().

func (*QSslSocket) SslConfiguration

func (this *QSslSocket) SslConfiguration() *QSslConfiguration

Returns the socket's SSL configuration state. The default SSL configuration of a socket is to use the default ciphers, default CA certificates, no local private key or certificate.

The SSL configuration also contains fields that can change with time without notice.

This function was introduced in Qt 4.4.

See also setSslConfiguration(), localCertificate(), peerCertificate(), peerCertificateChain(), sessionCipher(), privateKey(), ciphers(), and caCertificates().

func (*QSslSocket) SslLibraryBuildVersionNumber

func (this *QSslSocket) SslLibraryBuildVersionNumber() int

Returns the version number of the SSL library in use at compile time. If no SSL support is available then this will return an undefined value.

This function was introduced in Qt 5.4.

See also sslLibraryVersionNumber().

func (*QSslSocket) SslLibraryBuildVersionString

func (this *QSslSocket) SslLibraryBuildVersionString() string

Returns the version string of the SSL library in use at compile time. If no SSL support is available then this will return an empty value.

This function was introduced in Qt 5.4.

See also sslLibraryVersionString().

func (*QSslSocket) SslLibraryVersionNumber

func (this *QSslSocket) SslLibraryVersionNumber() int

Returns the version number of the SSL library in use. Note that this is the version of the library in use at run-time not compile time. If no SSL support is available then this will return an undefined value.

This function was introduced in Qt 5.0.

func (*QSslSocket) SslLibraryVersionString

func (this *QSslSocket) SslLibraryVersionString() string

Returns the version string of the SSL library in use. Note that this is the version of the library in use at run-time not compile time. If no SSL support is available then this will return an empty value.

This function was introduced in Qt 5.0.

func (*QSslSocket) SslModeItemName

func (this *QSslSocket) SslModeItemName(val int) string

func (*QSslSocket) StartClientEncryption

func (this *QSslSocket) StartClientEncryption()

Starts a delayed SSL handshake for a client connection. This function can be called when the socket is in the ConnectedState but still in the UnencryptedMode. If it is not yet connected, or if it is already encrypted, this function has no effect.

Clients that implement STARTTLS functionality often make use of delayed SSL handshakes. Most other clients can avoid calling this function directly by using connectToHostEncrypted() instead, which automatically performs the handshake.

See also connectToHostEncrypted() and startServerEncryption().

func (*QSslSocket) StartServerEncryption

func (this *QSslSocket) StartServerEncryption()

Starts a delayed SSL handshake for a server connection. This function can be called when the socket is in the ConnectedState but still in UnencryptedMode. If it is not connected or it is already encrypted, the function has no effect.

For server sockets, calling this function is the only way to initiate the SSL handshake. Most servers will call this function immediately upon receiving a connection, or as a result of having received a protocol-specific command to enter SSL mode (e.g, the server may respond to receiving the string "STARTTLS\r\n" by calling this function).

The most common way to implement an SSL server is to create a subclass of QTcpServer and reimplement QTcpServer::incomingConnection(). The returned socket descriptor is then passed to QSslSocket::setSocketDescriptor().

See also connectToHostEncrypted() and startClientEncryption().

func (*QSslSocket) SupportsSsl

func (this *QSslSocket) SupportsSsl() bool

Returns true if this platform supports SSL; otherwise, returns false. If the platform doesn't support SSL, the socket will fail in the connection phase.

func (*QSslSocket) WaitForBytesWritten

func (this *QSslSocket) WaitForBytesWritten(msecs int) bool

Reimplemented from QAbstractSocket::waitForBytesWritten().

func (*QSslSocket) WaitForBytesWrittenp

func (this *QSslSocket) WaitForBytesWrittenp() bool

Reimplemented from QAbstractSocket::waitForBytesWritten().

func (*QSslSocket) WaitForConnected

func (this *QSslSocket) WaitForConnected(msecs int) bool

Reimplemented from QAbstractSocket::waitForConnected().

Waits until the socket is connected, or msecs milliseconds, whichever happens first. If the connection has been established, this function returns true; otherwise it returns false.

See also QAbstractSocket::waitForConnected().

func (*QSslSocket) WaitForConnectedp

func (this *QSslSocket) WaitForConnectedp() bool

Reimplemented from QAbstractSocket::waitForConnected().

Waits until the socket is connected, or msecs milliseconds, whichever happens first. If the connection has been established, this function returns true; otherwise it returns false.

See also QAbstractSocket::waitForConnected().

func (*QSslSocket) WaitForDisconnected

func (this *QSslSocket) WaitForDisconnected(msecs int) bool

Reimplemented from QAbstractSocket::waitForDisconnected().

Waits until the socket has disconnected or msecs milliseconds, whichever comes first. If the connection has been disconnected, this function returns true; otherwise it returns false.

See also QAbstractSocket::waitForDisconnected().

func (*QSslSocket) WaitForDisconnectedp

func (this *QSslSocket) WaitForDisconnectedp() bool

Reimplemented from QAbstractSocket::waitForDisconnected().

Waits until the socket has disconnected or msecs milliseconds, whichever comes first. If the connection has been disconnected, this function returns true; otherwise it returns false.

See also QAbstractSocket::waitForDisconnected().

func (*QSslSocket) WaitForEncrypted

func (this *QSslSocket) WaitForEncrypted(msecs int) bool

Waits until the socket has completed the SSL handshake and has emitted encrypted(), or msecs milliseconds, whichever comes first. If encrypted() has been emitted, this function returns true; otherwise (e.g., the socket is disconnected, or the SSL handshake fails), false is returned.

The following example waits up to one second for the socket to be encrypted:

socket->connectToHostEncrypted("imap", 993);
if (socket->waitForEncrypted(1000))
    qDebug("Encrypted!");

If msecs is -1, this function will not time out.

See also startClientEncryption(), startServerEncryption(), encrypted(), and isEncrypted().

func (*QSslSocket) WaitForEncryptedp

func (this *QSslSocket) WaitForEncryptedp() bool

Waits until the socket has completed the SSL handshake and has emitted encrypted(), or msecs milliseconds, whichever comes first. If encrypted() has been emitted, this function returns true; otherwise (e.g., the socket is disconnected, or the SSL handshake fails), false is returned.

The following example waits up to one second for the socket to be encrypted:

socket->connectToHostEncrypted("imap", 993);
if (socket->waitForEncrypted(1000))
    qDebug("Encrypted!");

If msecs is -1, this function will not time out.

See also startClientEncryption(), startServerEncryption(), encrypted(), and isEncrypted().

func (*QSslSocket) WaitForReadyRead

func (this *QSslSocket) WaitForReadyRead(msecs int) bool

Reimplemented from QAbstractSocket::waitForReadyRead().

func (*QSslSocket) WaitForReadyReadp

func (this *QSslSocket) WaitForReadyReadp() bool

Reimplemented from QAbstractSocket::waitForReadyRead().

func (*QSslSocket) WriteData

func (this *QSslSocket) WriteData(data string, len_ int64) int64

Reimplemented from QAbstractSocket::writeData().

type QSslSocket_ITF

type QSslSocket_ITF interface {
	QTcpSocket_ITF
	QSslSocket_PTR() *QSslSocket
}

type QSslSocket__PeerVerifyMode

type QSslSocket__PeerVerifyMode = int

Describes the peer verification modes for QSslSocket. The default mode is AutoVerifyPeer, which selects an appropriate mode depending on the socket's QSocket::SslMode.

This enum was introduced or modified in Qt 4.4.

See also QSslSocket::peerVerifyMode().

const QSslSocket__AutoVerifyPeer QSslSocket__PeerVerifyMode = 3

QSslSocket will automatically use QueryPeer for server sockets and VerifyPeer for client sockets.

const QSslSocket__QueryPeer QSslSocket__PeerVerifyMode = 1

QSslSocket will request a certificate from the peer, but does not require this certificate to be valid. This is useful when you want to display peer certificate details to the user without affecting the actual SSL handshake. This mode is the default for servers.

const QSslSocket__VerifyNone QSslSocket__PeerVerifyMode = 0

QSslSocket will not request a certificate from the peer. You can set this mode if you are not interested in the identity of the other side of the connection. The connection will still be encrypted, and your socket will still send its local certificate to the peer if it's requested.

const QSslSocket__VerifyPeer QSslSocket__PeerVerifyMode = 2

QSslSocket will request a certificate from the peer during the SSL handshake phase, and requires that this certificate is valid. On failure, QSslSocket will emit the QSslSocket::sslErrors() signal. This mode is the default for clients.

type QSslSocket__SslMode

type QSslSocket__SslMode = int

Describes the connection modes available for QSslSocket.

const QSslSocket__SslClientMode QSslSocket__SslMode = 1

The socket is a client-side SSL socket. It is either alreayd encrypted, or it is in the SSL handshake phase (see QSslSocket::isEncrypted()).

const QSslSocket__SslServerMode QSslSocket__SslMode = 2

The socket is a server-side SSL socket. It is either already encrypted, or it is in the SSL handshake phase (see QSslSocket::isEncrypted()).

const QSslSocket__UnencryptedMode QSslSocket__SslMode = 0

The socket is unencrypted. Its behavior is identical to QTcpSocket.

type QTcpServer

type QTcpServer struct {
	*qtcore.QObject
}

func NewQTcpServer

func NewQTcpServer(parent qtcore.QObject_ITF) *QTcpServer

func NewQTcpServerFromPointer

func NewQTcpServerFromPointer(cthis unsafe.Pointer) *QTcpServer

func NewQTcpServerp

func NewQTcpServerp() *QTcpServer

func (*QTcpServer) AcceptError

func (this *QTcpServer) AcceptError(socketError int)

This signal is emitted when accepting a new connection results in an error. The socketError parameter describes the type of error that occurred.

This function was introduced in Qt 5.0.

See also pauseAccepting() and resumeAccepting().

func (*QTcpServer) AddPendingConnection

func (this *QTcpServer) AddPendingConnection(socket QTcpSocket_ITF)

This function is called by QTcpServer::incomingConnection() to add the socket to the list of pending incoming connections.

Note: Don't forget to call this member from reimplemented incomingConnection() if you do not want to break the Pending Connections mechanism.

This function was introduced in Qt 4.7.

See also incomingConnection().

func (*QTcpServer) Close

func (this *QTcpServer) Close()

Closes the server. The server will no longer listen for incoming connections.

See also listen().

func (*QTcpServer) ErrorString

func (this *QTcpServer) ErrorString() string

Returns a human readable description of the last error that occurred.

See also serverError().

func (*QTcpServer) GetCthis

func (this *QTcpServer) GetCthis() unsafe.Pointer

func (*QTcpServer) HasPendingConnections

func (this *QTcpServer) HasPendingConnections() bool

Returns true if the server has a pending connection; otherwise returns false.

See also nextPendingConnection() and setMaxPendingConnections().

func (*QTcpServer) IncomingConnection

func (this *QTcpServer) IncomingConnection(handle int64)

This virtual function is called by QTcpServer when a new connection is available. The socketDescriptor argument is the native socket descriptor for the accepted connection.

The base implementation creates a QTcpSocket, sets the socket descriptor and then stores the QTcpSocket in an internal list of pending connections. Finally newConnection() is emitted.

Reimplement this function to alter the server's behavior when a connection is available.

If this server is using QNetworkProxy then the socketDescriptor may not be usable with native socket functions, and should only be used with QTcpSocket::setSocketDescriptor().

Note: If another socket is created in the reimplementation of this method, it needs to be added to the Pending Connections mechanism by calling addPendingConnection().

Note: If you want to handle an incoming connection as a new QTcpSocket object in another thread you have to pass the socketDescriptor to the other thread and create the QTcpSocket object there and use its setSocketDescriptor() method.

See also newConnection(), nextPendingConnection(), and addPendingConnection().

func (*QTcpServer) InheritAddPendingConnection

func (this *QTcpServer) InheritAddPendingConnection(f func(socket *QTcpSocket))

void addPendingConnection(QTcpSocket *)

func (*QTcpServer) InheritIncomingConnection

func (this *QTcpServer) InheritIncomingConnection(f func(handle int64))

void incomingConnection(qintptr)

func (*QTcpServer) IsListening

func (this *QTcpServer) IsListening() bool

Returns true if the server is currently listening for incoming connections; otherwise returns false.

See also listen().

func (*QTcpServer) Listen

func (this *QTcpServer) Listen(address QHostAddress_ITF, port uint16) bool

Tells the server to listen for incoming connections on address address and port port. If port is 0, a port is chosen automatically. If address is QHostAddress::Any, the server will listen on all network interfaces.

Returns true on success; otherwise returns false.

See also isListening().

func (*QTcpServer) Listenp

func (this *QTcpServer) Listenp() bool

Tells the server to listen for incoming connections on address address and port port. If port is 0, a port is chosen automatically. If address is QHostAddress::Any, the server will listen on all network interfaces.

Returns true on success; otherwise returns false.

See also isListening().

func (*QTcpServer) Listenp1

func (this *QTcpServer) Listenp1(address QHostAddress_ITF) bool

Tells the server to listen for incoming connections on address address and port port. If port is 0, a port is chosen automatically. If address is QHostAddress::Any, the server will listen on all network interfaces.

Returns true on success; otherwise returns false.

See also isListening().

func (*QTcpServer) MaxPendingConnections

func (this *QTcpServer) MaxPendingConnections() int

Returns the maximum number of pending accepted connections. The default is 30.

See also setMaxPendingConnections() and hasPendingConnections().

func (*QTcpServer) MetaObject

func (this *QTcpServer) MetaObject() *qtcore.QMetaObject

func (*QTcpServer) NewConnection

func (this *QTcpServer) NewConnection()

This signal is emitted every time a new connection is available.

See also hasPendingConnections() and nextPendingConnection().

func (*QTcpServer) NewForInherit

func (*QTcpServer) NewForInherit(parent qtcore.QObject_ITF) *QTcpServer

Constructs a QTcpServer object.

parent is passed to the QObject constructor.

See also listen() and setSocketDescriptor().

func (*QTcpServer) NewForInheritp

func (*QTcpServer) NewForInheritp() *QTcpServer

Constructs a QTcpServer object.

parent is passed to the QObject constructor.

See also listen() and setSocketDescriptor().

func (*QTcpServer) NewFromPointer

func (*QTcpServer) NewFromPointer(cthis unsafe.Pointer) *QTcpServer

func (*QTcpServer) NextPendingConnection

func (this *QTcpServer) NextPendingConnection() *QTcpSocket

Returns the next pending connection as a connected QTcpSocket object.

The socket is created as a child of the server, which means that it is automatically deleted when the QTcpServer object is destroyed. It is still a good idea to delete the object explicitly when you are done with it, to avoid wasting memory.

0 is returned if this function is called when there are no pending connections.

Note: The returned QTcpSocket object cannot be used from another thread. If you want to use an incoming connection from another thread, you need to override incomingConnection().

See also hasPendingConnections().

func (*QTcpServer) PauseAccepting

func (this *QTcpServer) PauseAccepting()

Pauses accepting new connections. Queued connections will remain in queue.

This function was introduced in Qt 5.0.

See also resumeAccepting().

func (*QTcpServer) Proxy

func (this *QTcpServer) Proxy() *QNetworkProxy

Returns the network proxy for this socket. By default QNetworkProxy::DefaultProxy is used.

This function was introduced in Qt 4.1.

See also setProxy() and QNetworkProxy.

func (*QTcpServer) QTcpServer_PTR

func (ptr *QTcpServer) QTcpServer_PTR() *QTcpServer

func (*QTcpServer) ResumeAccepting

func (this *QTcpServer) ResumeAccepting()

Resumes accepting new connections.

This function was introduced in Qt 5.0.

See also pauseAccepting().

func (*QTcpServer) ServerAddress

func (this *QTcpServer) ServerAddress() *QHostAddress

Returns the server's address if the server is listening for connections; otherwise returns QHostAddress::Null.

See also serverPort() and listen().

func (*QTcpServer) ServerError

func (this *QTcpServer) ServerError() int

Returns an error code for the last error that occurred.

See also errorString().

func (*QTcpServer) ServerPort

func (this *QTcpServer) ServerPort() uint16

Returns the server's port if the server is listening for connections; otherwise returns 0.

See also serverAddress() and listen().

func (*QTcpServer) SetCthis

func (this *QTcpServer) SetCthis(cthis unsafe.Pointer)

func (*QTcpServer) SetMaxPendingConnections

func (this *QTcpServer) SetMaxPendingConnections(numConnections int)

Sets the maximum number of pending accepted connections to numConnections. QTcpServer will accept no more than numConnections incoming connections before nextPendingConnection() is called. By default, the limit is 30 pending connections.

Clients may still able to connect after the server has reached its maximum number of pending connections (i.e., QTcpSocket can still emit the connected() signal). QTcpServer will stop accepting the new connections, but the operating system may still keep them in queue.

See also maxPendingConnections() and hasPendingConnections().

func (*QTcpServer) SetProxy

func (this *QTcpServer) SetProxy(networkProxy QNetworkProxy_ITF)

Sets the explicit network proxy for this socket to networkProxy.

To disable the use of a proxy for this socket, use the QNetworkProxy::NoProxy proxy type:

server->setProxy(QNetworkProxy::NoProxy);

This function was introduced in Qt 4.1.

See also proxy() and QNetworkProxy.

func (*QTcpServer) SetSocketDescriptor

func (this *QTcpServer) SetSocketDescriptor(socketDescriptor int64) bool

Sets the socket descriptor this server should use when listening for incoming connections to socketDescriptor. Returns true if the socket is set successfully; otherwise returns false.

The socket is assumed to be in listening state.

See also socketDescriptor() and isListening().

func (*QTcpServer) SocketDescriptor

func (this *QTcpServer) SocketDescriptor() int64

Returns the native socket descriptor the server uses to listen for incoming instructions, or -1 if the server is not listening.

If the server is using QNetworkProxy, the returned descriptor may not be usable with native socket functions.

See also setSocketDescriptor() and isListening().

func (*QTcpServer) WaitForNewConnection

func (this *QTcpServer) WaitForNewConnection(msec int, timedOut *bool) bool

Waits for at most msec milliseconds or until an incoming connection is available. Returns true if a connection is available; otherwise returns false. If the operation timed out and timedOut is not 0, *timedOut will be set to true.

This is a blocking function call. Its use is disadvised in a single-threaded GUI application, since the whole application will stop responding until the function returns. waitForNewConnection() is mostly useful when there is no event loop available.

The non-blocking alternative is to connect to the newConnection() signal.

If msec is -1, this function will not time out.

See also hasPendingConnections() and nextPendingConnection().

func (*QTcpServer) WaitForNewConnectionp

func (this *QTcpServer) WaitForNewConnectionp() bool

Waits for at most msec milliseconds or until an incoming connection is available. Returns true if a connection is available; otherwise returns false. If the operation timed out and timedOut is not 0, *timedOut will be set to true.

This is a blocking function call. Its use is disadvised in a single-threaded GUI application, since the whole application will stop responding until the function returns. waitForNewConnection() is mostly useful when there is no event loop available.

The non-blocking alternative is to connect to the newConnection() signal.

If msec is -1, this function will not time out.

See also hasPendingConnections() and nextPendingConnection().

func (*QTcpServer) WaitForNewConnectionp1

func (this *QTcpServer) WaitForNewConnectionp1(msec int) bool

Waits for at most msec milliseconds or until an incoming connection is available. Returns true if a connection is available; otherwise returns false. If the operation timed out and timedOut is not 0, *timedOut will be set to true.

This is a blocking function call. Its use is disadvised in a single-threaded GUI application, since the whole application will stop responding until the function returns. waitForNewConnection() is mostly useful when there is no event loop available.

The non-blocking alternative is to connect to the newConnection() signal.

If msec is -1, this function will not time out.

See also hasPendingConnections() and nextPendingConnection().

type QTcpServer_ITF

type QTcpServer_ITF interface {
	qtcore.QObject_ITF
	QTcpServer_PTR() *QTcpServer
}

type QTcpSocket

type QTcpSocket struct {
	*QAbstractSocket
}

func NewQTcpSocket

func NewQTcpSocket(parent qtcore.QObject_ITF) *QTcpSocket

func NewQTcpSocketFromPointer

func NewQTcpSocketFromPointer(cthis unsafe.Pointer) *QTcpSocket

func NewQTcpSocketp

func NewQTcpSocketp() *QTcpSocket

func (*QTcpSocket) GetCthis

func (this *QTcpSocket) GetCthis() unsafe.Pointer

func (*QTcpSocket) MetaObject

func (this *QTcpSocket) MetaObject() *qtcore.QMetaObject

func (*QTcpSocket) NewForInherit

func (*QTcpSocket) NewForInherit(parent qtcore.QObject_ITF) *QTcpSocket

Creates a QTcpSocket object in state UnconnectedState.

parent is passed on to the QObject constructor.

See also socketType().

func (*QTcpSocket) NewForInheritp

func (*QTcpSocket) NewForInheritp() *QTcpSocket

Creates a QTcpSocket object in state UnconnectedState.

parent is passed on to the QObject constructor.

See also socketType().

func (*QTcpSocket) NewFromPointer

func (*QTcpSocket) NewFromPointer(cthis unsafe.Pointer) *QTcpSocket

func (*QTcpSocket) QTcpSocket_PTR

func (ptr *QTcpSocket) QTcpSocket_PTR() *QTcpSocket

func (*QTcpSocket) SetCthis

func (this *QTcpSocket) SetCthis(cthis unsafe.Pointer)

type QTcpSocket_ITF

type QTcpSocket_ITF interface {
	QAbstractSocket_ITF
	QTcpSocket_PTR() *QTcpSocket
}

type QUdpSocket

type QUdpSocket struct {
	*QAbstractSocket
}

func NewQUdpSocket

func NewQUdpSocket(parent qtcore.QObject_ITF) *QUdpSocket

func NewQUdpSocketFromPointer

func NewQUdpSocketFromPointer(cthis unsafe.Pointer) *QUdpSocket

func NewQUdpSocketp

func NewQUdpSocketp() *QUdpSocket

func (*QUdpSocket) GetCthis

func (this *QUdpSocket) GetCthis() unsafe.Pointer

func (*QUdpSocket) HasPendingDatagrams

func (this *QUdpSocket) HasPendingDatagrams() bool

Returns true if at least one datagram is waiting to be read; otherwise returns false.

See also pendingDatagramSize() and readDatagram().

func (*QUdpSocket) JoinMulticastGroup

func (this *QUdpSocket) JoinMulticastGroup(groupAddress QHostAddress_ITF) bool

Joins the multicast group specified by groupAddress on the default interface chosen by the operating system. The socket must be in BoundState, otherwise an error occurs.

Note that if you are attempting to join an IPv4 group, your socket must not be bound using IPv6 (or in dual mode, using QHostAddress::Any). You must use QHostAddress::AnyIPv4 instead.

This function returns true if successful; otherwise it returns false and sets the socket error accordingly.

Note: Joining IPv6 multicast groups without an interface selection is not supported in all operating systems. Consider using the overload where the interface is specified.

This function was introduced in Qt 4.8.

See also leaveMulticastGroup().

func (*QUdpSocket) JoinMulticastGroup1

func (this *QUdpSocket) JoinMulticastGroup1(groupAddress QHostAddress_ITF, iface QNetworkInterface_ITF) bool

Joins the multicast group specified by groupAddress on the default interface chosen by the operating system. The socket must be in BoundState, otherwise an error occurs.

Note that if you are attempting to join an IPv4 group, your socket must not be bound using IPv6 (or in dual mode, using QHostAddress::Any). You must use QHostAddress::AnyIPv4 instead.

This function returns true if successful; otherwise it returns false and sets the socket error accordingly.

Note: Joining IPv6 multicast groups without an interface selection is not supported in all operating systems. Consider using the overload where the interface is specified.

This function was introduced in Qt 4.8.

See also leaveMulticastGroup().

func (*QUdpSocket) LeaveMulticastGroup

func (this *QUdpSocket) LeaveMulticastGroup(groupAddress QHostAddress_ITF) bool

Leaves the multicast group specified by groupAddress on the default interface chosen by the operating system. The socket must be in BoundState, otherwise an error occurs.

This function returns true if successful; otherwise it returns false and sets the socket error accordingly.

Note: This function should be called with the same arguments as were passed to joinMulticastGroup().

This function was introduced in Qt 4.8.

See also joinMulticastGroup().

func (*QUdpSocket) LeaveMulticastGroup1

func (this *QUdpSocket) LeaveMulticastGroup1(groupAddress QHostAddress_ITF, iface QNetworkInterface_ITF) bool

Leaves the multicast group specified by groupAddress on the default interface chosen by the operating system. The socket must be in BoundState, otherwise an error occurs.

This function returns true if successful; otherwise it returns false and sets the socket error accordingly.

Note: This function should be called with the same arguments as were passed to joinMulticastGroup().

This function was introduced in Qt 4.8.

See also joinMulticastGroup().

func (*QUdpSocket) MetaObject

func (this *QUdpSocket) MetaObject() *qtcore.QMetaObject

func (*QUdpSocket) MulticastInterface

func (this *QUdpSocket) MulticastInterface() *QNetworkInterface

Returns the interface for the outgoing interface for multicast datagrams. This corresponds to the IP_MULTICAST_IF socket option for IPv4 sockets and the IPV6_MULTICAST_IF socket option for IPv6 sockets. If no interface has been previously set, this function returns an invalid QNetworkInterface. The socket must be in BoundState, otherwise an invalid QNetworkInterface is returned.

This function was introduced in Qt 4.8.

See also setMulticastInterface().

func (*QUdpSocket) NewForInherit

func (*QUdpSocket) NewForInherit(parent qtcore.QObject_ITF) *QUdpSocket

Creates a QUdpSocket object.

parent is passed to the QObject constructor.

See also socketType().

func (*QUdpSocket) NewForInheritp

func (*QUdpSocket) NewForInheritp() *QUdpSocket

Creates a QUdpSocket object.

parent is passed to the QObject constructor.

See also socketType().

func (*QUdpSocket) NewFromPointer

func (*QUdpSocket) NewFromPointer(cthis unsafe.Pointer) *QUdpSocket

func (*QUdpSocket) PendingDatagramSize

func (this *QUdpSocket) PendingDatagramSize() int64

Returns the size of the first pending UDP datagram. If there is no datagram available, this function returns -1.

See also hasPendingDatagrams() and readDatagram().

func (*QUdpSocket) QUdpSocket_PTR

func (ptr *QUdpSocket) QUdpSocket_PTR() *QUdpSocket

func (*QUdpSocket) ReadDatagram

func (this *QUdpSocket) ReadDatagram(data string, maxlen int64, host QHostAddress_ITF, port unsafe.Pointer) int64

Receives a datagram no larger than maxSize bytes and stores it in data. The sender's host address and port is stored in *address and *port (unless the pointers are 0).

Returns the size of the datagram on success; otherwise returns -1.

If maxSize is too small, the rest of the datagram will be lost. To avoid loss of data, call pendingDatagramSize() to determine the size of the pending datagram before attempting to read it. If maxSize is 0, the datagram will be discarded.

See also writeDatagram(), hasPendingDatagrams(), and pendingDatagramSize().

func (*QUdpSocket) ReadDatagramp

func (this *QUdpSocket) ReadDatagramp(data string, maxlen int64) int64

Receives a datagram no larger than maxSize bytes and stores it in data. The sender's host address and port is stored in *address and *port (unless the pointers are 0).

Returns the size of the datagram on success; otherwise returns -1.

If maxSize is too small, the rest of the datagram will be lost. To avoid loss of data, call pendingDatagramSize() to determine the size of the pending datagram before attempting to read it. If maxSize is 0, the datagram will be discarded.

See also writeDatagram(), hasPendingDatagrams(), and pendingDatagramSize().

func (*QUdpSocket) ReadDatagramp1

func (this *QUdpSocket) ReadDatagramp1(data string, maxlen int64, host QHostAddress_ITF) int64

Receives a datagram no larger than maxSize bytes and stores it in data. The sender's host address and port is stored in *address and *port (unless the pointers are 0).

Returns the size of the datagram on success; otherwise returns -1.

If maxSize is too small, the rest of the datagram will be lost. To avoid loss of data, call pendingDatagramSize() to determine the size of the pending datagram before attempting to read it. If maxSize is 0, the datagram will be discarded.

See also writeDatagram(), hasPendingDatagrams(), and pendingDatagramSize().

func (*QUdpSocket) ReceiveDatagram

func (this *QUdpSocket) ReceiveDatagram(maxSize int64) *QNetworkDatagram

Receives a datagram no larger than maxSize bytes and returns it in the QNetworkDatagram object, along with the sender's host address and port. If possible, this function will also try to determine the datagram's destination address, port, and the number of hop counts at reception time.

On failure, returns a QNetworkDatagram that reports not valid.

If maxSize is too small, the rest of the datagram will be lost. If maxSize is 0, the datagram will be discarded. If maxSize is -1 (the default), this function will attempt to read the entire datagram.

See also writeDatagram(), hasPendingDatagrams(), and pendingDatagramSize().

func (*QUdpSocket) ReceiveDatagramp

func (this *QUdpSocket) ReceiveDatagramp() *QNetworkDatagram

Receives a datagram no larger than maxSize bytes and returns it in the QNetworkDatagram object, along with the sender's host address and port. If possible, this function will also try to determine the datagram's destination address, port, and the number of hop counts at reception time.

On failure, returns a QNetworkDatagram that reports not valid.

If maxSize is too small, the rest of the datagram will be lost. If maxSize is 0, the datagram will be discarded. If maxSize is -1 (the default), this function will attempt to read the entire datagram.

See also writeDatagram(), hasPendingDatagrams(), and pendingDatagramSize().

func (*QUdpSocket) SetCthis

func (this *QUdpSocket) SetCthis(cthis unsafe.Pointer)

func (*QUdpSocket) SetMulticastInterface

func (this *QUdpSocket) SetMulticastInterface(iface QNetworkInterface_ITF)

Sets the outgoing interface for multicast datagrams to the interface iface. This corresponds to the IP_MULTICAST_IF socket option for IPv4 sockets and the IPV6_MULTICAST_IF socket option for IPv6 sockets. The socket must be in BoundState, otherwise this function does nothing.

This function was introduced in Qt 4.8.

See also multicastInterface(), joinMulticastGroup(), and leaveMulticastGroup().

func (*QUdpSocket) WriteDatagram

func (this *QUdpSocket) WriteDatagram(datagram QNetworkDatagram_ITF) int64

Sends the datagram at data of size size to the host address address at port port. Returns the number of bytes sent on success; otherwise returns -1.

Datagrams are always written as one block. The maximum size of a datagram is highly platform-dependent, but can be as low as 8192 bytes. If the datagram is too large, this function will return -1 and error() will return DatagramTooLargeError.

Sending datagrams larger than 512 bytes is in general disadvised, as even if they are sent successfully, they are likely to be fragmented by the IP layer before arriving at their final destination.

Warning: Calling this function on a connected UDP socket may result in an error and no packet being sent. If you are using a connected socket, use write() to send datagrams.

See also readDatagram() and write().

func (*QUdpSocket) WriteDatagram1

func (this *QUdpSocket) WriteDatagram1(data string, len_ int64, host QHostAddress_ITF, port uint16) int64

Sends the datagram at data of size size to the host address address at port port. Returns the number of bytes sent on success; otherwise returns -1.

Datagrams are always written as one block. The maximum size of a datagram is highly platform-dependent, but can be as low as 8192 bytes. If the datagram is too large, this function will return -1 and error() will return DatagramTooLargeError.

Sending datagrams larger than 512 bytes is in general disadvised, as even if they are sent successfully, they are likely to be fragmented by the IP layer before arriving at their final destination.

Warning: Calling this function on a connected UDP socket may result in an error and no packet being sent. If you are using a connected socket, use write() to send datagrams.

See also readDatagram() and write().

func (*QUdpSocket) WriteDatagram2

func (this *QUdpSocket) WriteDatagram2(datagram qtcore.QByteArray_ITF, host QHostAddress_ITF, port uint16) int64

Sends the datagram at data of size size to the host address address at port port. Returns the number of bytes sent on success; otherwise returns -1.

Datagrams are always written as one block. The maximum size of a datagram is highly platform-dependent, but can be as low as 8192 bytes. If the datagram is too large, this function will return -1 and error() will return DatagramTooLargeError.

Sending datagrams larger than 512 bytes is in general disadvised, as even if they are sent successfully, they are likely to be fragmented by the IP layer before arriving at their final destination.

Warning: Calling this function on a connected UDP socket may result in an error and no packet being sent. If you are using a connected socket, use write() to send datagrams.

See also readDatagram() and write().

type QUdpSocket_ITF

type QUdpSocket_ITF interface {
	QAbstractSocket_ITF
	QUdpSocket_PTR() *QUdpSocket
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL