mirror of
https://github.com/evennia/evennia.git
synced 2026-03-28 18:47:16 +01:00
Converted webclient to use websockets on port 8001. Ideally one would make it so the ajax and websocket clients work under the same django wrapper, but for now this functionality is elusive.
This commit is contained in:
parent
2a6cfaca7d
commit
ede6634081
11 changed files with 326 additions and 37 deletions
|
|
@ -262,6 +262,12 @@ if WEBSERVER_ENABLED:
|
|||
web_root.putChild("webclientdata", webclient)
|
||||
webclientstr = "/client"
|
||||
|
||||
#from src.server.portal import websocket
|
||||
#factory = protocol.ServerFactory()
|
||||
#websocketclient = websocket.WebSocketProtocol()
|
||||
#websocketclient.sessionhandler = PORTAL_SESSIONS
|
||||
#web_root.putChild("websocket", websocketclient)
|
||||
|
||||
web_root = server.Site(web_root, logPath=settings.HTTP_LOG_FILE)
|
||||
proxy_service = internet.TCPServer(proxyport,
|
||||
web_root,
|
||||
|
|
@ -270,7 +276,6 @@ if WEBSERVER_ENABLED:
|
|||
PORTAL.services.addService(proxy_service)
|
||||
print " webproxy%s%s:%s (<-> %s)" % (webclientstr, ifacestr, proxyport, serverport)
|
||||
|
||||
|
||||
if WEBSOCKET_ENABLED:
|
||||
# websocket support is experimental!
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ class WebSocketProtocol(Protocol, Session):
|
|||
"""
|
||||
This is called when the connection is first established
|
||||
"""
|
||||
|
||||
def connectionMade(self):
|
||||
"""
|
||||
This is called when the connection is first established.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue