WAFer 基于C语言的超轻可伸缩的服务器端web应用程序框架(wafer连接器是什么意思)

网友投稿 788 2022-10-12

WAFer 基于C语言的超轻可伸缩的服务器端web应用程序框架(wafer连接器是什么意思)

WAFer 基于C语言的超轻可伸缩的服务器端web应用程序框架(wafer连接器是什么意思)

WAFer

WAFer is a C language-based ultra-light scalable server-side web applications framework. Think node.js for C programmers. Because it's written in C for the C eco system, WAFer is wafer-thins with a memory footprint that is only a fraction of that of node.js and other bulky frameworks.

Just copy server.c (say, as myserver.c), put your code inside the function void server(Request request) in myserver.c and, make with make SERVER=myserver, and you are good to go.

WAFer can operate in many different configurations, all selected at compile time. They include:

Single-threaded (Default) or multi-threaded (make with THREADS=n where n>0) Select(Default) or epoll (make with LOOP=epoll) based event loop C10K mode (make with LOOP=epoll MAX_CON_CONS=n where n>10,000)

Default port is 4242. Set environment variable 'PORT' to change it.

That's really it. The source comes with a simple example example.c to get you started.

Note to Contributors

Thank you for making this a wonderful project!

Here's our preferred formatting style:

find . \( -name '*.c' -o -name '*.h' \) -exec indent --no-tabs --linux-style --line-length 90 --indent-level 4 -bli0 \{\} \;

Acknowledgements

J. David Blackstone and Feng Shen, whose web servers have been repurposed to build this platform. Mark Karpeles for the incredible number of bug fixes! Fine folks at /r/programming for the honest and constructive feedback.

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:Python | JSON 数据解析(Json & JsonPath)
下一篇:openlayers | ol.Overlay实现点击地图图标,图标跳动
相关文章

 发表评论

暂时没有评论,来抢沙发吧~