/// <summary> /// ctor /// </summary> /// <param name="name"></param> protected ResourceGroup(string name) { this.name = name; _lock = new LockParam(); _remove = new Queue <ResourceLoader>(); _loaderMap = new Dictionary <string, ResourceLoader>(); }
public NetConnectionTokenPool(int timerSpace) { this.timerSpace = timerSpace < 2 ? 2 : timerSpace; lockParam = new LockParam(); int _period = TimerSpaceToSeconds(); list = new LinkedList <NetConnectionToken>(); timer = new Timer(new TimerCallback(TimerLoop), null, _period, _period); }
public PacketReader(int capacity = 128) { if (capacity < 128) { capacity = 128; } capacity += 1; packetQueue = new PacketQueue(capacity); lockParam = new LockParam(); }
public NetPacketProvider(int capacity) { if (capacity < 128) { capacity = 128; } capacity += 1; _packetQueue = new PacketQueue(capacity); _lockParam = new LockParam(); }
public TokenConnectionManager(int period) { _period = period < 2 ? 2 : period; _lockParam = new LockParam(); var tempPeriod = GetPeriodSeconds(); _list = new LinkedList <NetConnectionToken>(); _timeoutThreading = new Timer(timeoutHandler, null, tempPeriod, tempPeriod); }
public TcpServerToken(int maxConCount, int bufferSize) : base(bufferSize) { this._maxConCount = maxConCount; this.bufferSize = bufferSize; _recBuffMgr = new SockArgBuffers(maxConCount + _offsetNumber, bufferSize); _sendBuffMgr = new SockArgBuffers(maxConCount + _offsetNumber, bufferSize); _sendArgs = new SocketEventArgPool(maxConCount + _offsetNumber); _receiveArgs = new SocketEventArgPool(maxConCount + _offsetNumber); _lockParam = new LockParam(); _countSema = new Semaphore(maxConCount + _offsetNumber, maxConCount + _offsetNumber); }
public TokenConnectionManager(int period) { if (period < 2) { this.period = 2; } else { this.period = period; } lockParam = new LockParam(); int _period = GetPeriodSeconds(); list = new LinkedList <NetConnectionToken>(); timeoutThreading = new Timer(new TimerCallback(timeoutHandler), null, _period, _period); }
public Timer() { pool = new TimeTaskPool(); Tasks = new Dictionary <string, FrameTask>(); param = new LockParam(); }