use GetPortValue () instead of deprecated GetEffectivePortNumber ()