From f2474da8648b95340456a2695fc2c90e043dabec Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Thu, 13 Dec 2007 16:22:02 +0000 Subject: added Synccommand / now connection updates work / sync is multi connection capable --- syncClientSocket.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'syncClientSocket.cpp') diff --git a/syncClientSocket.cpp b/syncClientSocket.cpp index 864d574..1403ed4 100644 --- a/syncClientSocket.cpp +++ b/syncClientSocket.cpp @@ -49,17 +49,15 @@ void SyncClientSocket::OnRawData(const char *buf,size_t len) std::cout << buf[index]; iss << buf[index]; } + boost::archive::text_iarchive ia(iss); - SeqWindow * seq= new SeqWindow(0); - seq_nr_t seq_nr_=0; - KeyDerivation * kd = new KeyDerivation; - kd->init(::Buffer(20), ::Buffer(14)); - ConnectionParam conn ( (*kd), (*seq), seq_nr_, "", 0); - ia >> conn; - std::cout << "sync connection remote host " << conn.remote_host_ << ":" << conn.remote_port_ << std::endl; - cl_.clear(); - cl_.addConnection(conn,std::string("default")); + SyncCommand scom(cl_); + ia >> scom; + u_int16_t mux = scom.getMux(); + const ConnectionParam & conn = cl_.getConnection(mux)->second; + std::cout << "sync connection #"<