Implement function to get info of an IP and a port.