示例#1
0
 def on_ping_request(self):
     'handler when ping request received'
     self.pings += 1
     self.conn.send_command(Protocol.pong_response())
示例#2
0
 def on_ping_request(self):
     'handler when ping request received'
     self.pings += 1
     self.conn.send_command(Protocol.pong_response())
示例#3
0
 def test_pong_response(self):
     'should return the pong protocol'
     self.assertEqual(Protocol.pong_response(), 'PONG\r\n')
示例#4
0
 def test_pong_response(self):
     'should return the pong protocol'
     self.assertEqual(Protocol.pong_response(), 'PONG\r\n')