private void OpenSession() { if (SupportsFeature(XmppStreamFeatures.Sessions)) { var iq = new IQ(); iq.Type = IQType.Set; iq.To = connectionString.HostName; iq.ID = XmppIdentifierGenerator.Generate(); iq.Items.Add(new Session()); Send(iq); } }
private void BindResource() { if (SupportsFeature(XmppStreamFeatures.ResourceBinding)) { var bind = new Bind(); bind.Resource = UserId.ResourceName; var iq = new IQ(); iq.Type = IQType.Set; iq.ID = XmppIdentifierGenerator.Generate(); iq.Items.Add(bind); Send(iq); bindResourceEvent.WaitOne(); } }