Пример #1
0
        /// <summary>
        /// 调度方法
        /// </summary>
        /// <param name="arg"></param>
        /// <param name="transferredNum"></param>
        /// <returns></returns>
        public override bool Dispatch(object arg, int transferredNum)
        {
            SeverSessionManager mgr     = (SeverSessionManager)arg;
            SeverSession        session = (SeverSession)mgr.CreateSession(this.AcceptSocket);

            session.Receive();
            return(true);
        }
Пример #2
0
        private SeverSessionManager m_cSeverMgr;          //会话管理类

        public Accept(int port, DispatchFactoryBase dispatchFactory)
        {
            this.m_iPort            = port;
            this.m_cDispatchFactory = dispatchFactory;
            this.m_cSeverMgr        = new SeverSessionManager(this.m_cDispatchFactory);
        }
Пример #3
0
        private SeverSessionManager m_cSeverMgr; //会话管理类

        #endregion Fields

        #region Constructors

        public Accept(int port, DispatchFactoryBase dispatchFactory)
        {
            this.m_iPort = port;
            this.m_cDispatchFactory = dispatchFactory;
            this.m_cSeverMgr = new SeverSessionManager( this.m_cDispatchFactory );
        }