Messages

class p2p0mq.message.Message(source=None, to=None, previous_hop=None, next_hop=None, command=None, reply=False, handler=None, message_id=None, time_to_live=30, **kwargs)[source]

A message we send down the wire.

create_reply(source=None, to=None, previous_hop=None, next_hop=None, command=None, reply=True, handler=None, message_id=None, time_to_live=30, **kwargs)[source]

Creates a reply to the sender of this message.

encode(app_uuid)[source]

Converts the message into a string of bytes suitable for transfer.

valid_for_send(app, verbose=True)[source]

Makes sure that this message has required fields for sending it by the sender.

static validate_messages_for_send(message, app)[source]

Makes sure that one or more messages have required fields for sending them by the sender.