summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Client')
-rw-r--r--Swiften/Client/Client.cpp6
-rw-r--r--Swiften/Client/Client.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/Swiften/Client/Client.cpp b/Swiften/Client/Client.cpp
index c704248..e23c317 100644
--- a/Swiften/Client/Client.cpp
+++ b/Swiften/Client/Client.cpp
@@ -35,8 +35,12 @@ bool Client::isAvailable() {
}
void Client::connect() {
+ connect(jid_.getDomain());
+}
+
+void Client::connect(const String& host) {
assert(!connector_);
- connector_ = boost::shared_ptr<Connector>(new Connector(jid_.getDomain(), &resolver_, connectionFactory_, timerFactory_));
+ connector_ = boost::shared_ptr<Connector>(new Connector(host, &resolver_, connectionFactory_, timerFactory_));
connector_->onConnectFinished.connect(boost::bind(&Client::handleConnectorFinished, this, _1));
connector_->setTimeoutMilliseconds(60*1000);
connector_->start();
diff --git a/Swiften/Client/Client.h b/Swiften/Client/Client.h
index 444c136..d5764df 100644
--- a/Swiften/Client/Client.h
+++ b/Swiften/Client/Client.h
@@ -33,6 +33,7 @@ namespace Swift {
void setCertificate(const String& certificate);
void connect();
+ void connect(const String& host);
void disconnect();
bool isAvailable();