summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-07-14 17:27:32 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-07-14 17:27:32 (GMT)
commitee3a46975986865fe5064f9d87a27277fc6c235a (patch)
tree51bae2ed1669ca881f761ca7547fbaf22432ae12 /Swiften/Client/Session.cpp
parentc34f50d3371f47c88d2ee927a5d59af8e135304c (diff)
downloadswift-ee3a46975986865fe5064f9d87a27277fc6c235a.zip
swift-ee3a46975986865fe5064f9d87a27277fc6c235a.tar.bz2
Consolidating IncomingConnection & Connection.
BoostConnections no longer have their own thread, but are managed from a central Boost IO thread instead.
Diffstat (limited to 'Swiften/Client/Session.cpp')
-rw-r--r--Swiften/Client/Session.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/Swiften/Client/Session.cpp b/Swiften/Client/Session.cpp
index c4adfa0..1ae97d6 100644
--- a/Swiften/Client/Session.cpp
+++ b/Swiften/Client/Session.cpp
@@ -52,10 +52,10 @@ Session::~Session() {
void Session::start() {
assert(state_ == Initial);
state_ = Connecting;
- connection_ = connectionFactory_->createConnection(jid_.getDomain());
+ connection_ = connectionFactory_->createConnection();
connection_->onConnected.connect(boost::bind(&Session::handleConnected, this));
connection_->onError.connect(boost::bind(&Session::handleConnectionError, this, _1));
- connection_->connect();
+ connection_->connect(jid_.getDomain());
}
void Session::stop() {
@@ -93,6 +93,9 @@ void Session::handleConnectionError(Connection::Error error) {
case Connection::ReadError:
setError(ConnectionReadError);
break;
+ case Connection::WriteError:
+ setError(ConnectionWriteError);
+ break;
case Connection::ConnectionError:
setError(ConnectionError);
break;