bjoern 介绍
bjoern 是个快速、超轻量级的 HTTP/1.1 WSGI 服务器软件,为 CPython 编写。使用 C 语言开发,基于
Libev 事件库和 http-
parser 开发,这是一个单线程的服务,占用内存非常低。
示例代码:
# Bind to TCP host/port pair: bjoern.run(wsgi_application, host, port) # TCP host/port pair, enabling SO_REUSEPORT if available. bjoern.run(wsgi_application, host, port, reuseport=True) # Bind to Unix socket: bjoern.run(wsgi_application, 'unix:/path/to/socket') # Bind to abstract Unix socket: (Linux only) bjoern.run(wsgi_application, 'unix:@socket_name') bjoern.listen(wsgi_application, host, port) bjoern.run()
bjoern 官网
https://github.com/jonashaag/bjoern
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。