improved socket layer