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