The two-point correlation function in the six-vertex model