added possibility to disable timeout and fixed a possbile NPE
added small test console program, which takes the IP as commandline parameter