diff options
author | Chris Wilson <chris+github@qwirx.com> | 2012-02-12 12:29:56 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2012-02-12 12:29:56 +0000 |
commit | 15a3e05144785bfcaddcf2d11b6c549edd9f62ee (patch) | |
tree | 30827463c74a3b24f4b206894580a4511203c014 /bin/bbackupd/BackupClientContext.h | |
parent | 03d7cb4d75822b40d263d0737e3115a0aeff1cda (diff) |
Add experimental "TCP Nice" mode, disabled by default.
Diffstat (limited to 'bin/bbackupd/BackupClientContext.h')
-rw-r--r-- | bin/bbackupd/BackupClientContext.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/bin/bbackupd/BackupClientContext.h b/bin/bbackupd/BackupClientContext.h index 404d2d77..41d90ff0 100644 --- a/bin/bbackupd/BackupClientContext.h +++ b/bin/bbackupd/BackupClientContext.h @@ -16,6 +16,7 @@ #include "BackupDaemonInterface.h" #include "BackupStoreFile.h" #include "ExcludeList.h" +#include "TcpNice.h" #include "Timer.h" class TLSContext; @@ -49,7 +50,8 @@ public: bool ExtendedLogging, bool ExtendedLogToFile, std::string ExtendedLogFile, - ProgressNotifier &rProgressNotifier + ProgressNotifier &rProgressNotifier, + bool TcpNiceMode ); virtual ~BackupClientContext(); private: @@ -207,6 +209,14 @@ public: { return mrProgressNotifier; } + + void SetNiceMode(bool enabled) + { + if(mTcpNiceMode) + { + mapNice->SetEnabled(enabled); + } + } private: LocationResolver &mrResolver; @@ -214,8 +224,9 @@ private: std::string mHostname; int mPort; uint32_t mAccountNumber; - SocketStreamTLS *mpSocket; - BackupProtocolClient *mpConnection; + std::auto_ptr<IOStream> mapSocket; + std::auto_ptr<NiceSocketStream> mapNice; + std::auto_ptr<BackupProtocolClient> mapConnection; bool mExtendedLogging; bool mExtendedLogToFile; std::string mExtendedLogFile; @@ -232,6 +243,7 @@ private: int mKeepAliveTime; int mMaximumDiffingTime; ProgressNotifier &mrProgressNotifier; + bool mTcpNiceMode; }; #endif // BACKUPCLIENTCONTEXT__H |