summaryrefslogtreecommitdiff
path: root/src/mongo/util/net/sockaddr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/util/net/sockaddr.h')
-rw-r--r--src/mongo/util/net/sockaddr.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/mongo/util/net/sockaddr.h b/src/mongo/util/net/sockaddr.h
index 1475d98be1c..0f32c48846d 100644
--- a/src/mongo/util/net/sockaddr.h
+++ b/src/mongo/util/net/sockaddr.h
@@ -43,8 +43,6 @@
#endif // not _WIN32
-#include "mongo/base/string_data.h"
-
namespace mongo {
#if defined(_WIN32)
@@ -60,19 +58,16 @@ struct sockaddr_un {
#endif // _WIN32
-// Generate a string representation for getaddrinfo return codes
-std::string getAddrInfoStrError(int code);
-
/**
* Wrapper around os representation of network address.
*/
struct SockAddr {
SockAddr();
-
explicit SockAddr(int sourcePort); /* listener side */
-
- explicit SockAddr(StringData ip, int port, sa_family_t familyHint);
-
+ SockAddr(
+ const char* ip,
+ int port); /* EndPoint (remote) side, or if you want to specify which interface locally */
+ SockAddr(const std::string& ip, int port) : SockAddr(ip.c_str(), port) {}
explicit SockAddr(struct sockaddr_storage& other, socklen_t size);
template <typename T>