void CreateListener() { this.listener = ListenerFactory.CreateListener(Name, Identifier); if (this.listener.IsConnected) { this.poll_interval = PollInterval.Long; } this.listener.Connected += ListenerConnectedDelegate; this.listener.Disconnected += ListenerDisconnectedDelegate; this.listener.AnnouncementReceived += ListenerAnnouncementReceivedDelegate; if (!this.listener.IsConnected && !this.listener.IsConnecting) { this.listener.Connect(); } }
void CreateListener () { this.listener = ListenerFactory.CreateListener (Name, Identifier); if (this.listener.IsConnected) this.poll_interval = PollInterval.Long; this.listener.Connected += ListenerConnectedDelegate; this.listener.Disconnected += ListenerDisconnectedDelegate; this.listener.AnnouncementReceived += ListenerAnnouncementReceivedDelegate; if (!this.listener.IsConnected && !this.listener.IsConnecting) this.listener.Connect (); }