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

Method _send_packet

src/socketio/server.py:505–512  ·  view source on GitHub ↗

Send a Socket.IO packet to a client.

(self, eio_sid, pkt)

Source from the content-addressed store, hash-verified

503 server_stats_interval=server_stats_interval)
504
505 def _send_packet(self, eio_sid, pkt):
506 """Send a Socket.IO packet to a client."""
507 encoded_packet = pkt.encode()
508 if isinstance(encoded_packet, list):
509 for ep in encoded_packet:
510 self.eio.send(eio_sid, ep)
511 else:
512 self.eio.send(eio_sid, encoded_packet)
513
514 def _send_eio_packet(self, eio_sid, eio_pkt):
515 """Send a raw Engine.IO packet to a client."""

Callers 3

disconnectMethod · 0.95
_handle_connectMethod · 0.95

Calls 2

encodeMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected