summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Examples')
-rw-r--r--Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp4
-rw-r--r--Swiften/Examples/SendMessage/SendMessage.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp b/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp
index c957481..636a52a 100644
--- a/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp
+++ b/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp
@@ -79,7 +79,9 @@ int main(int argc, char* argv[]) {
std::cout << "Connecting to JID " << jid << " with timeout " << timeout << "ms on host: "; ;
if (!connectHost.empty()) {
std::cout << connectHost << std::endl;
- client->connect(connectHost);
+ ClientOptions options;
+ options.manualHostname = connectHost;
+ client->connect(options);
} else {
std::cout << " Default" << std::endl;
client->connect();
diff --git a/Swiften/Examples/SendMessage/SendMessage.cpp b/Swiften/Examples/SendMessage/SendMessage.cpp
index f4dbf53..07e289e 100644
--- a/Swiften/Examples/SendMessage/SendMessage.cpp
+++ b/Swiften/Examples/SendMessage/SendMessage.cpp
@@ -69,7 +69,9 @@ int main(int argc, char* argv[]) {
client->onConnected.connect(&handleConnected);
errorConnection = client->onDisconnected.connect(&handleDisconnected);
if (!connectHost.empty()) {
- client->connect(connectHost);
+ ClientOptions options;
+ options.manualHostname = connectHost;
+ client->connect(options);
} else {
client->connect();
}