Skip to content
This repository has been archived by the owner on May 24, 2018. It is now read-only.

Commit

Permalink
Merge pull request #174 from Unity-Technologies/staging
Browse files Browse the repository at this point in the history
autobahn fixes
  • Loading branch information
mariangemarcano committed Jun 17, 2016
2 parents 921ceb4 + 562deaf commit 39e31a8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions autobahn/autobahnServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ def pollFailure(self):
class BroadcastServerProtocol(WebSocketServerProtocol):
def __init__(self):
self.peerstr = ""
WebSocketServerProtocol.__init__(self)


def onOpen(self):
self.factory.register(self)
Expand All @@ -110,7 +112,7 @@ class BroadcastServerFactory(WebSocketServerFactory):
"""

def __init__(self, url, debug=False, debugCodePaths=False):
WebSocketServerFactory.__init__(self, url, debug=debug, debugCodePaths=debugCodePaths)
WebSocketServerFactory.__init__(self, url)
self.urlCacheDict = {}
self.clients = []
self.clients_urls = {}
Expand Down Expand Up @@ -334,11 +336,10 @@ def createDeamon():
debugCodePaths=debug)

factory.protocol = BroadcastServerProtocol
factory.setProtocolOptions(allowHixie76=True)
factory.setProtocolOptions()
listenWS(factory)

webdir = File(".")
sweb = Site(webdir)
reactor.listenTCP(8080, factory)
reactor.run()
logging.info("Starting autobahn server on port {0}".format(PORT))
reactor.run()
logging.info("Starting autobahn server on port {0}".format(PORT))

0 comments on commit 39e31a8

Please sign in to comment.