I'm confused about what you mean by send to a data file? Or data queue? Are you talking about sockets -- sending packets via sockets to another computer? Or are you talking about copying a file 128 bytes at a time ?
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
open the file in binary mode then read it 128 bytes at a time
FILE* fp = fopen(arg[2],"rb");
char buf[128];
size_t nBytesRead;
while( (nBytesRead = fread(buf, 1, sizeof(buf), fp)) > 0)
{
}
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343