refs #485, improved p2p address handling

This commit is contained in:
Klaus Basan
2016-02-15 00:07:03 +01:00
committed by Mathew Sutcliffe
parent 7a38afe8c3
commit 41a88266ab
3 changed files with 36 additions and 7 deletions

View File

@@ -85,9 +85,12 @@ namespace BlackMisc
//! Address denoting a P2P server at the given host and port.
//! \remarks Port number may be embedding in the host string after a colon.
static QString p2pAddress(const QString &host = "127.0.0.1", const QString &port = "");
//! \return p2p address like "tcp:host=foo.bar.com,port=1234"
static QString p2pAddress(const QString &host, const QString &port = "");
//! Turn something like 127.0.0.1:45000 into "tcp:host=127.0.0.1,port=45000"
//! \note Handles also "session" and "system" as valid address while CDBusServer::p2pAddress is for
//! P2P addresses only.
static QString normalizeAddress(const QString &address);
//! Return the server mode of the given address