summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-11-12 18:12:47 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-11-12 18:12:47 (GMT)
commitfdd8755e2363e8d706a3d0bdc2e71f234abdf829 (patch)
tree470401f6f80873c4e1ce5af5cd30ab6837854d04 /Swiften/Client/Client.h
parent6a20be61e229255f93d55f13be3346525698237a (diff)
downloadswift-fdd8755e2363e8d706a3d0bdc2e71f234abdf829.zip
swift-fdd8755e2363e8d706a3d0bdc2e71f234abdf829.tar.bz2
Refactored DNS handling.
Connections now fallback on other DNS entries upon failure, taking into account SRV priorities.
Diffstat (limited to 'Swiften/Client/Client.h')
-rw-r--r--Swiften/Client/Client.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/Swiften/Client/Client.h b/Swiften/Client/Client.h
index 3f7d350..f09c916 100644
--- a/Swiften/Client/Client.h
+++ b/Swiften/Client/Client.h
@@ -4,6 +4,7 @@
#include <boost/signals.hpp>
#include <boost/shared_ptr.hpp>
+#include "Swiften/Network/PlatformDomainNameResolver.h"
#include "Swiften/Base/Error.h"
#include "Swiften/Client/ClientSession.h"
#include "Swiften/Client/ClientError.h"
@@ -22,6 +23,7 @@ namespace Swift {
class ConnectionFactory;
class ClientSession;
class BasicSessionStream;
+ class Connector;
class Client : public StanzaChannel, public IQRouter, public boost::bsignals::trackable {
public:
@@ -46,7 +48,7 @@ namespace Swift {
boost::signal<void (const String&)> onDataWritten;
private:
- void handleConnectionConnectFinished(bool error);
+ void handleConnectorFinished(boost::shared_ptr<Connection>);
void send(boost::shared_ptr<Stanza>);
virtual String getNewIQID();
void handleElement(boost::shared_ptr<Element>);
@@ -58,9 +60,11 @@ namespace Swift {
void closeConnection();
private:
+ PlatformDomainNameResolver resolver_;
JID jid_;
String password_;
IDGenerator idGenerator_;
+ boost::shared_ptr<Connector> connector_;
ConnectionFactory* connectionFactory_;
TLSLayerFactory* tlsLayerFactory_;
FullPayloadParserFactoryCollection payloadParserFactories_;