Check if port is dynamic/private port
port - The port number to check Returns true if port is dynamic/private (49152-65535)
port
static bool isDynamicPort(int port) { return port >= 49152 && port <= 65535; }