Browse Source

docstrings

pull/1521/head
Miguel Grinberg 7 months ago
parent
commit
35edfad336
Failed to extract signature
  1. 12
      src/socketio/msgpack_packet.py

12
src/socketio/msgpack_packet.py

@ -9,6 +9,18 @@ class MsgPackPacket(packet.Packet):
@classmethod
def configure(cls, dumps_default=None, ext_hook=msgpack.ExtType):
"""Change the default options for msgpack encoding and decoding.
:param dumps_default: a function called for objects that cannot be
serialized by default msgpack. The function
receives one argument, the object to serialize.
It should return a serializable object or a
``msgpack.ExtType`` instance.
:param ext_hook: a function called when a ``msgpack.ExtType`` object is
seen during decoding. The function receives two
arguments, the code and the data. It should return the
decoded object.
"""
class CustomMsgPackPacket(MsgPackPacket):
dumps_default = None
ext_hook = None

Loading…
Cancel
Save