示例#1
0
 private void StartNextUnit()
 {
     if (!Core.NetworkAP.IsOwnerThread)
     {
         StartNextUnitAsync();
     }
     else
     {
         if (_unitQueue.Count > 0)
         {
             AsciiProtocolUnit unit = (AsciiProtocolUnit)_unitQueue.Pop();
             unit.Finished += new AsciiProtocolUnitDelegate(unit_Finished);
             _currentUnit   = unit;
             if (LastSocketException == null)
             {
                 unit.Start(this);
             }
             else
             {
                 Close();
             }
         }
     }
 }
示例#2
0
 protected static void StartUnit(AsciiProtocolUnit unit, AsciiTcpConnection connection)
 {
     unit.Start(connection);
 }