我有一個簡單的Web應用程序,它使用CherryPy作爲RESTful後端,ws4py作爲websockets。 1) Javascript client sends a POST to Python backend
2) Python replies with a unique id
3) Javascript connects to the websocket and sends the
我想在CherryPy中使用ws4py動態創建/銷燬「websocket-capable」路徑。下面是一個說明該問題的完整方案: import cherrypy
from ws4py.server.cherrypyserver import WebSocketPlugin, WebSocketTool
from ws4py.websocket import EchoWebSocket, Web