Exemple #1
0
 /// <summary>
 /// adds a receive context back to the pool
 /// </summary>
 public void ReturnReceiveContext(ReceiveContext context)
 {
     context.Clear();
     lock (Lock)
     {
         if (_receiveContexts.Count < CACHED_RECEIVE_CONTEXTS)
         {
             _receiveContexts.Enqueue(context);
         }
     }
 }