Mongoose Web Server, how do disable output buffer

The Mongoose webserver will buffer the output.  Once the buffer is filled then it will output the content, so it is as if the HTML hangs in the middle of rendering.

Is there a way to disable the buffer (or turn on  autoflush)
rgbcofAsked:
Who is Participating?
 
gheistConnect With a Mentor Commented:
0
 
gheistCommented:
Do you mean setsockopt(sock,TCP_NODELAY) ?
0
 
rgbcofAuthor Commented:
I mean when I launch mongoose, is there an option to flush out the buffer.
For example:
/usr/local/bin/mongoose -ssl_cert /var/www/conf/server.pem -ports 443s -root /var/www/html -dir_list no -access_log /var/log/httpd_access -error_log /var/log/httpd_error
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
gheistCommented:
There is no command line option to do that. You have to change the code and recompile.
Does it have to do at all with apache?
If your operating system supports you can disable NAGLE's aka enable NODELAY.
0
 
rgbcofAuthor Commented:
Would you happen to know where it is on FreeBSD?
0
 
gheistCommented:
PS it's socket IO code is far from optimal, it is not a setsockopt one-liner to fix it.
PPS use thttpd,nginx or something else well established on the scene.
0
 
gheistCommented:
On FreeBSD you have to recompile, and rewrite worker_thread function to set socket options before sending output to them.
If you do not program, it is a no-go.
0
 
rgbcofAuthor Commented:
0
 
rgbcofAuthor Commented:
Thanks for the prompt response.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.