Close socket.