Miguel Grinberg
7 months ago
Failed to extract signature
1 changed files with
12 additions and
0 deletions
-
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 |
|
|
|
|