How to handle the port numbers