simplify socket server with ping command