summaryrefslogtreecommitdiff
path: root/syncSocket.cpp
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2007-12-12 16:30:33 +0000
committerOthmar Gsenger <otti@anytun.org>2007-12-12 16:30:33 +0000
commit26310b1f3405f759970bc4e15b9ffc76a721db21 (patch)
tree95a9eb0ff08aca65e0fc7cd35b2280eee49739df /syncSocket.cpp
parentadded buffer size (diff)
OnLine -> OnRawData
Diffstat (limited to 'syncSocket.cpp')
-rw-r--r--syncSocket.cpp21
1 files changed, 10 insertions, 11 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;