cleanup
This commit is contained in:
parent
941e4fe18a
commit
eb3bc6b5a8
|
@ -504,14 +504,11 @@ class UsageWebSockets(Usage):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def new_protocol(self):
|
def new_protocol(self):
|
||||||
ws_factory = WebSocketServerFactory("ws://localhost:4002") # FIXME: url
|
ws_factory = WebSocketServerFactory("ws://localhost:4002")
|
||||||
ws_factory.protocol = WebSocketTransitConnection
|
ws_factory.protocol = WebSocketTransitConnection
|
||||||
ws_factory.transit = self._transit_server
|
ws_factory.transit = self._transit_server
|
||||||
ws_factory.websocket_protocols = ["binary"]
|
|
||||||
ws_protocol = ws_factory.buildProtocol(('127.0.0.1', 0))
|
ws_protocol = ws_factory.buildProtocol(('127.0.0.1', 0))
|
||||||
|
|
||||||
from autobahn.twisted.websocket import WebSocketClientFactory, WebSocketClientProtocol
|
|
||||||
|
|
||||||
class TransitWebSocketClientProtocol(WebSocketClientProtocol):
|
class TransitWebSocketClientProtocol(WebSocketClientProtocol):
|
||||||
def send(self, data):
|
def send(self, data):
|
||||||
self.sendMessage(data, True)
|
self.sendMessage(data, True)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user