Guys,
What's the preferred method for block flushing output to the client when the
buffer is becoming full?
I read one post on the forum, from Laurie Gellatly, which said he calls
'writeremote' when the buffer is becoming full.
I couldn't find this function or anything similar in the source
distribution!
Example:
void streamLogFile(struct shttpd_arg *arg, char *logname) {
int state = (int) arg->state;
ifstream is("some_well_formed_html.html");
while(!is.eof() && arg->out.num_bytes < arg->out.len) {
arg->out.buf[arg->out.num_bytes] = is.get();
arg->out.num_bytes++;
state++;
// call function to flush output to client when internal buffer
is becoming full?
}
arg->state = (void *) state;
is.close();
}
Regards,
John.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
shttpd-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shttpd-general