meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

peerhood:messaging [2011/09/02 12:05] (current)
Line 1: Line 1:
 +====== PeerHood interprocess messaging ======
  
 +===== Encoding =====
 +
 +<​code>​
 +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; 
 +  }
 +}
 +</​code>​