We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7b8729 commit 35edfadCopy full SHA for 35edfad
1 file changed
src/socketio/msgpack_packet.py
@@ -9,6 +9,18 @@ class MsgPackPacket(packet.Packet):
9
10
@classmethod
11
def configure(cls, dumps_default=None, ext_hook=msgpack.ExtType):
12
+ """Change the default options for msgpack encoding and decoding.
13
+
14
+ :param dumps_default: a function called for objects that cannot be
15
+ serialized by default msgpack. The function
16
+ receives one argument, the object to serialize.
17
+ It should return a serializable object or a
18
+ ``msgpack.ExtType`` instance.
19
+ :param ext_hook: a function called when a ``msgpack.ExtType`` object is
20
+ seen during decoding. The function receives two
21
+ arguments, the code and the data. It should return the
22
+ decoded object.
23
+ """
24
class CustomMsgPackPacket(MsgPackPacket):
25
dumps_default = None
26
ext_hook = None
0 commit comments