Echo ping data back during a pong.
Rather than always send back "Hi!", parrot the received data.
This commit is contained in:
@@ -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):
|
||||||
|
Reference in New Issue
Block a user