Revert "refactor connect_to_sock"

This reverts commit f79c99f144b68f9e5ff7ec4bd61a3e1e8978bdad.
use reader in GetAll server code