output a message when handshake has completed with a client

This commit is contained in:
Stephen Birarda 2014-04-04 10:44:15 -07:00
parent efd176f93c
commit c840904642
2 changed files with 7 additions and 3 deletions

View file

@ -104,6 +104,11 @@ DTLSSession::DTLSSession(int end, QUdpSocket& dtlsSocket, HifiSockAddr& destinat
gnutls_transport_set_pull_timeout_function(_gnutlsSession, socketPullTimeout);
}
void DTLSSession::setCompletedHandshake(bool completedHandshake) {
_completedHandshake = completedHandshake;
qDebug() << "Completed DTLS handshake with" << _destinationSocket;
}
qint64 DTLSSession::writeDatagram(const QByteArray& datagram) {
// we don't need to put a hash in this packet, so just send it off
return gnutls_record_send(_gnutlsSession, datagram.data(), datagram.size());

View file

@ -29,12 +29,11 @@ public:
gnutls_session_t* getGnuTLSSession() { return &_gnutlsSession; }
bool completedHandshake() const { return _completedHandshake; }
void setCompletedHandshake(bool completedHandshake) { _completedHandshake = completedHandshake; }
void setCompletedHandshake(bool completedHandshake);
protected:
QUdpSocket& _dtlsSocket;
gnutls_session_t _gnutlsSession;
HifiSockAddr _destinationSocket;
gnutls_session_t _gnutlsSession;
bool _completedHandshake;
};