fixed sockets library to remove dependencies on internals