summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--syncSocket.cpp21
-rw-r--r--syncSocket.h4
2 files changed, 12 insertions, 13 deletions
diff --git a/syncSocket.cpp b/syncSocket.cpp
index 44616fd..5ed631a 100644
--- a/syncSocket.cpp
+++ b/syncSocket.cpp
@@ -49,21 +49,20 @@ void SyncSocket::OnAccept()
boost::archive::text_oarchive oa(sout);
const ConnectionParam conn = cl_.getConnection();
oa << conn;
- Send(sout.str()+"\n");
+ Send(sout.str());
}
}
-//void SyncSocket::OnRawData(const char *buf,size_t len)
-void SyncSocket::OnLine(const std::string& line)
+void SyncSocket::OnRawData(const char *buf,size_t len)
+//void SyncSocket::OnLine(const std::string& line)
{
-// std::cout << "recieved sync inforamtaion:"<< std::endl;
-// for(size_t index=0;index<len;index++)
-// {
-// std::cout << buf[index];
-// }
- std::cout << line << std::endl;
- std::istringstream iss;
- iss.str(line);
+ std::stringstream iss;
+ std::cout << "recieved sync inforamtaion:"<< std::endl;
+ for(size_t index=0;index<len;index++)
+ {
+ std::cout << buf[index];
+ iss << buf[index];
+ }
boost::archive::text_iarchive ia(iss);
SeqWindow * seq= new SeqWindow(0);
seq_nr_t seq_nr_=0;
diff --git a/syncSocket.h b/syncSocket.h
index 66fa842..19d6ef5 100644
--- a/syncSocket.h
+++ b/syncSocket.h
@@ -18,8 +18,8 @@ public:
bool OnConnectRetry();
void OnReconnect();
- void OnLine(const std::string& line);
-// void OnRawData(const char *buf,size_t len);
+// void OnLine(const std::string& line);
+ void OnRawData(const char *buf,size_t len);
// void Init();
// void InitSSLServer();