~josejuan-sanchez/esajpip/emptypackets

« back to all changes in this revision

Viewing changes to src/client_manager.cc

  • Committer: José Juan Sánchez Hernández
  • Date: 2012-07-18 11:40:37 UTC
  • Revision ID: josejuan.sanchez@gmail.com-20120718114037-mslgs1evd0gwjp2y
Modifications to control empty packets

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
  int chunk_len = 0;
25
25
  int buf_len = cfg.max_chunk_size();
26
26
 
 
27
  /****/
 
28
  totalBytes = 0;
 
29
  /****/
 
30
 
27
31
  char *buf = new char[buf_len];
28
32
 
29
33
  if(buf == NULL) {
188
192
        if(chunk_len > 0) {
189
193
          sock_stream << hex << chunk_len << dec << http::Protocol::CRLF << flush;
190
194
 
191
 
          //LOG("Chunk of " << chunk_len << " bytes sent");
 
195
          LOG("Chunk of " << chunk_len << " bytes sent");
 
196
 
 
197
          cout << endl;
 
198
 
192
199
          sock_stream->Send(buf, chunk_len);
193
200
 
 
201
          /****/
 
202
          totalBytes += chunk_len;
 
203
          LOG("TEST. Chunk of " << totalBytes << " bytes sent");
 
204
          /****/
 
205
 
194
206
          sock_stream << http::Protocol::CRLF << flush;
195
207
        }
196
208
      }