Ravn::Net::

GlobalProtocol module

The Ravn Helios global (C2) messaging protocol

Constants

VALID_HEADERS

The valid protocol headers for this version, as normalized Symbols. See ::normalize_header

VERSION

The version of the protocol supported by this version of the library.

Public Instance Methods

encode( message )

Return the given message as the ZRE group it should be broadcast on, the message’s type, and, and an encoded data payload.

# File lib/ravn/net/global_protocol.rb, line 36
def encode( message )
        global_type, fields = Ravn::Ontology.globalize( message )
        return unless global_type

        data = MessagePack.pack( fields )

        return global_type, message.id, data, content_type: 'application/msgpack'
end