hi , a question. How to check whether a port is free or not?