diff options
author | Dwight Merriman <dwight@10gen.com> | 2010-04-20 21:55:34 -0400 |
---|---|---|
committer | Dwight Merriman <dwight@10gen.com> | 2010-04-20 21:55:34 -0400 |
commit | b0cdfca990dd68c8591f0eaa490723ad13a35c7a (patch) | |
tree | 394240cf031ece9cff829e8ec17d326f1a24e18a /util/hostandport.h | |
parent | 18f361418835e8379c5a80869e35dfb61347c233 (diff) | |
download | mongo-b0cdfca990dd68c8591f0eaa490723ad13a35c7a.tar.gz |
checkpooint
Diffstat (limited to 'util/hostandport.h')
-rw-r--r-- | util/hostandport.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/util/hostandport.h b/util/hostandport.h index abadd080e2d..0577d455391 100644 --- a/util/hostandport.h +++ b/util/hostandport.h @@ -36,7 +36,8 @@ namespace mongo { bool isLocalHost() const; - string toString(); + // @returns host:port + string toString() const; string host() const { return _host; } int port() const { return _port; } @@ -67,7 +68,7 @@ namespace mongo { return sameStart(getHostName().c_str(), _host.c_str()); } - inline string HostAndPort::toString() { + inline string HostAndPort::toString() const { stringstream ss; ss << _host; if( _port != -1 ) ss << ':' << _port; |