Instead of taking an int for the port, take a short. This matches better with the networkmanager EndPoint struct.