class WebSocket(geventserver.WebSocket): def opened(self): self.subscriber = Subscriber(self) def received_message(self, message): self.subscriber.receive(message.data) def closed(self, code, reason=None): self.subscriber.kill() del self.subscriber
def opened(self): self.subscriber = Subscriber(self)