code: 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]);
  }
docs: create a docker frame (header and payload)
  @param {number} ioConnectionType - 2=stderr, 1=stdout, 0=stdin
  @param {string|buffer} payloadData
  @returns {buffer} frame - frame header (type, length) and payload as buffer