diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-12-31 13:27:52 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-12-31 13:27:52 (GMT) |
commit | 152c455e18aae9b613f17bca8bba4a2beafe0228 (patch) | |
tree | cde533a0bf5dbe014acba3eb2645761ade53dd20 /Swiften/Network/Connector.cpp | |
parent | 3625bf9f94aad738b6d44da4b8f70c60cd167647 (diff) | |
download | swift-contrib-152c455e18aae9b613f17bca8bba4a2beafe0228.zip swift-contrib-152c455e18aae9b613f17bca8bba4a2beafe0228.tar.bz2 |
Added tests for timing out initial connect.
Diffstat (limited to 'Swiften/Network/Connector.cpp')
-rw-r--r-- | Swiften/Network/Connector.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Swiften/Network/Connector.cpp b/Swiften/Network/Connector.cpp index e424f64..9ea5a7f 100644 --- a/Swiften/Network/Connector.cpp +++ b/Swiften/Network/Connector.cpp @@ -12,6 +12,10 @@ namespace Swift { Connector::Connector(const String& hostname, DomainNameResolver* resolver, ConnectionFactory* connectionFactory) : hostname(hostname), resolver(resolver), connectionFactory(connectionFactory), queriedAllHosts(true) { } +void Connector::setTimeoutMilliseconds(int milliseconds) { + timeoutMilliseconds = milliseconds; +} + void Connector::start() { //std::cout << "Connector::start()" << std::endl; assert(!currentConnection); |