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