Debugging functions for sockets.