fixed socket variable rename and ping for linux