コード例 #1
0
ファイル: client.py プロジェクト: stephica/poker-network
 def __init__(self):
     self._ping_timer = None
     self.user = User()
     self.bufferized_packets = []
     UGAMEProtocol.__init__(self)
     self._ping_delay = 5
     self.connection_lost_deferred = defer.Deferred()
コード例 #2
0
ファイル: client.py プロジェクト: dottobr83/pokernetwork
 def connectionLost(self, reason):
     self.factory.protocol_instance = None
     UGAMEProtocol.connectionLost(self, reason)
     d = self.connection_lost_deferred
     self.connection_lost_deferred = None
     d.callback(self)
     self.connection_lost_deferred = defer.Deferred()
コード例 #3
0
ファイル: client.py プロジェクト: yxjsolid/pokernetwork
 def connectionLost(self, reason):
     self.factory.protocol_instance = None
     UGAMEProtocol.connectionLost(self, reason)
     d = self.connection_lost_deferred
     self.connection_lost_deferred = None
     d.callback(self)
     self.connection_lost_deferred = defer.Deferred()
コード例 #4
0
ファイル: server.py プロジェクト: Usr-X/poker-network
 def __init__(self):
     self.log = log.getChild(self.__class__.__name__)
     self._ping_timer = None
     self.bufferized_packets = []
     self.avatar = None
     UGAMEProtocol.__init__(self)
     self._ping_delay = 10
コード例 #5
0
ファイル: client.py プロジェクト: dottobr83/pokernetwork
 def __init__(self):
     self.log = UGAMEClientProtocol.log.get_instance(self, refs=[
         ('User', self, lambda x: x.user.serial if x.user.serial > 0 else None)
     ])
     self.user = User()
     UGAMEProtocol.__init__(self)
     self._keepalive_delay = 5
     self.connection_lost_deferred = defer.Deferred()
コード例 #6
0
ファイル: client.py プロジェクト: yxjsolid/pokernetwork
 def __init__(self):
     self.log = UGAMEClientProtocol.log.get_instance(
         self,
         refs=[('User', self, lambda x: x.user.serial
                if x.user.serial > 0 else None)])
     self.user = User()
     UGAMEProtocol.__init__(self)
     self._keepalive_delay = 5
     self.connection_lost_deferred = defer.Deferred()
コード例 #7
0
ファイル: client.py プロジェクト: pokermania/poker-network
 def __init__(self):
     self.log = UGAMEClientProtocol.log.get_instance(self, refs=[
         ('User', self, lambda x: x.user.serial if x.user.serial > 0 else None)
     ])
     self._ping_timer = None
     self.user = User()
     self.bufferized_packets = []
     UGAMEProtocol.__init__(self)
     self._ping_delay = 5
     self.connection_lost_deferred = defer.Deferred()
コード例 #8
0
ファイル: client.py プロジェクト: Usr-X/poker-network
 def __init__(self):
     self.log = log.getChild(
         self.__class__.__name__, refs=[("User", self, lambda x: x.user.serial if x.user.serial > 0 else None)]
     )
     self._ping_timer = None
     self.user = User()
     self.bufferized_packets = []
     UGAMEProtocol.__init__(self)
     self._ping_delay = 5
     self.connection_lost_deferred = defer.Deferred()
コード例 #9
0
 def __init__(self):
     self.log = UGAMEClientProtocol.log.get_instance(
         self,
         refs=[('User', self, lambda x: x.user.serial
                if x.user.serial > 0 else None)])
     self._ping_timer = None
     self.user = User()
     self.bufferized_packets = []
     UGAMEProtocol.__init__(self)
     self._ping_delay = 5
     self.connection_lost_deferred = defer.Deferred()
コード例 #10
0
ファイル: server.py プロジェクト: Usr-X/poker-network
 def connectionLost(self, reason):
     if hasattr(self, "_ping_timer") and self._ping_timer and self._ping_timer.active():
         self._ping_timer.cancel()
     self._ping_timer = None
     if self.avatar:
         while len(self._queues) > 0:
             self._processQueues()
         self.factory.destroyAvatar(self.avatar)
     del self.avatar
     self.ignoreIncomingData()
     UGAMEProtocol.connectionLost(self, reason)
コード例 #11
0
 def connectionLost(self, reason):
     if hasattr(self, "_ping_timer"
                ) and self._ping_timer and self._ping_timer.active():
         self._ping_timer.cancel()
     self._ping_timer = None
     if self.avatar:
         while len(self._queues) > 0:
             self._processQueues()
         self.factory.destroyAvatar(self.avatar)
     del self.avatar
     self.ignoreIncomingData()
     UGAMEProtocol.connectionLost(self, reason)
コード例 #12
0
ファイル: client.py プロジェクト: stephica/poker-network
 def connectionLost(self, reason):
     if hasattr(self, "_ping_timer") and self._ping_timer and self._ping_timer.active():
         self._ping_timer.cancel()
     self._ping_timer = None
     self.factory.protocol_instance = None
     UGAMEProtocol.connectionLost(self, reason)
     if not reason.check(error.ConnectionDone) and self.factory.verbose > 3:
         self.message("UGAMEClient.connectionLost %s" % reason)
     d = self.connection_lost_deferred
     self.connection_lost_deferred = None
     d.callback(self)
     self.connection_lost_deferred = defer.Deferred()
コード例 #13
0
ファイル: client.py プロジェクト: pokermania/poker-network
 def connectionLost(self, reason):
     if hasattr(self, "_ping_timer") and self._ping_timer and self._ping_timer.active():
         self._ping_timer.cancel()
     self._ping_timer = None
     self.factory.protocol_instance = None
     UGAMEProtocol.connectionLost(self, reason)
     if not reason.check(error.ConnectionDone):
         self.log.debug("connectionLost: %s", reason)
     d = self.connection_lost_deferred
     self.connection_lost_deferred = None
     d.callback(self)
     self.connection_lost_deferred = defer.Deferred()
コード例 #14
0
 def connectionLost(self, reason):
     if hasattr(self, "_ping_timer"
                ) and self._ping_timer and self._ping_timer.active():
         self._ping_timer.cancel()
     self._ping_timer = None
     self.factory.protocol_instance = None
     UGAMEProtocol.connectionLost(self, reason)
     if not reason.check(error.ConnectionDone):
         self.log.debug("connectionLost: %s", reason)
     d = self.connection_lost_deferred
     self.connection_lost_deferred = None
     d.callback(self)
     self.connection_lost_deferred = defer.Deferred()
コード例 #15
0
ファイル: server.py プロジェクト: dottobr83/pokernetwork
 def connectionLost(self, reason):
     if self.avatar:
         self.factory.destroyAvatar(self.avatar)
         self.avatar = None
     UGAMEProtocol.connectionLost(self, reason)
コード例 #16
0
 def __init__(self):
     self._ping_timer = None
     self.bufferized_packets = []
     self.avatar = None
     UGAMEProtocol.__init__(self)
     self._ping_delay = 10
コード例 #17
0
ファイル: server.py プロジェクト: yxjsolid/pokernetwork
 def __init__(self):
     self.avatar = None
     UGAMEProtocol.__init__(self)
コード例 #18
0
ファイル: server.py プロジェクト: yxjsolid/pokernetwork
 def connectionLost(self, reason):
     if self.avatar:
         self.factory.destroyAvatar(self.avatar)
         self.avatar = None
     UGAMEProtocol.connectionLost(self, reason)
コード例 #19
0
ファイル: server.py プロジェクト: pokermania/poker-network
 def __init__(self):
     self._ping_timer = None
     self.bufferized_packets = []
     self.avatar = None
     UGAMEProtocol.__init__(self)
     self._ping_delay = 10
コード例 #20
0
ファイル: server.py プロジェクト: dottobr83/pokernetwork
 def __init__(self):
     self.avatar = None
     UGAMEProtocol.__init__(self)