Multithreaded port scanner example in several programming languages