summaryrefslogtreecommitdiff
path: root/syncCommand.h
blob: 6e1e3ea46ed72e496af07f985e484077b34d5912 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef _SYNCCOMMAND_H
#define _SYNCCOMMAND_H
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>

#include "connectionList.h"

class SyncCommand
{
public:
	SyncCommand(ConnectionList & cl );
	SyncCommand(ConnectionList & cl ,u_int16_t mux);
	u_int16_t getMux() const;

private:
	ConnectionList & cl_;
	u_int16_t mux_;
  friend class boost::serialization::access;
  template<class Archive>
  void serialize(Archive & ar, const unsigned int version)
  {
    ar & mux_;
		ConnectionParam & conn = cl_.getOrNewConnection(mux_);
		ar & conn;
	}
};


#endif // _SYNCSOCKET_H