Пример #1
0
   def connectionLost(self, reason):
      WampServerProtocol.connectionLost(self, reason)

      self.memoryChartVirt.timer.stop()
      self.memoryChartVirt = None

      self.memoryChartSwap.timer.stop()
      self.memoryChartSwap = None
Пример #2
0
 def connectionLost(self, reason):
    """
    When connection is gone (i.e. client close window, navigated
    away from the page), stop the model timer, which holds last
    reference to model, and delete the model
    """
    WampServerProtocol.connectionLost(self, reason)
    self.infoModel = None
Пример #3
0
   def onSessionOpen(self):

      if self.factory.config.secure:
         ## require WAMP-CRA authentication

         self.clientAuthTimeout = 0
         self.clientAuthAllowAnonymous = True
         WampCraServerProtocol.onSessionOpen(self)

      else:
         WampServerProtocol.onSessionOpen(self)
         self.onReady()
Пример #4
0
   def onSessionOpen(self):

      if self.factory.config.secure:
         ## require WAMP-CRA authentication

         self.clientAuthTimeout = 0
         self.clientAuthAllowAnonymous = True
         WampCraServerProtocol.onSessionOpen(self)

      else:
         WampServerProtocol.onSessionOpen(self)
         self.onReady()
Пример #5
0
    def connectionLost(self, reason):

        client = client_map.get(self.session_id)
        if client is not None:

            self.unsetPlayer(client)

            client.disconnect()
            del client_map[self.session_id]

        # send an actual list of connected users
        dispatchUsers()

        WampServerProtocol.connectionLost(self, reason)
Пример #6
0
   def connectionLost(self, reason):
      """
      When connection is gone (i.e. client close window, navigated
      away from the page), stop the model timer, which holds last
      reference to model, and delete the model
      """
      
      WampServerProtocol.connectionLost(self, reason)

      self.memoryChartVirt.timer.stop()
      self.memoryChartVirt = None

      self.memoryChartSwap.timer.stop()
      self.memoryChartSwap = None

      self.memoryInfoVirt.timer.stop()
      self.memoryInfoVirt = None

      self.memoryInfoSwap.timer.stop()
      self.memoryInfoSwap = None
Пример #7
0
 def onMessage(self, msg, binary):
     WampServerProtocol.onMessage(self, msg, binary)
Пример #8
0
 def connectionLost(self, reason):
     WampServerProtocol.connectionLost(self, reason)
     self.factory.unregister(self)
Пример #9
0
 def onOpen(self):
     self.factory.register(self)
     WampServerProtocol.onOpen(self)
Пример #10
0
 def connectionLost(self, reason):
     self.pubsub.send_users_list(exclude=[self])
     WampServerProtocol.connectionLost(self, reason)
Пример #11
0
 def connectionLost(self, reason):
     WampServerProtocol.connectionLost(self, reason)
     self.factory.removeConnection(self)
Пример #12
0
 def connectionLost(self, reason):
     text = getattr(reason, 'value', reason)
     log.msg('lost session from %s:%s' % (str(self.peer), text))
     WampServerProtocol.connectionLost(self, reason)
     BroadcastServerProtocol.metrics["sessions_closed"] += 1