コード例 #1
0
 /// <summary>
 /// 创建监听对象
 /// </summary>
 /// <param name="port"></param>
 /// <param name="dispatchFactory"></param>
 public void CreateAccept(int port, DispatchFactoryBase dispatchFactory)
 {
     DummyAccept accept = new DummyAccept(port, dispatchFactory);
     if (this.m_mapAccept.ContainsKey(port))
     {
         //ERROR
         return;
     }
     this.m_mapAccept.Add(port, accept);
     accept.Initialize();
 }
コード例 #2
0
        /// <summary>
        /// 创建监听对象
        /// </summary>
        /// <param name="port"></param>
        /// <param name="dispatchFactory"></param>
        public void CreateAccept(int port, DispatchFactoryBase dispatchFactory)
        {
            DummyAccept accept = new DummyAccept(port, dispatchFactory);

            if (this.m_mapAccept.ContainsKey(port))
            {
                //ERROR
                return;
            }
            this.m_mapAccept.Add(port, accept);
            accept.Initialize();
        }