예제 #1
0
 private void OnInit()
 {
     try
     {
         for (int i = 0; i < 100; i++)
         {
             Push(GetSeae());
         }
         mReceiveDataPool = new ReceiveDataPool(ReceiveDataPoolSize, ReceiveBufferSize);
         mReceiveDispatch = new ReceiveDispatch();
         mReceiveDispatch.Run();
         mSendDispatch = new SendDispatch();
         mSendDispatch.Run();
     }
     catch (Exception e_)
     {
         OnChannelError(this, new ErrorEventArgs {
             Error = e_, Tag = "Server Init"
         });
     }
 }
예제 #2
0
        private void OnInit()
        {
            try
            {
                mReceiveDataPool = new ReceiveDataPool(ReceiveDataPoolSize, ReceiveBufferSize);

                for (int i = 0; i < Dispatchs; i++)
                {
                    ReceiveDispatch rd = new ReceiveDispatch();
                    rd.Run();
                    ReceiveDispatchs.Add(rd);
                }
                mSendDispatch = new SendDispatch();
                mSendDispatch.Run();
            }
            catch (Exception e_)
            {
                OnChannelError(this, new ErrorEventArgs {
                    Error = e_, Tag = "Server Init"
                });
            }
        }