public Hub(HubSetting infav, IBaseUpdater gui) : base(infav.Address, infav.Port) { fav = infav; // Sets Favorites. me = new User(fav.DisplayName); me.UserInfo.Description = fav.UserDescription; me.Tag.Version = "FlowLib"; UpdateRegMode(); UpdateShare(); #region Event(s) UnknownProtocolId = new FmdcEventHandler(OnUnknownProtocolId); RegModeUpdated += new FmdcEventHandler(Hub_RegModeUpdated); ProtocolChange += new FmdcEventHandler(Hub_ProtocolChange); #endregion #region Event(s) if (gui != null) { gui.UpdateBase += new FmdcEventHandler(OnUpdateBase); baseUpdater = gui; } #endregion //FireUpdate(Actions.Name, new HubName(HubSetting.Address + ":" + HubSetting.Port.ToString())); #region Keep Alive // For Connection Keepalive TimerCallback timerDelegate = new TimerCallback(OnkeepAliveTimer_Elapsed); keepAliveTimer = new System.Threading.Timer(timerDelegate, socket, interval * 1000, interval * 1000); #endregion }
public UPnP(IPEndPoint point, IBaseUpdater updater) { RootDevices = new SortedList<string, UPnPDevice>(); if (point == null) point = new IPEndPoint(IPAddress.Parse("239.255.255.250"), 1900); EndPoint = point; if (updater != null) { updater.UpdateBase += new FlowLib.Events.FmdcEventHandler(OnUpdateBase); this.updater = updater; } client = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); ProtocolUPnP = new UPnPProtocol(this); }
public UPnP(IPEndPoint point, IBaseUpdater updater) { RootDevices = new SortedList <string, UPnPDevice>(); if (point == null) { point = new IPEndPoint(IPAddress.Parse("239.255.255.250"), 1900); } EndPoint = point; if (updater != null) { updater.UpdateBase += new FlowLib.Events.FmdcEventHandler(OnUpdateBase); this.updater = updater; } client = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); ProtocolUPnP = new UPnPProtocol(this); }
public UPnP(IBaseUpdater updater, string searchTarget) : this(null, updater, searchTarget) { }
public UPnP(IPEndPoint point, IBaseUpdater updater) : this(point, updater, null) { }
public UPnP(IBaseUpdater updater) : this(null, updater) { }