char *ptr = static_cast<char *>(
memmem(response.data(), response.size(), "\r\n\r\n", 4));
assert(ptr != NULL);
char *ptr = static_cast<char *>(
memmem(response.data(), response.size(), "\r\n\r\n", 4));
assert(ptr != NULL);
// See if we have the entire block. If not, wait for more data.
if (pending_data.size() < sizeof(metacube_block_header) + size) {
return;
// See if we have the entire block. If not, wait for more data.
if (pending_data.size() < sizeof(metacube_block_header) + size) {
return;
}
log(WARNING, "[%s] Dropping %lld junk bytes from stream, maybe it is not a Metacube stream?",
url.c_str(), (long long)num_bytes);
}
log(WARNING, "[%s] Dropping %lld junk bytes from stream, maybe it is not a Metacube stream?",
url.c_str(), (long long)num_bytes);