Update socketlib.py

Working on the base.