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

Method _send_packet

src/socketio/async_server.py:524–531  ·  view source on GitHub ↗

Send a Socket.IO packet to a client.

(self, eio_sid, pkt)

Source from the content-addressed store, hash-verified

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."""

Callers 6

disconnectMethod · 0.95
_handle_connectMethod · 0.95
test_send_packetMethod · 0.95
test_send_with_ackMethod · 0.95

Calls 2

encodeMethod · 0.45
sendMethod · 0.45

Tested by 3

test_send_packetMethod · 0.76
test_send_with_ackMethod · 0.76