Respond to client ping.
(peer_connection=None)
| 209 | |
| 210 | |
| 211 | async def _pong(peer_connection=None): |
| 212 | """Respond to client ping.""" |
| 213 | response_header = { |
| 214 | 'status': 200, |
| 215 | } |
| 216 | header_as_json = json.dumps(response_header) |
| 217 | logger.debug('sending keepalive pong back to remote peer') |
| 218 | await peer_connection.send(header_as_json) |
| 219 | await peer_connection.send('pong') |
| 220 | |
| 221 | |
| 222 | async def _ping(peer_connection=None, stop_flag=None): |