Update socket_base.php

Removing low level code from the base and into the connection.