/// <summary> /// Releases a <see cref="SocketAsyncEventArgs"/> instance back into the pool, so that it can be reused. /// </summary> /// <param name="socketAsync">A <see cref="SocketAsyncEventArgs"/> to release back into the pool.</param> public void Release(SocketAsyncEventArgs socketAsync) { Log.Debug(m => m("Releasing SocketAsyncEventArgs: {0} [{1}, {2}]", socketAsync.GetHashCode(), _count, _pool.Count)); _pool.Enqueue(socketAsync); _autoResetEvent.Set(); }