zoukankan      html  css  js  c++  java
  • WC框架

    ChannelDispatcher 字段

    public class ChannelDispatcher : ChannelDispatcherBase
    {
        // Fields
        private ThreadSafeMessageFilterTable<EndpointAddress> addressTable;
        private string bindingName;
        private SynchronizedCollection<IChannelInitializer> channelInitializers;//通道初始化器
        private CommunicationObjectManager<IChannel> channels;//通道管理器
        private EndpointDispatcherCollection endpointDispatchers;
        private ErrorBehavior errorBehavior;
        private Collection<IErrorHandler> errorHandlers;//错误处理器
        private EndpointDispatcherTable filterTable;
        private ServiceHostBase host;
        private bool includeExceptionDetailInFaults;
        private bool isTransactedReceive;
        private readonly IChannelListener listener;
        private ListenerHandler listenerHandler;//
        private int maxPendingReceives;
        private int maxTransactedBatchSize;
        private MessageVersion messageVersion;
        private SynchronizedChannelCollection<IChannel> pendingChannels;
        private bool performDefaultCloseInput;
        private bool receiveContextEnabled;
        private bool receiveSynchronously;
        private bool sendAsynchronously;
        private ServiceThrottle serviceThrottle;
        private bool session;
        private SharedRuntimeState shared;
        private IDefaultCommunicationTimeouts timeouts;
        private IsolationLevel transactionIsolationLevel;
        private bool transactionIsolationLevelSet;
        private TimeSpan transactionTimeout;

    }

    ChannelHandle:

    private void HandleReceiveComplete(RequestContext context)
    {
        if ((context == null) && this.incrementedActivityCountInConstructor)
        {
            this.listener.ChannelDispatcher.Channels.DecrementActivityCount();
        }
        if (this.channel != null)
        {
            this.channel.HandleReceiveComplete(context);
        }
        else if ((context == null) && this.hasSession)
        {
            bool flag;
            lock (this.ThisLock)
            {
                flag = !this.doneReceiving;
                this.doneReceiving = true;
            }
            if (flag)
            {
                this.receiver.Close();
                if (this.idleManager != null)
                {
                    this.idleManager.CancelTimer();
                }
                ServiceThrottle throttle = this.throttle;
                if (throttle != null)
                {
                    throttle.DeactivateChannel();
                }
            }
        }
    }

  • 相关阅读:
    魅族Flyme OS使用小技巧
    Android应用里面调用Google Earth应用
    关于连接网络时抛出“android.os.NetworkOnMainThreadException”异常问题
    《深入理解计算机系统》实验一 —Data Lab
    《深入理解计算机系统》(CSAPP)读书笔记 —— 第一章 计算机系统漫游
    使用 VB.NET 封装 Javascript 常用功能(这是在asp.net中的)
    Net线程问题解答
    线程同步
    利用辅助线程更新用户界面UI
    FFMPEG参数说明
  • 原文地址:https://www.cnblogs.com/qianyz/p/2690372.html
Copyright © 2011-2022 走看看