Beispiel #1
0
        /// <summary>
        /// Deletes port mapping.
        /// </summary>
        /// <param name="map">NAT mapping entry to delete.</param>
        /// <exception cref="ArgumentNullException">Is raised when <b>map</b> is null reference.</exception>
        /// <exception cref="UPnP_Exception">Is raised when UPnP device returns error.</exception>
        public void DeletePortMapping(UPnP_NAT_Map map)
        {
            if (map == null)
            {
                throw new ArgumentNullException("map");
            }

            DeletePortMapping(map.Protocol, map.RemoteHost, Convert.ToInt32(map.ExternalPort));
        }
        /// <summary>
        /// Deletes port mapping.
        /// </summary>
        /// <param name="map">NAT mapping entry to delete.</param>
        /// <exception cref="ArgumentNullException">Is raised when <b>map</b> is null reference.</exception>
        /// <exception cref="UPnP_Exception">Is raised when UPnP device returns error.</exception>
        public void DeletePortMapping(UPnP_NAT_Map map)
        {
            if(map == null){
                throw new ArgumentNullException("map");
            }

            DeletePortMapping(map.Protocol,map.RemoteHost,Convert.ToInt32(map.ExternalPort));
        }