Switch to passing sock pointer everywhere to ensure we modify a single copy.