agsXMPP.XmppComponentConnection.Send C# (CSharp) Method

Send() public method

public Send ( Element e ) : void
e Element
return void
        public override void Send(Element e)
        {
            // this is a hack to not send the xmlns="jabber:component:accept" with all packets                
            Element dummyEl = new Element("a");
            dummyEl.Namespace = Uri.ACCEPT;

            dummyEl.AddChild(e);
            string toSend = dummyEl.ToString();
                       
            Send(toSend.Substring(35, toSend.Length - 35 - 4));
        }