summaryrefslogtreecommitdiff
path: root/util/hostandport.h
diff options
context:
space:
mode:
authorDwight Merriman <dwight@10gen.com>2010-04-20 21:55:34 -0400
committerDwight Merriman <dwight@10gen.com>2010-04-20 21:55:34 -0400
commitb0cdfca990dd68c8591f0eaa490723ad13a35c7a (patch)
tree394240cf031ece9cff829e8ec17d326f1a24e18a /util/hostandport.h
parent18f361418835e8379c5a80869e35dfb61347c233 (diff)
downloadmongo-b0cdfca990dd68c8591f0eaa490723ad13a35c7a.tar.gz
checkpooint
Diffstat (limited to 'util/hostandport.h')
-rw-r--r--util/hostandport.h5
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;