Send a Socket.IO packet to a client.
(self, eio_sid, pkt)
| 522 | server_stats_interval=server_stats_interval) |
| 523 | |
| 524 | async def _send_packet(self, eio_sid, pkt): |
| 525 | """Send a Socket.IO packet to a client.""" |
| 526 | encoded_packet = pkt.encode() |
| 527 | if isinstance(encoded_packet, list): |
| 528 | for ep in encoded_packet: |
| 529 | await self.eio.send(eio_sid, ep) |
| 530 | else: |
| 531 | await self.eio.send(eio_sid, encoded_packet) |
| 532 | |
| 533 | async def _send_eio_packet(self, eio_sid, eio_pkt): |
| 534 | """Send a raw Engine.IO packet to a client.""" |