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