示例#1
0
        public void AddHandler(AbstractNetworkInHandler handler)
        {
            Monitor.Enter(this);
            try
            {
                if (inHeader == null)
                {
                    inHeader = handler;
                }

                if (inTailer == null)
                {
                    inTailer = handler;
                }
                else
                {
                    inTailer.NextInHandler = handler;
                    inTailer = handler;
                }
            }
            finally
            {
                Monitor.Exit(this);
            }
        }
示例#2
0
 public void AddNetworkHandler(AbstractNetworkInHandler handler)
 {
     handlerPipeline.AddHandler(handler);
 }