MCPcopy Create free account
hub / github.com/ambianic/peerfetch / _pong

Function _pong

python/src/peerfetch/proxy.py:211–219  ·  view source on GitHub ↗

Respond to client ping.

(peer_connection=None)

Source from the content-addressed store, hash-verified

209
210
211async 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
222async def _ping(peer_connection=None, stop_flag=None):

Callers 1

pc_dataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected