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

Method _send_packet

src/socketio/client.py:363–370  ·  view source on GitHub ↗

Send a Socket.IO packet to the server.

(self, pkt)

Source from the content-addressed store, hash-verified

361 return value()
362
363 def _send_packet(self, pkt):
364 """Send a Socket.IO packet to the server."""
365 encoded_packet = pkt.encode()
366 if isinstance(encoded_packet, list):
367 for ep in encoded_packet:
368 self.eio.send(ep)
369 else:
370 self.eio.send(encoded_packet)
371
372 def _handle_connect(self, namespace, data):
373 namespace = namespace or '/'

Callers 9

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

Calls 2

encodeMethod · 0.45
sendMethod · 0.45

Tested by 3

test_send_packetMethod · 0.76