Exemplo n.º 1
0
	def connectionLost(self, reason):
		WebSocketServerProtocol.connectionLost(self, reason)
		if self.room:
			self.factory.broadcast(self.room.setOnline(self.name, False), self.room.name, self)
			if self.room.empty():
				self.factory.roomEmpty(self.room.name)
		self.factory.unregister(self)
Exemplo n.º 2
0
 def connectionLost(self, reason):
     try:
         self.factory.clients.remove(self)
     except ValueError:
         # client doesn't exist, pass
         pass
     WebSocketServerProtocol.connectionLost(self, reason)
Exemplo n.º 3
0
	def connectionLost(self, reason):
		try:
			self.factory.clients.remove(self)
		except ValueError:
			# client doesn't exist, pass
			pass
		WebSocketServerProtocol.connectionLost(self, reason)
Exemplo n.º 4
0
    def connectionLost(self, reason):
        WebSocketServerProtocol.connectionLost(self, reason)

        envelopes = handler.unregisterClient(self)
        self.factory.sendEnvelopes(envelopes)

        self.factory.unregister(self)
Exemplo n.º 5
0
   def connectionLost(self, reason):
      WebSocketServerProtocol.connectionLost(self, reason)

      self.factory.stats.trackOctetsWireIn(self.trafficStats.preopenIncomingOctetsWireLevel + \
                                           self.trafficStats.incomingOctetsWireLevel)

      self.factory.stats.trackOctetsWireOut(self.trafficStats.preopenOutgoingOctetsWireLevel + \
                                            self.trafficStats.outgoingOctetsWireLevel)
Exemplo n.º 6
0
    def connectionLost(self, reason):
        WebSocketServerProtocol.connectionLost(self, reason)

        self.factory.stats.trackOctetsWireIn(self.trafficStats.preopenIncomingOctetsWireLevel + \
                                             self.trafficStats.incomingOctetsWireLevel)

        self.factory.stats.trackOctetsWireOut(self.trafficStats.preopenOutgoingOctetsWireLevel + \
                                              self.trafficStats.outgoingOctetsWireLevel)
Exemplo n.º 7
0
	def connectionLost(self, reason):
		WebSocketServerProtocol.connectionLost(self, reason)

		if self.connected:
			self.room.user_disconnect(self.user_session)

		self.connected = False
		self.user_session = None
		self.room = None
Exemplo n.º 8
0
    def connectionLost(self, reason):

        """

        Unregister each client (self) as it disconnects.

        """

        WebSocketServerProtocol.connectionLost(self, reason)
        self.factory.unregister(self)
Exemplo n.º 9
0
 def connectionLost(self, reason):
    WebSocketServerProtocol.connectionLost(self, reason)
    try:
        del self.factory.posdict[self.peerstr]
    except KeyError:
        pass
    try:
        del self.factory.statedict[self.peerstr]
    except KeyError:
        pass
    self.factory.unregister(self)
Exemplo n.º 10
0
	def connectionLost(self, reason):
		global serial_port
		global serial_device
		global serial_baudrate

		if not self.connection_invalid:
			print "Disconnect Message Received"
			if serial_port != None:
				oldserial = serial_port
				serial_port = None
				serial_device = None
				serial_baudrate = None
				self.read_thread.stop()
				self.read_thread.join()
				oldserial.close()
		WebSocketServerProtocol.connectionLost(self, reason)
Exemplo n.º 11
0
 def connectionLost(self, reason):
    WebSocketServerProtocol.connectionLost(self, reason)
    self.send_hello = False
Exemplo n.º 12
0
 def connectionLost(self, reason):
    DomotikaAjaxProtocol.connectionLost(self, 'autobahn', reason)
    WebSocketServerProtocol.connectionLost(self, reason)
Exemplo n.º 13
0
 def connectionLost(self, reason):
     WebSocketServerProtocol.connectionLost(self, reason)
     self.factory.handle_request_end(self)
 def connectionLost(self, reason):
     WebSocketServerProtocol.connectionLost(self, reason)
     #super(WebSocketProcessOutputterThing, self).connectionLost(self, reason)
     self.factory.unregister(self)
Exemplo n.º 15
0
 def connectionLost(self, reason):
   '''Override function. 
   '''
   WebSocketServerProtocol.connectionLost(self, reason)
   self.factory.unregister(self)
Exemplo n.º 16
0
 def connectionLost(self, reason):
     WebSocketServerProtocol.connectionLost(self, reason)
     self.factory.onConnectionCountChanged()
Exemplo n.º 17
0
 def connectionLost(self, reason=None):
     WebSocketServerProtocol.connectionLost(self, reason)
     if self in self.factory.clients:
         self.factory.clients.remove(self)
Exemplo n.º 18
0
 def connectionLost(self, reason):
     WebSocketServerProtocol.connectionLost(self, reason)
     logging.info('Connection lost from %s!', self.peerstr)
     self.factory.clients.remove(self)
Exemplo n.º 19
0
 def connectionLost(self, reason):
     WebSocketServerProtocol.connectionLost(self, reason)
     self.factory.leave(self.peer)
Exemplo n.º 20
0
 def connectionLost(self, reason):
     WebSocketServerProtocol.connectionLost(self, reason)
     log.msg("Simulator disconnected...")
Exemplo n.º 21
0
 def connectionLost(self, reason):
   WebSocketServerProtocol.connectionLost(self, reason)
   # app.logger.debug("socket lost for %s: %s" % (self.peerstr, reason))
   self.factory.unregister(self, self.user)
Exemplo n.º 22
0
 def connectionLost(self, reason):
    WebSocketServerProtocol.connectionLost(self, reason)
Exemplo n.º 23
0
 def connectionLost(self, reason):
     print 'Connection lost by ' + self.client
     self.client = None
     WebSocketServerProtocol.connectionLost(self, reason)
Exemplo n.º 24
0
 def connectionLost(self, reason):
     WebSocketServerProtocol.connectionLost(self, reason)
Exemplo n.º 25
0
 def connectionLost(self, reason):
     """Log when the connection is lost"""
     LOG.info('wshandler: Connection lost')
     WebSocketServerProtocol.connectionLost(self, reason)
Exemplo n.º 26
0
 def connectionLost(self, reason):
    WebSocketServerProtocol.connectionLost(self, reason)
    self.factory.onConnectionCountChanged()
Exemplo n.º 27
0
 def connectionLost(self, reason):
     WebSocketServerProtocol.connectionLost(self, reason)
     print "Connection lost, reason", reason
Exemplo n.º 28
0
 def connectionLost(self,reason):
     self.factory.connections.remove(self)
     WebSocketServerProtocol.connectionLost(self, reason)#always after your code
Exemplo n.º 29
0
 def connectionLost(self, reason):
     WebSocketServerProtocol.connectionLost(self, reason)
     self.factory.unregister(self)
Exemplo n.º 30
0
 def connectionLost(self, reason):
     """Log when the connection is lost"""
     LOG.info('wshandler: Connection lost')
     WebSocketServerProtocol.connectionLost(self, reason)
Exemplo n.º 31
0
	def connectionLost(self, reason):
		WebSocketServerProtocol.connectionLost(self, reason)
		self.factory.unregister(self)
Exemplo n.º 32
0
 def connectionLost(self, reason):
     """Log when the connection is lost"""
     self._log('Connection lost')
     WebSocketServerProtocol.connectionLost(self, reason)