示例#1
0
        public void ConfigurationGlobalThread(IKcpScheduler scheduler)
        {
            if (scheduler == null)
            {
                throw new ArgumentNullException(nameof(scheduler));
            }

            this.scheduler = scheduler;
        }
示例#2
0
        public KcpChannel(KcpOptions options, IUdpChannel channel, IKcpScheduler scheduler, Action <IFilterPipeline <IKcpSession> > handler)
        {
            base.ConfigurationSelfOptions(options);
            base.ConfigurationSelfFilter(handler);

            this.scheduler = scheduler;
            this.channel   = channel;
            this.channel.ConfigurationSelfFilter((pipeline) => { pipeline.Add(this); });

            this.orderOperators = BinaryOrderOperatorsFactory.GetOperators(options.Order);

            this.scheduler.Register(this);
        }