Cakewalk.Server.SocketAsyncPool.GetArgs C# (CSharp) Метод

GetArgs() публичный Метод

Get a context object from the pool
public GetArgs ( ) : SocketAsyncEventArgs
Результат System.Net.Sockets.SocketAsyncEventArgs
        public SocketAsyncEventArgs GetArgs()
        {
            int freeIndex = 0;

            while (!m_freeObjects.TryDequeue(out freeIndex))
            {
                Thread.Sleep(0);
            }

            return m_eventArgs[freeIndex];
        }

Usage Example

Пример #1
0
 public ServerEntity(Socket socket, int worldID, World world, SocketAsyncPool asyncPool)
     : base(socket, worldID, asyncPool.GetArgs(), asyncPool.GetArgs())
 {
     m_asyncPool = asyncPool;
     Name = worldID.ToString();
     m_world = world;
 }
All Usage Examples Of Cakewalk.Server.SocketAsyncPool::GetArgs