コード例 #1
0
ファイル: SearchBiblio.aspx.cs プロジェクト: pxmarc/dp2
    void channel_Idle(object sender, IdleEventArgs e)
    {
        bool bConnected = this.Response.IsClientConnected;

        if (bConnected == false)
        {
            LibraryChannel channel = (LibraryChannel)sender;
            channel.Abort();
        }

        // e.bDoEvents = false;
    }
コード例 #2
0
ファイル: Z3950Processor.cs プロジェクト: keji56/chord
        private static void Channel_Closed(object sender, EventArgs e)
        {
            ZServerChannel channel = (ZServerChannel)sender;

            channel.Closed -= Channel_Closed;   // 避免重入

            // 中断正在进行的检索
            LibraryChannel library_channel = (LibraryChannel)channel.Tag;

            if (library_channel != null)
            {
                library_channel.Abort();
                LibraryManager.Log?.Info(string.Format("ZServerChannel({0}) Channel_Closed() 引发 LibraryChannel.Abort()", channel.GetHashCode()));
            }

            List <string> names = GetResultSetNameList(channel, true);

            if (names.Count > 0)
            {
                FreeGlobalResultSets(channel, names);
            }
        }
コード例 #3
0
ファイル: OperLogForm.cs プロジェクト: renyh1013/dp2
        void ReleaseAllChannelsBut(LibraryChannel channel)
        {
            for (int i = 0; i < this.Channels.Count; i++)
            {
                LibraryChannel cur_channel = this.Channels[i];

                if (cur_channel == channel)
                    continue;

                channel.Abort();
                this.Channels.RemoveChannel(channel);
                i--;
            }
        }