dorinda
asked on
flush buffer when using internet daemon
I need to know how to flush the buffer when using internet dameon? I have tried fflush(stdout) but that didn't seem to work.
An example would be appreciated.
An example would be appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The problem turned out to not be the buffer but an overflow on a variable.
ASKER
--------------------------
{
TBuff[0] = START_OF_MSG_CHAR;
snprintf(buff, sizeof(buff), "%s", START_OF_MSG_CHAR);
write(0, TBuff, strlen(TBuff));
ioctl(0, FLUSHW);
//flushq(q, 0);
//bdflush();
VBPtr = VBPtr + 1;
VBArray1[VBPtr][0] = END_OF_MSG_CHAR;
for (x = 0; x < VBPtr + 1; x++)
{
if (x < 241)
{
snprintf(buff, sizeof(VBArray1[x]), "%s", VBArray1[x]);
write(0, buff, strlen(buff));
ioctl(0, FLUSHW);
}
}
} /* vbsend */