Update socket.c

Improved the readability of the error message.