diff --git a/include/address.h b/include/address.h index a78ef3a..f937b84 100644 --- a/include/address.h +++ b/include/address.h @@ -109,6 +109,17 @@ public: * @param address */ Address(const std::string &address) : Address(address.data()) {} + + /** + * Constructor based on already known properties + * @param host + * @param port + * @param login + * @param vhost + */ + Address(std::string host, uint16_t port, Login login, std::string vhost) : _login(std::move(login)), + _hostname(std::move(host)), + _port(port), _vhost(std::move(vhost)) {} /** * Destructor diff --git a/include/tcpconnection.h b/include/tcpconnection.h index 1673193..eba00dc 100644 --- a/include/tcpconnection.h +++ b/include/tcpconnection.h @@ -123,6 +123,16 @@ public: // pass to the underlying connection return _connection.close(); } + + /** + * Return the amount of channels this connection has + * @return std::size_t + */ + std::size_t channels() const + { + // return the amount of channels this connection has + return _connection.channels(); + } }; /**