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

Method _send_packet

src/socketio/async_client.py:384–391  ·  view source on GitHub ↗

Send a Socket.IO packet to the server.

(self, pkt)

Source from the content-addressed store, hash-verified

382 return value()
383
384 async def _send_packet(self, pkt):
385 """Send a Socket.IO packet to the server."""
386 encoded_packet = pkt.encode()
387 if isinstance(encoded_packet, list):
388 for ep in encoded_packet:
389 await self.eio.send(ep)
390 else:
391 await self.eio.send(encoded_packet)
392
393 async def _handle_connect(self, namespace, data):
394 namespace = namespace or '/'

Callers 7

emitMethod · 0.95
disconnectMethod · 0.95
_handle_eventMethod · 0.95
_handle_eio_connectMethod · 0.95
test_send_packetMethod · 0.95

Calls 2

encodeMethod · 0.45
sendMethod · 0.45

Tested by 3

test_send_packetMethod · 0.76