don't need 'binary' subprotocol stuff

This commit is contained in:
meejah 2021-04-07 16:26:28 -06:00
parent 0aaf00f803
commit 40e14174e7
2 changed files with 0 additions and 12 deletions

View File

@ -57,7 +57,6 @@ def makeService(config, reactor=reactor):
ws_factory = WebSocketServerFactory("ws://localhost:4002") # FIXME: url
ws_factory.protocol = transit_server.WebSocketTransitConnection
ws_factory.websocket_protocols = ["binary"]
tcp_factory.transit = transit
ws_factory.transit = transit

View File

@ -240,17 +240,6 @@ class WebSocketTransitConnection(WebSocketServerProtocol):
self._buddy._client.transport.loseConnection()
self._buddy = None
def onConnect(self, request):
"""
IWebSocketChannel API
"""
# print("onConnect: {}".format(request))
# ideally more like self._reactor.seconds() ... but Twisted
# doesn't have a good way to get the reactor for a protocol
# (besides "use the global one")
print("protocols: {}".format(request.protocols))
return 'binary'
def connectionMade(self):
"""
IProtocol API