here’s the code:
XmppClientConnection xmpp = new XmppClientConnection();
xmpp.Server = "gmail.com";
xmpp.ConnectServer = "talk.google.com";
xmpp.Username = "aleksandr.gordon";
xmpp.Password = "password";
xmpp.Open();
agsXMPP.Jid JID = new Jid("thegabmeister1@gmail.com");
xmpp.MessageGrabber.Add(JID, new agsXMPP.Collections.BareJidComparer(), new MessageCB(xmpp.MessageGrabber), null);
agsXMPP.protocol.client.Message msg = new agsXMPP.protocol.client.Message();
msg.Type = agsXMPP.protocol.client.MessageType.chat;
msg.To = JID;
msg.Body = "how u doing" + DateTime.Now.ToString();
xmpp.OnLogin += delegate(object o) { xmpp.Send(msg); };
updated new code:
agsXMPP.Jid JID = new Jid("thegabmeister@gmail.com");
xmpp.MessageGrabber.Add(JID, new agsXMPP.Collections.BareJidComparer(),
new MessageCB(delegate(object sender, agsXMPP.protocol.client.Message msg, object data)
{
}), null);
agsXMPP.protocol.client.Message msg1 = new agsXMPP.protocol.client.Message();
msg1.Type = agsXMPP.protocol.client.MessageType.chat;
msg1.To = JID;
msg1.Body = "how u doing" + DateTime.Now.ToString();
xmpp.OnLogin += delegate(object o) { xmpp.Send(msg1); };
what am i ddoing wrong? why am i getting this error?
you probably need to pass a delegate method, try adding this method to your code
this is the last thing i can suggest but the above method works and will fix your problem, unless you have other problems elsewhere: