public void InsertToken(NetConnectionToken ncToken) { using (new LockWait(ref _lockParam)) { _list.AddLast(ncToken); } }
public bool RemoveToken(NetConnectionToken ncToken, bool isClose) { using (new LockWait(ref _lockParam)) { if (isClose) { ncToken.Token.Close(); } return(_list.Remove(ncToken)); } }