Echo ping data back during a pong.

Rather than always send back "Hi!", parrot the received data.
This commit is contained in:
James Cook
2012-10-10 15:45:55 -04:00
parent c2937e2f02
commit cde26d317b

View File

@@ -547,7 +547,7 @@ class WebSocket(object):
self.send_close() self.send_close()
return (frame.opcode, None) return (frame.opcode, None)
elif frame.opcode == ABNF.OPCODE_PING: elif frame.opcode == ABNF.OPCODE_PING:
self.pong("Hi!") self.pong(frame.data)
def recv_frame(self): def recv_frame(self):