revise socket_simulator_s etc, still not quite working