コード例 #1
0
        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();
            }
        }
コード例 #2
0
ファイル: BaseRepository.cs プロジェクト: Rud5G/SparkleShare
        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 ();
        }