dbus-core-0.9.2: Low-level D-Bus protocol implementation

DBus.Wire

Synopsis

Documentation

marshalMessage :: Message a => Endianness -> Serial -> a -> Either MarshalError ByteStringSource

Convert a Message into a ByteString. Although unusual, it is possible for marshaling to fail; if this occurs, an error will be returned instead.

unmarshalMessage :: ByteString -> Either UnmarshalError ReceivedMessageSource

Parse a ByteString into a ReceivedMessage. The result can be inspected to see what type of message was parsed. Unknown message types can still be parsed successfully, as long as they otherwise conform to the D‐Bus standard.