First version of working websocket protocol.
This commit is contained in:
parent
01d15f13ee
commit
ef0a154a61
5 changed files with 53 additions and 36 deletions
|
|
@ -285,10 +285,10 @@ if WEBSOCKET_ENABLED:
|
|||
ifacestr = "-%s" % interface
|
||||
for port in WEBSOCKET_PORTS:
|
||||
pstring = "%s:%s" % (ifacestr, port)
|
||||
factory = WebSocketFactory(protocol.ServerFactory())
|
||||
factory = protocol.ServerFactory()
|
||||
factory.protocol = websocket.WebSocketProtocol
|
||||
factory.sessionhandler = PORTAL_SESSIONS
|
||||
websocket_service = internet.TCPServer(port, factory, interface=interface)
|
||||
websocket_service = internet.TCPServer(port, WebSocketFactory(factory), interface=interface)
|
||||
websocket_service.setName('EvenniaWebSocket%s' % pstring)
|
||||
PORTAL.services.addService(websocket_service)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue