Ejemplo n.º 1
0
        /// <summary>
        /// Send a XmppXElement asynchronous
        /// </summary>
        /// <param name="el"></param>
        /// <returns></returns>
        public virtual async Task SendAsync(XmppXElement el)
        {
            await Pipeline.WriteAndFlushAsync(el);

            if (Pipeline.Contains <StreamManagementHandler>() &&
                Pipeline.Get <StreamManagementHandler>().IsEnabled &&
                (el.OfTypeAny <Xmpp.Base.Iq, Xmpp.Base.Presence, Xmpp.Base.Message>()))
            {
                await Pipeline.WriteAndFlushAsync(new Request());
            }
        }