diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-07-14 17:27:32 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-07-14 17:27:32 (GMT) |
commit | ee3a46975986865fe5064f9d87a27277fc6c235a (patch) | |
tree | 51bae2ed1669ca881f761ca7547fbaf22432ae12 /Swiften/Network/Connection.h | |
parent | c34f50d3371f47c88d2ee927a5d59af8e135304c (diff) | |
download | swift-contrib-ee3a46975986865fe5064f9d87a27277fc6c235a.zip swift-contrib-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/Network/Connection.h')
-rw-r--r-- | Swiften/Network/Connection.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/Swiften/Network/Connection.h b/Swiften/Network/Connection.h index 6d05eee..16d5d7b 100644 --- a/Swiften/Network/Connection.h +++ b/Swiften/Network/Connection.h @@ -12,13 +12,15 @@ namespace Swift { enum Error { DomainNameResolveError, ConnectionError, - ReadError + ReadError, + WriteError }; - Connection(const String& domain) : domain_(domain) {} + Connection() {} virtual ~Connection() {} - virtual void connect() = 0; + virtual void listen() = 0; + virtual void connect(const String& domain) = 0; virtual void disconnect() = 0; virtual void write(const ByteArray& data) = 0; @@ -26,14 +28,6 @@ namespace Swift { boost::signal<void ()> onConnected; boost::signal<void (Error)> onError; boost::signal<void (const ByteArray&)> onDataRead; - - protected: - const String& getDomain() const { - return domain_; - } - - private: - String domain_; }; } |