docs: function createFrame (type, payload) {
    var err = validateArgs(type, payload);
    if (err) { throw err; }
  
    var payloadBuffer = Buffer.isBuffer(payload) ? payload : new Buffer(payload);
    var headerBuffer  = createHeader(type, payload.length);
  
    return Buffer.concat([headerBuffer, payloadBuffer]);
  }