summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp')
-rw-r--r--Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp4
1 files changed, 3 insertions, 1 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
@@ -73,19 +73,21 @@ int main(int argc, char* argv[]) {
char* timeoutChar = argv[argi++];
int timeout = atoi(timeoutChar);
timeout = (timeout ? timeout : 30) * 1000;
ClientXMLTracer* tracer = new ClientXMLTracer(client);
client->onConnected.connect(&handleConnected);
errorConnection = client->onDisconnected.connect(&handleDisconnected);
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();
}
{
Timer::ref timer = networkFactories.getTimerFactory()->createTimer(timeout);
timer->onTick.connect(boost::bind(&SimpleEventLoop::stop, &eventLoop));
timer->start();