aiowamp.MessagePackSerializer¶
-
class
aiowamp.
MessagePackSerializer
[source]¶ -
__init__
()¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
Initialize self. deserialize
(data)Deserialise the bytes
representation of a message.serialize
(msg)Serialise a message. -
serialize
(msg)[source]¶ Serialise a message.
Parameters: msg ( MessageABC
) – Message to serialise.Return type: bytes
Returns: bytes
representation of the message.Raises: Exception
– If the message couldn’t be serialised.
-
deserialize
(data)[source]¶ Deserialise the
bytes
representation of a message.Parameters: Return type: MessageABC
Returns: Deserialised message.
Raises: aiowamp.InvalidMessage
– If the deserialised data isn’t a message.Exception
– If the message couldn’t be deserialised.
-