meta data for this page
  •  

PeerHood interprocess messaging

Encoding

class Message {
  uint32 tid; // Message type id
  uint32 iid; // Message instance id, serial number or 32 bit uuid, possible ?
              // There might not be centralized coordinating process to determine serials.
  uint32 size; // utf-8 like size extension, if bit 31 is 1 next message extends this one

  uint64 mid() { // Message id
    uint64 r = 0x0000000000000000;
    r |= tid;
    r <<= 32;
    r |= iid;
    return r; 
  }
}