diff options
Diffstat (limited to 'examples/network')
-rw-r--r-- | examples/network/secureudpclient/association.cpp | 2 | ||||
-rw-r--r-- | examples/network/secureudpserver/server.cpp | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/examples/network/secureudpclient/association.cpp b/examples/network/secureudpclient/association.cpp index c8397b9f9f..02009fe233 100644 --- a/examples/network/secureudpclient/association.cpp +++ b/examples/network/secureudpclient/association.cpp @@ -59,7 +59,7 @@ DtlsAssociation::DtlsAssociation(const QHostAddress &address, quint16 port, { auto configuration = QSslConfiguration::defaultDtlsConfiguration(); configuration.setPeerVerifyMode(QSslSocket::VerifyNone); - crypto.setRemote(address, port); + crypto.setPeer(address, port); crypto.setDtlsConfiguration(configuration); connect(&crypto, &QDtls::handshakeTimeout, this, &DtlsAssociation::handshakeTimeout); diff --git a/examples/network/secureudpserver/server.cpp b/examples/network/secureudpserver/server.cpp index 918307013c..c5887c9adb 100644 --- a/examples/network/secureudpserver/server.cpp +++ b/examples/network/secureudpserver/server.cpp @@ -151,8 +151,8 @@ void DtlsServer::readyRead() const auto client = std::find_if(knownClients.begin(), knownClients.end(), [&](const DtlsConnection &connection){ - return connection->remoteAddress() == peerAddress - && connection->remotePort() == peerPort; + return connection->peerAddress() == peerAddress + && connection->peerPort() == peerPort; }); if (client == knownClients.end()) @@ -189,7 +189,7 @@ void DtlsServer::handleNewConnection(const QHostAddress &peerAddress, DtlsConnection newConnection(new QDtls(QSslSocket::SslServerMode)); newConnection->setDtlsConfiguration(serverConfiguration); - newConnection->setRemote(peerAddress, peerPort); + newConnection->setPeer(peerAddress, peerPort); newConnection->connect(newConnection.data(), &QDtls::pskRequired, this, &DtlsServer::pskRequired); knownClients.push_back(newConnection); @@ -209,8 +209,8 @@ void DtlsServer::doHandshake(DtlsConnection newConnection, const QByteArray &cli return; } - const QString peerInfo = peer_info(newConnection->remoteAddress(), - newConnection->remotePort()); + const QString peerInfo = peer_info(newConnection->peerAddress(), + newConnection->peerPort()); switch (newConnection->handshakeState()) { case QDtls::HandshakeInProgress: emit infoMessage(peerInfo + tr(": handshake is in progress ...")); @@ -228,7 +228,7 @@ void DtlsServer::decryptDatagram(DtlsConnection connection, const QByteArray &cl { Q_ASSERT(connection->connectionEncrypted()); - const QString peerInfo = peer_info(connection->remoteAddress(), connection->remotePort()); + const QString peerInfo = peer_info(connection->peerAddress(), connection->peerPort()); const QByteArray dgram = connection->decryptDatagram(&serverSocket, clientMessage); if (dgram.size()) { emit datagramReceived(peerInfo, clientMessage, dgram); |