Esempio n. 1
0
 public SAEAPool(int ioNum,
                 EventHandler <SocketAsyncEventArgs> callback)
 {
     saeaCallback = callback;
     pool         = new ThreadSafedStack <SocketAsyncEventArgs>();
     buffer       = new SAEABuffer(ioNum, NetDefine.DEFAUT_BUFFER_SIZE);
 }
Esempio n. 2
0
 public SAEABuffer(int count, int bufferSize = NetDefine.DEFAUT_BUFFER_SIZE)
 {
     position        = 0;
     this.bufferSize = bufferSize;
     ResetBuffer(count * bufferSize);
     freePosition = new ThreadSafedStack <int>();
 }