Update socket.py