summaryrefslogtreecommitdiff
path: root/syncClientSocket.cpp
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2007-12-13 16:22:02 +0000
committerOthmar Gsenger <otti@anytun.org>2007-12-13 16:22:02 +0000
commitf2474da8648b95340456a2695fc2c90e043dabec (patch)
tree08e29164bde8fb4a98b2720f3dcb75732905ed87 /syncClientSocket.cpp
parentadded mux_type (diff)
added Synccommand / now connection updates work / sync is multi connection capable
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());