diff options
author | Othmar Gsenger <otti@anytun.org> | 2008-02-27 22:43:14 +0000 |
---|---|---|
committer | Othmar Gsenger <otti@anytun.org> | 2008-02-27 22:43:14 +0000 |
commit | 4083c982656fe3d79168b228aca56cef2de2ea0e (patch) | |
tree | 6574a170eb044ea75dd4f96cd22cb6b4c171d465 /syncConnectionCommand.h | |
parent | added command line parameter for master key and salt (diff) |
added route syncing
Diffstat (limited to 'syncConnectionCommand.h')
-rw-r--r-- | syncConnectionCommand.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/syncConnectionCommand.h b/syncConnectionCommand.h new file mode 100644 index 0000000..225ec9c --- /dev/null +++ b/syncConnectionCommand.h @@ -0,0 +1,32 @@ +#ifndef _SYNCCONNECTIONCOMMAND_H +#define _SYNCCONNECTIONCOMMAND_H +#include <boost/archive/text_oarchive.hpp> +#include <boost/archive/text_iarchive.hpp> + +#include "connectionList.h" +#include "threadUtils.hpp" + +class SyncConnectionCommand +{ +public: + SyncConnectionCommand(ConnectionList & cl ); + SyncConnectionCommand(ConnectionList & cl ,u_int16_t mux); + u_int16_t getMux() const; + +private: + SyncConnectionCommand(const SyncConnectionCommand &); + ConnectionList & cl_; + u_int16_t mux_; + friend class boost::serialization::access; + template<class Archive> + void serialize(Archive & ar, const unsigned int version) + { + Lock lock(cl_.getMutex()); + ar & mux_; + ConnectionParam & conn = cl_.getOrNewConnectionUnlocked(mux_); + ar & conn; + } +}; + + +#endif // _SYNCCOMMAND_H |