Arranged to use a shared method to get a socket.