Update socketlib.py

Replacing lines.