diff options
| author | Alan Conway <aconway@apache.org> | 2011-02-01 21:26:00 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2011-02-01 21:26:00 +0000 |
| commit | 13d8a9c8bfafc9b87e1cc5810d64c86ea90f8b9b (patch) | |
| tree | 30762327f33233deea60aa48260e84de332465fd /cpp/src/qpid/sys/ssl | |
| parent | 0a671494bb0715dd84bbaadc388a606455be7cf5 (diff) | |
| download | qpid-python-13d8a9c8bfafc9b87e1cc5810d64c86ea90f8b9b.tar.gz | |
QPID-3007: Unique management identifier for connections.
Management was using remote socket address (host:port) to identify
connections, but this is not a unique identifier. Both the local and
remote addresses are needed to uniquely identify a connection - see
http://www.faqs.org/rfcs/rfc793.html.
This was causing management errors (multiple objects using same
identifier) and cluster failures (invalid-arg exception) due to
inconsistencies caused by the incorrect management map.
This commit uses "localhost:localport-remotehost:remoteport" as a unique identifier.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1066220 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/ssl')
| -rw-r--r-- | cpp/src/qpid/sys/ssl/SslSocket.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cpp/src/qpid/sys/ssl/SslSocket.h b/cpp/src/qpid/sys/ssl/SslSocket.h index e2443e31c8..102e56986f 100644 --- a/cpp/src/qpid/sys/ssl/SslSocket.h +++ b/cpp/src/qpid/sys/ssl/SslSocket.h @@ -91,6 +91,11 @@ public: */ std::string getLocalAddress() const; + /** + * Returns the full address of the connection: local and remote host and port. + */ + std::string getFullAddress() const { return getLocalAddress()+"-"+getPeerAddress(); } + uint16_t getLocalPort() const; uint16_t getRemotePort() const; |
