summaryrefslogtreecommitdiff
path: root/src/network/core/address.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/core/address.h')
-rw-r--r--src/network/core/address.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/network/core/address.h b/src/network/core/address.h
index 3a4b8c06e..598cd305e 100644
--- a/src/network/core/address.h
+++ b/src/network/core/address.h
@@ -128,6 +128,11 @@ public:
return this->GetPort() == address.GetPort() && strcmp(this->GetHostname(), address.GetHostname()) == 0;
}
+ /**
+ * Assign another address to ourself
+ * @param other obviously the address to assign to us
+ * @return 'this'
+ */
NetworkAddress& operator = (const NetworkAddress &other)
{
if (this != &other) { // protect against invalid self-assignment
@@ -138,6 +143,11 @@ public:
return *this;
}
+ /**
+ * Connect to the given address.
+ * @return the connected socket or INVALID_SOCKET.
+ */
+ SOCKET Connect();
};
#endif /* ENABLE_NETWORK */