gevent pywsgi服务器(一个python网络库)的websocket处理程序
gevent-websocket的Python项目详细描述
根据apache许可证2.0版(以下简称"许可证");
除非符合许可证,否则您不得使用此文件。
您可以在http://www.apache.org/licenses/license-2.0
http://www.apache.org/licenses/license-2.0
以书面形式,根据许可证分发的软件是按"原样"分发的,
无任何明示或暗示的保证或条件。
请参阅许可证,了解管辖许可证的特定语言和许可证的限制。
nload url:https://www.gitlab.com/noppo/gevent websocket
描述:======
gevent websocket
=========
`gevent websocket``是gevent网络库的websocket库。
/>
-在套接字级别或使用抽象接口进行集成。
-使用"wamp"的rpc和pubsub框架(websocket应用程序
消息传递协议)。
-使用简单的websocket协议插件api轻松扩展
::
def on_消息(self,消息):
self.ws.send(消息)
def on_close(self,原因):
print reason
('',8000),
resorce({'/':echoapplication})
。永远服务于gevent import pywsgi
或低级实现::
gevent import pywsgi
gevent websocket.handler import websockethandler
def websocket\u app(environ,启动响应:
如果environ["path_info"]='/echo':
ws=environ["wsgi.websocket"]
message=ws.receive()
ws.send(message)
server=pywsgi.wsgiserver(("",8000),websocket_app,,
handler_class=websockethandler)
server.serve_forever()
可以在"examples"目录中找到更多示例。希望不久将有更多的
文档可用。
$pip安装gevent websocket
^^^^^^^^^^^^^^^
只有上一个示例中的
`websocket_app`才需要启动服务器。
使用以下命令和工作类启动gunicorn以启用应用程序的websocket功能。
:-k"gevent websocket.gunicorn.workers.geventwebsocketworker"wsgi:websocket应用程序
/wsaccel>;``和'ujson'或'simplejson':
$pip安装wsaccel ujson
`gevent websocket``自动检测'wsaccell``并使用cython
实现进行utf8验证,稍后还会进行帧屏蔽和demaskIN/BR/>
联系
^^^^^^^^^^^^^^^
联系freenode上的irc gevent或gevent'mailinglist上的gevent
<;https://groups.google.com/forum/!论坛/gevent>;`。可以在"bitbucket"上创建问题
<;https://bitbucket.org/jeffrey/gevent-websocket/issues?status=new&status=open>;`.
…_ wamp:http://www.wamp.ws
。_ gevent-websocket:http://www.bitbucket.org/jeffrey/gevent-websocket/
。_ 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/?include_text=1
平台:未知
分类器:环境::Web环境
分类器:预期受众::开发人员
分类器:许可证::OSI批准::Apache软件许可证
分类器:操作系统::MacOS::MacOS X
分类器:操作系统::posix
分类器:编程语言::python
分类器:编程语言::python::2
分类器:编程语言::python::2.7
分类器:编程语言::python::3
分类器:编程语言::python::3.5
分类器:主题::内部t
分类器:主题::软件开发::库::python模块
除非符合许可证,否则您不得使用此文件。
您可以在http://www.apache.org/licenses/license-2.0
http://www.apache.org/licenses/license-2.0
以书面形式,根据许可证分发的软件是按"原样"分发的,
无任何明示或暗示的保证或条件。
请参阅许可证,了解管辖许可证的特定语言和许可证的限制。
nload url:https://www.gitlab.com/noppo/gevent websocket
描述:======
gevent websocket
=========
`gevent websocket``是gevent网络库的websocket库。
/>
-在套接字级别或使用抽象接口进行集成。
-使用"wamp"的rpc和pubsub框架(websocket应用程序
消息传递协议)。
-使用简单的websocket协议插件api轻松扩展
::
def on_消息(self,消息):
self.ws.send(消息)
def on_close(self,原因):
print reason
resorce({'/':echoapplication})
。永远服务于gevent import pywsgi
或低级实现::
gevent import pywsgi
gevent websocket.handler import websockethandler
def websocket\u app(environ,启动响应:
如果environ["path_info"]='/echo':
ws=environ["wsgi.websocket"]
message=ws.receive()
ws.send(message)
server=pywsgi.wsgiserver(("",8000),websocket_app,,
handler_class=websockethandler)
server.serve_forever()
可以在"examples"目录中找到更多示例。希望不久将有更多的
文档可用。
$pip安装gevent websocket
只有上一个示例中的
`websocket_app`才需要启动服务器。
使用以下命令和工作类启动gunicorn以启用应用程序的websocket功能。
:-k"gevent websocket.gunicorn.workers.geventwebsocketworker"wsgi:websocket应用程序
/wsaccel>;``和'ujson'或'simplejson':
$pip安装wsaccel ujson
`gevent websocket``自动检测'wsaccell``并使用cython
实现进行utf8验证,稍后还会进行帧屏蔽和demaskIN/BR/>
联系
^^^^^^^^^^^^^^^
联系freenode上的irc gevent或gevent'mailinglist上的gevent
<;https://groups.google.com/forum/!论坛/gevent>;`。可以在"bitbucket"上创建问题
<;https://bitbucket.org/jeffrey/gevent-websocket/issues?status=new&status=open>;`.
…_ wamp:http://www.wamp.ws
。_ gevent-websocket:http://www.bitbucket.org/jeffrey/gevent-websocket/
。_ 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/?include_text=1
平台:未知
分类器:环境::Web环境
分类器:预期受众::开发人员
分类器:许可证::OSI批准::Apache软件许可证
分类器:操作系统::MacOS::MacOS X
分类器:操作系统::posix
分类器:编程语言::python
分类器:编程语言::python::2
分类器:编程语言::python::2.7
分类器:编程语言::python::3
分类器:编程语言::python::3.5
分类器:主题::内部t
分类器:主题::软件开发::库::python模块