private void SendSessionTerminationRequest() { var body = new Body { SidAttr = _sid, RidAttr = Interlocked.Increment(ref _rid), TypeAttr = "terminate" }; body.Add(new Presence { TypeAttr = Presence.TypeEnum.unavailable }); SendRequest(body); }
private void CombineBody(Body body) { lock (_fetchSync) { int counter = _manager.Settings.QueryCount; while (!_tagQueue.IsEmpty) { XElement tag; if (_tagQueue.TryDequeue(out tag)) { body.Add(tag); if (--counter == 0) { break; } } } } }