Esempio n. 1
0
   def connectionLost(self, reason):
      WampServerProtocol.connectionLost(self, reason)

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

      self.memoryChartSwap.timer.stop()
      self.memoryChartSwap = None
Esempio n. 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
Esempio n. 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()
Esempio n. 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()
Esempio n. 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)
Esempio n. 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
Esempio n. 7
0
 def onMessage(self, msg, binary):
     WampServerProtocol.onMessage(self, msg, binary)
Esempio n. 8
0
 def connectionLost(self, reason):
     WampServerProtocol.connectionLost(self, reason)
     self.factory.unregister(self)
Esempio n. 9
0
 def onOpen(self):
     self.factory.register(self)
     WampServerProtocol.onOpen(self)
Esempio n. 10
0
 def connectionLost(self, reason):
     self.pubsub.send_users_list(exclude=[self])
     WampServerProtocol.connectionLost(self, reason)
Esempio n. 11
0
 def connectionLost(self, reason):
     WampServerProtocol.connectionLost(self, reason)
     self.factory.removeConnection(self)
Esempio n. 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