diff options
Diffstat (limited to 'Swiften/Network/HostAddressPort.h')
-rw-r--r-- | Swiften/Network/HostAddressPort.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Swiften/Network/HostAddressPort.h b/Swiften/Network/HostAddressPort.h new file mode 100644 index 0000000..d632058 --- /dev/null +++ b/Swiften/Network/HostAddressPort.h @@ -0,0 +1,30 @@ +#ifndef SWIFTEN_HostAddressPort_H +#define SWIFTEN_HostAddressPort_H + +#include "Swiften/Network/HostAddress.h" + +namespace Swift { + class HostAddressPort { + public: + HostAddressPort(const HostAddress& address, int port) : address_(address), port_(port) { + } + + const HostAddress& getAddress() const { + return address_; + } + + int getPort() const { + return port_; + } + + bool operator==(const HostAddressPort& o) const { + return address_ == o.address_ && port_ == o.port_; + } + + private: + HostAddress address_; + int port_; + }; +} + +#endif |