diff options
| author | Remko Tronçon <git@el-tramo.be> | 2009-11-12 18:12:47 (GMT) |
|---|---|---|
| committer | Remko Tronçon <git@el-tramo.be> | 2009-11-12 18:12:47 (GMT) |
| commit | fdd8755e2363e8d706a3d0bdc2e71f234abdf829 (patch) | |
| tree | 470401f6f80873c4e1ce5af5cd30ab6837854d04 /Swiften/Session/BasicSessionStream.h | |
| parent | 6a20be61e229255f93d55f13be3346525698237a (diff) | |
| download | swift-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/Session/BasicSessionStream.h')
| -rw-r--r-- | Swiften/Session/BasicSessionStream.h | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/Swiften/Session/BasicSessionStream.h b/Swiften/Session/BasicSessionStream.h index 0cb50eb..07bae81 100644 --- a/Swiften/Session/BasicSessionStream.h +++ b/Swiften/Session/BasicSessionStream.h @@ -4,32 +4,32 @@ #include <boost/enable_shared_from_this.hpp> #include "Swiften/Network/Connection.h" #include "Swiften/Session/SessionStream.h" namespace Swift { - class TLSLayerFactory; - class TLSLayer; - class WhitespacePingLayer; + class TLSLayerFactory; + class TLSLayer; + class WhitespacePingLayer; class PayloadParserFactoryCollection; class PayloadSerializerCollection; - class StreamStack; + class StreamStack; class XMPPLayer; - class ConnectionLayer; + class ConnectionLayer; - class BasicSessionStream : - public SessionStream, - public boost::enable_shared_from_this<BasicSessionStream> { - public: - BasicSessionStream( - boost::shared_ptr<Connection> connection, - PayloadParserFactoryCollection* payloadParserFactories, - PayloadSerializerCollection* payloadSerializers, - TLSLayerFactory* tlsLayerFactory - ); - ~BasicSessionStream(); + class BasicSessionStream : + public SessionStream, + public boost::enable_shared_from_this<BasicSessionStream> { + public: + BasicSessionStream( + boost::shared_ptr<Connection> connection, + PayloadParserFactoryCollection* payloadParserFactories, + PayloadSerializerCollection* payloadSerializers, + TLSLayerFactory* tlsLayerFactory + ); + ~BasicSessionStream(); void initialize(); virtual bool isAvailable(); virtual void writeHeader(const ProtocolHeader& header); @@ -40,29 +40,29 @@ namespace Swift { virtual void addTLSEncryption(); virtual void setWhitespacePingEnabled(bool); virtual void resetXMPPParser(); - private: + private: void handleConnectionError(const boost::optional<Connection::Error>& error); - void handleXMPPError(); + void handleXMPPError(); void handleTLSConnected(); - void handleTLSError(); + void handleTLSError(); void handleStreamStartReceived(const ProtocolHeader&); void handleElementReceived(boost::shared_ptr<Element>); - void handleDataRead(const ByteArray& data); - void handleDataWritten(const ByteArray& data); + void handleDataRead(const ByteArray& data); + void handleDataWritten(const ByteArray& data); - private: + private: bool available; boost::shared_ptr<Connection> connection; PayloadParserFactoryCollection* payloadParserFactories; PayloadSerializerCollection* payloadSerializers; TLSLayerFactory* tlsLayerFactory; boost::shared_ptr<XMPPLayer> xmppLayer; boost::shared_ptr<ConnectionLayer> connectionLayer; StreamStack* streamStack; - boost::shared_ptr<TLSLayer> tlsLayer; - boost::shared_ptr<WhitespacePingLayer> whitespacePingLayer; - }; + boost::shared_ptr<TLSLayer> tlsLayer; + boost::shared_ptr<WhitespacePingLayer> whitespacePingLayer; + }; } |
Swift