Move socket.h out of the global namespace.
Implement functions to copy, compare, and free objects.