[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 759
  • Last Modified:

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)
0
rgbcof
Asked:
rgbcof
  • 5
  • 4
1 Solution
 
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
 
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
gheistCommented:
0
 
rgbcofAuthor Commented:
Thanks for the prompt response.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now