Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

ViewerConnection.cc

Go to the documentation of this file.
00001 //-*-c++-*-
00002 
00003 #include <iostream>
00004 #include <string>
00005 #include <math.h>  // for min
00006 
00007 using namespace std;
00008 
00009 #include "ViewerConnection.h"
00010 
00011 namespace DualCoding {
00012 
00013 void ViewerConnection::writeBigString(std::string const &msg) {
00014   size_t const len = msg.size();
00015   for (size_t startpos = 0; startpos<len; ) {
00016     size_t const chunksize = min(len-startpos, (size_t)(DIALOG_BUFFER_SIZE-1));
00017     string const chunk = msg.substr(startpos,chunksize);
00018     dialogSock->printf("%s",chunk.c_str());
00019     startpos += chunksize;
00020   }
00021 }
00022 
00023 
00024 } // namespace

DualCoding 5.1CVS
Generated Mon May 9 04:56:28 2016 by Doxygen 1.6.3