Generate a unique identifier for an ACK packet.
(self, namespace, callback)
| 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() |
no outgoing calls