From f63e7fe64401bcd46e5b12bca2c861e0d8e0ce11 Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Thu, 28 Feb 2008 20:53:50 +0000 Subject: ll --- syncClientSocket.cpp | 4 ++-- syncClientSocket.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/syncClientSocket.cpp b/syncClientSocket.cpp index 34a23f0..09faeda 100644 --- a/syncClientSocket.cpp +++ b/syncClientSocket.cpp @@ -14,7 +14,7 @@ SyncClientSocket::SyncClientSocket(ISocketHandler& h,ConnectionList & cl) -:TcpSocket(h),cl_(cl) +:TcpSocket(h),cl_(cl),missing_chars(0) { // initial connection timeout setting and number of retries SetConnectTimeout(12); @@ -49,7 +49,7 @@ void SyncClientSocket::OnRawData(const char *buf,size_t len) iss_ << buf[index]; } - while(!iss_.eof() && !iss_.fail()) + while(iss_.good()) { boost::archive::text_iarchive ia(iss_); SyncCommand scom(cl_); diff --git a/syncClientSocket.h b/syncClientSocket.h index 1909ebb..5334079 100644 --- a/syncClientSocket.h +++ b/syncClientSocket.h @@ -26,6 +26,7 @@ public: private: ConnectionList & cl_; std::stringstream iss_; + uint16_t missing_chars; }; -- cgit v1.2.3