check received sequence number for gaps and duplicates

This commit is contained in:
orignal 2014-01-19 12:01:12 -05:00
parent 5b025909b6
commit c762e41b05
2 changed files with 35 additions and 13 deletions

View file

@ -183,6 +183,8 @@ namespace util
std::stringstream ss;
uint8_t buf[8192];
size_t r = s->Receive (buf, 8192, 30); // 30 seconds
if (!r && s->IsEstablished ()) // nothing received but connection is established
r = s->Receive (buf, 8192, 30); // wait for another 30 secondd
if (r) // we recieved data
{
ss << std::string ((char *)buf, r);