MCPcopy Create free account
hub / github.com/miguelgrinberg/python-socketio / _generate_ack_id

Method _generate_ack_id

src/socketio/base_client.py:277–284  ·  view source on GitHub ↗

Generate a unique identifier for an ACK packet.

(self, namespace, callback)

Source from the content-addressed store, hash-verified

275 return handler, args
276
277 def _generate_ack_id(self, namespace, callback):
278 """Generate a unique identifier for an ACK packet."""
279 namespace = namespace or '/'
280 if namespace not in self.callbacks:
281 self.callbacks[namespace] = {0: itertools.count(1)}
282 id = next(self.callbacks[namespace][0])
283 self.callbacks[namespace][id] = callback
284 return id
285
286 def _handle_eio_connect(self): # pragma: no cover
287 raise NotImplementedError()

Callers 15

emitMethod · 0.45
emitMethod · 0.45
emitMethod · 0.45
emitMethod · 0.45
emitMethod · 0.45
emitMethod · 0.45
test_send_with_ackMethod · 0.45
test_invalid_callbackMethod · 0.45

Calls

no outgoing calls