Update socketlib.py

Still writing the base.