how divide herader from binary data
- by fixo2020
Hi, I have this code:
ofstream dest("test.txt",ios::binary);
while (true){
size_t retval = recv (sd, buffer, sizeof(buffer), 0);
dest.write(buffer,retval);
if(retval <= 0) { delete[] buffer; break;}
}
Now, the recv() function return 4 bytes each loop right? and buffer contain it, this return all data so, pseudo-header and binary…