コード例 #1
0
 def queue_server_rt(self, blk):
     'queue server response'
     if not blk:
         return None
     self.pongs.put(blk)
     self.conn.send_command(Protocol.ping_request())
コード例 #2
0
 def send_ping(self):
     "send ping request to nats server"
     self.pings_outstanding += 1
     self.conn.send_command(Protocol.ping_request())
     self.queue_server_rt(self.process_pong)
     self.conn.flush_pending()
コード例 #3
0
ファイル: test_unit.py プロジェクト: eodreports/python-nats
 def test_ping_request(self):
     'should return the ping protocol'
     self.assertEqual(Protocol.ping_request(), 'PING\r\n')
コード例 #4
0
ファイル: heartbeat.py プロジェクト: PyHUBKyiv/python-nats
 def queue_server_rt(self, blk):
     'queue server response'
     if not blk:
         return None
     self.pongs.put(blk)
     self.conn.send_command(Protocol.ping_request())
コード例 #5
0
ファイル: heartbeat.py プロジェクト: PyHUBKyiv/python-nats
 def send_ping(self):
     "send ping request to nats server"
     self.pings_outstanding += 1
     self.conn.send_command(Protocol.ping_request())
     self.queue_server_rt(self.process_pong)
     self.conn.flush_pending()
コード例 #6
0
ファイル: test_unit.py プロジェクト: PyHUBKyiv/python-nats
 def test_ping_request(self):
     'should return the ping protocol'
     self.assertEqual(Protocol.ping_request(), 'PING\r\n')