SSH: Export information about the underlying TCP connection.

Change-Id: I62bce3b563b6aba481642fac0d427c0f0d3b2ddd
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Christian Kandeler
2012-02-10 10:39:48 +01:00
committed by hjk
parent 17c18623ef
commit 220f67dfdf
4 changed files with 22 additions and 5 deletions

View File

@@ -167,9 +167,12 @@ SshConnectionParameters SshConnection::connectionParameters() const
return d->m_connParams;
}
QAbstractSocket::NetworkLayerProtocol SshConnection::ipProtocolVersion() const
SshConnectionInfo SshConnection::connectionInfo() const
{
return d->m_socket->localAddress().protocol();
QTC_ASSERT(state() == Connected, return SshConnectionInfo());
return SshConnectionInfo(d->m_socket->localAddress(), d->m_socket->localPort(),
d->m_socket->peerAddress(), d->m_socket->peerPort());
}
SshConnection::~SshConnection()