MCPcopy Create free account
hub / github.com/Syncplay/syncplay / _handleStatePing

Method _handleStatePing

syncplay/protocols.py:262–270  ·  view source on GitHub ↗
(self, state)

Source from the content-addressed store, hash-verified

260 return position, paused, doSeek, setBy
261
262 def _handleStatePing(self, state):
263 if "latencyCalculation" in state["ping"]:
264 latencyCalculation = state["ping"]["latencyCalculation"]
265 if "clientLatencyCalculation" in state["ping"]:
266 timestamp = state["ping"]["clientLatencyCalculation"]
267 senderRtt = state["ping"]["serverRtt"]
268 self._pingService.receiveMessage(timestamp, senderRtt)
269 messageAge = self._pingService.getLastForwardDelay()
270 return messageAge, latencyCalculation
271
272 def handleState(self, state):
273 position, paused, doSeek, setBy = None, None, None, None

Callers 1

handleStateMethod · 0.95

Calls 2

receiveMessageMethod · 0.80
getLastForwardDelayMethod · 0.80

Tested by

no test coverage detected