diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-08-14 08:49:36 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-08-16 22:13:25 (GMT) |
commit | 9f1c6250b4e0859b1436f669a51b8b58b2428bd0 (patch) | |
tree | b7246f0055230ca336ddcb21b3f30778f496a08d /Swiften/Client | |
parent | 3e984e93df6673c7f3750e220b0cb2364c2f3279 (diff) | |
download | swift-contrib-9f1c6250b4e0859b1436f669a51b8b58b2428bd0.zip swift-contrib-9f1c6250b4e0859b1436f669a51b8b58b2428bd0.tar.bz2 |
Use global IO service thread in Client.
Diffstat (limited to 'Swiften/Client')
-rw-r--r-- | Swiften/Client/Client.cpp | 4 | ||||
-rw-r--r-- | Swiften/Client/Client.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Swiften/Client/Client.cpp b/Swiften/Client/Client.cpp index 95f6c0f..5d04a92 100644 --- a/Swiften/Client/Client.cpp +++ b/Swiften/Client/Client.cpp @@ -3,6 +3,8 @@ #include <boost/bind.hpp> #include "Swiften/Network/DomainNameResolver.h" +#include "Swiften/Network/MainBoostIOServiceThread.h" +#include "Swiften/Network/BoostIOServiceThread.h" #include "Swiften/Client/ClientSession.h" #include "Swiften/StreamStack/PlatformTLSLayerFactory.h" #include "Swiften/Network/BoostConnectionFactory.h" @@ -13,7 +15,7 @@ namespace Swift { Client::Client(const JID& jid, const String& password) : IQRouter(this), jid_(jid), password_(password) { - connectionFactory_ = new BoostConnectionFactory(&boostIOServiceThread_.getIOService()); + connectionFactory_ = new BoostConnectionFactory(&MainBoostIOServiceThread::getInstance().getIOService()); tlsLayerFactory_ = new PlatformTLSLayerFactory(); } diff --git a/Swiften/Client/Client.h b/Swiften/Client/Client.h index 1561c75..516bee2 100644 --- a/Swiften/Client/Client.h +++ b/Swiften/Client/Client.h @@ -15,14 +15,13 @@ #include "Swiften/Queries/IQRouter.h" #include "Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.h" #include "Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.h" -#include "Swiften/Network/BoostIOServiceThread.h" namespace Swift { class TLSLayerFactory; class ConnectionFactory; class ClientSession; - class Client : public StanzaChannel, public IQRouter { + class Client : public StanzaChannel, public IQRouter, public boost::bsignals::trackable { public: Client(const JID& jid, const String& password); ~Client(); @@ -53,7 +52,6 @@ namespace Swift { void handleDataWritten(const ByteArray&); private: - BoostIOServiceThread boostIOServiceThread_; JID jid_; String password_; IDGenerator idGenerator_; |