MCPcopy Index your code
hub / github.com/miguelgrinberg/python-socketio / encode

Method encode

src/socketio/msgpack_packet.py:32–35  ·  view source on GitHub ↗

Encode the packet for transmission.

(self)

Source from the content-addressed store, hash-verified

30 return CustomMsgPackPacket
31
32 def encode(self):
33 """Encode the packet for transmission."""
34 return msgpack.dumps(self._to_dict(),
35 default=self.__class__.dumps_default)
36
37 def decode(self, encoded_packet):
38 """Decode a transmitted package."""

Calls 2

_to_dictMethod · 0.80
dumpsMethod · 0.45