diff --git a/include/wx/sckaddr.h b/include/wx/sckaddr.h index fb165f0885..bd37455fcc 100644 --- a/include/wx/sckaddr.h +++ b/include/wx/sckaddr.h @@ -73,6 +73,8 @@ public: virtual int Type() { return wxSockAddress::IPV4; } virtual wxSockAddress *Clone() const; + + bool operator==(wxIPV4address& addr); private: wxString m_origHostname; diff --git a/src/common/sckaddr.cpp b/src/common/sckaddr.cpp index 33b51d153d..8f667937dc 100644 --- a/src/common/sckaddr.cpp +++ b/src/common/sckaddr.cpp @@ -193,6 +193,12 @@ wxString wxIPV4address::IPAddress() const ); } +bool wxIPV4address::operator==(wxIPV4address& addr) +{ + if(Hostname().Cmp(addr.Hostname().c_str()) == 0 && Service() == addr.Service()) return true; + return false; +} + #if 0 // --------------------------------------------------------------------------- // wxIPV6address