gevent pywsgi服务器(一个python网络库)的websocket处理程序
gwebsocket的Python项目详细描述
==
gwebsocket是一个gevent网络库的websocket库。
`gwebsocket``是一个gevent网络库的websocket库。
:
:
gevent import pywsgi
gwebsocket.handler从gwebsocket.handler导入websockethandler
def websocket-u-app(environ,start-u-response):
如果environ[“路径信息”]=====
ws=environ[“wsgi.websocket”]
消息=ws.receive()
ws.send(消息)
server=pywsgi.wsgiserver((“”,8000),websocket_app,
handler_class=websockethandler)
server.serve_forever()
安装
----
pypi使用pip或
setuptools通过运行以下命令::
$pip安装gwebsocket
^^^^^^^^^^^^^^^^^^^^^
只有上一个示例中的
`websocket_app`才需要启动服务器。
使用以下命令和工作类启动gunicorn以启用应用程序的websocket功能。
:
`和'ujson'或'simplejson':
$pip install wsaccel ujson
`gwebsocket``自动检测'wsaccell``并使用cython
实现进行utf8验证,稍后还进行帧屏蔽和去屏蔽。
联系
^^^^^^^^^^^^^^^^^^^^^^^^
可以在'bitbucket<上创建问题;https://bitbucket.org/btubbs/gwebsocket/issues?网址:http://bitbucket.org/btubbs/gwebsocket/issues?status=new&status=open>;`.
acknowledments
^^^^^^^^^^^^^^^
gWebsocket基于“jeffrey gelens`` gevent websocket`.
gWebsocket省略了gevent websocket的WAMP功能和websocketapplication mini
框架,有利于为其他
框架提供最小的库。gWebSocket还可以在关闭时进行清理,而无需将应用程序构建为WebSocket应用程序。_ gWebsocket:http://www.bitbucket.org/btubs/gWebsocket/
。_ gevent:http://www.gevent.org/
。_杰弗里盖伦斯:http://www.gelens.org/
。_ pypi:http://pypi.python.org/pypi/gevent websocket/
。_存储库:http://www.bitbucket.org/jeffrey/gevent websocket/
。_ RFC6455:http://datatracker.ietf.org/doc/RFC6455/?包含文本=1
gwebsocket是一个gevent网络库的websocket库。
`gwebsocket``是一个gevent网络库的websocket库。
:
:
gevent import pywsgi
gwebsocket.handler从gwebsocket.handler导入websockethandler
def websocket-u-app(environ,start-u-response):
如果environ[“路径信息”]=====
ws=environ[“wsgi.websocket”]
消息=ws.receive()
ws.send(消息)
server=pywsgi.wsgiserver((“”,8000),websocket_app,
handler_class=websockethandler)
server.serve_forever()
安装
----
pypi使用pip或
setuptools通过运行以下命令::
$pip安装gwebsocket
只有上一个示例中的
`websocket_app`才需要启动服务器。
使用以下命令和工作类启动gunicorn以启用应用程序的websocket功能。
:
`和'ujson'或'simplejson':
$pip install wsaccel ujson
`gwebsocket``自动检测'wsaccell``并使用cython
实现进行utf8验证,稍后还进行帧屏蔽和去屏蔽。
联系
^^^^^^^^^^^^^^^^^^^^^^^^
可以在'bitbucket<上创建问题;https://bitbucket.org/btubbs/gwebsocket/issues?网址:http://bitbucket.org/btubbs/gwebsocket/issues?status=new&status=open>;`.
acknowledments
^^^^^^^^^^^^^^^
gWebsocket基于“jeffrey gelens`` gevent websocket`.
gWebsocket省略了gevent websocket的WAMP功能和websocketapplication mini
框架,有利于为其他
框架提供最小的库。gWebSocket还可以在关闭时进行清理,而无需将应用程序构建为WebSocket应用程序。_ gWebsocket:http://www.bitbucket.org/btubs/gWebsocket/
。_ gevent:http://www.gevent.org/
。_杰弗里盖伦斯:http://www.gelens.org/
。_ pypi:http://pypi.python.org/pypi/gevent websocket/
。_存储库:http://www.bitbucket.org/jeffrey/gevent websocket/
。_ RFC6455:http://datatracker.ietf.org/doc/RFC6455/?包含文本=1