예제 #1
0
파일: SAEAPool.cs 프로젝트: git4paulqu/Net
 public SAEAPool(int ioNum,
                 EventHandler <SocketAsyncEventArgs> callback)
 {
     saeaCallback = callback;
     pool         = new ThreadSafedStack <SocketAsyncEventArgs>();
     buffer       = new SAEABuffer(ioNum, NetDefine.DEFAUT_BUFFER_SIZE);
 }
예제 #2
0
 public SAEABuffer(int count, int bufferSize = NetDefine.DEFAUT_BUFFER_SIZE)
 {
     position        = 0;
     this.bufferSize = bufferSize;
     ResetBuffer(count * bufferSize);
     freePosition = new ThreadSafedStack <int>();
 }