Abstract out the setting up of the stratum curl socket.