コード例 #1
0
        //static int s_AcquiredArgs;
        //static int s_ReleasedArgs;
        //static int s_OutstandingArgs;

        static SocketHelpers()
        {
            if (!ObjectPoolMgr.ContainsType <SocketAsyncEventArgs>())
            {
                ObjectPoolMgr.RegisterType <SocketAsyncEventArgs>(CreateSocketArg);

                // TODO: have the minimum value set in config or find an appropriate minimum.
                ObjectPoolMgr.SetMinimumSize <SocketAsyncEventArgs>(100);
            }
        }
コード例 #2
0
 static SocketHelpers()
 {
     if (ObjectPoolMgr.ContainsType <SocketAsyncEventArgs>())
     {
         return;
     }
     ObjectPoolMgr.RegisterType(
         CreateSocketArg);
     ObjectPoolMgr.SetMinimumSize <SocketAsyncEventArgs>(100);
 }