예제 #1
0
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
예제 #2
0
 def opened(self):
     self.subscriber = Subscriber(self)