(svn r15920) -Codechange: make the (TCP) connecting less AF dependent.

This commit is contained in:
rubidium
2009-04-02 23:59:43 +00:00
parent 521bf687ee
commit c7b6469dab
3 changed files with 53 additions and 18 deletions

View File

@@ -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 */