code: func identifiedEncode(dst []byte, id ID, t Type) (int, error) {
  	total := 0
  
  	// check packet id
  	if !id.Valid() {
  		return total, makeError(t, "packet id must be grater than zero")
  	}
  
  	// encode header
  	n, err := headerEncode(dst[total:], 0, 2, identifiedLen(), t)
  	total += n
  	if err != nil {
  		return total, err
  	}
  
  	// write packet id
  	binary.BigEndian.PutUint16(dst[total:], uint16(id))
  	total += 2
  
  	return total, nil
  }
docs: // encodes an identified packet