コード例 #1
0
ファイル: ProtocolProcessor.cs プロジェクト: ymf1/NetGain
 internal static void AddFrame(NetContext context, ref object holder, IFrame frame)
 {
     if (holder == null)
     {
         holder = frame;
     }
     else
     {
         var list = holder as CircularBuffer <IFrame>;
         if (list == null)
         {
             list = context.GetFrameBuffer();
             list.Push((IFrame)holder);
             list.Push(frame);
             holder = list;
         }
         else
         {
             list.Push(frame);
         }
     }
 }
コード例 #2
0
 internal static void AddFrame(NetContext context, ref object holder, IFrame frame)
 {
     if (holder == null)
     {
         holder = frame;
     }
     else
     {
         var list = holder as CircularBuffer<IFrame>;
         if (list == null)
         {
             list = context.GetFrameBuffer();
             list.Push((IFrame)holder);
             list.Push(frame);
             holder = list;
         }
         else
         {
             list.Push(frame);
         }
     }
 }