added port timeout and ping number option