summaryrefslogtreecommitdiff
path: root/syncClientSocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'syncClientSocket.cpp')
-rw-r--r--syncClientSocket.cpp16
1 files changed, 7 insertions, 9 deletions
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 #"<<mux<<" remote host " << conn.remote_host_ << ":" << conn.remote_port_ << std::endl;
}
+
//void StatusClientSocket::InitSSLServer()
//{
// InitializeContext("server.pem", "keypwd", SSLv23_method());