Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
ayyrk #1
Member since Jul 2007 · 92 posts
Group memberships: Members, Premium
Show profile · Link to this post
Subject: Sending messages from within SDK callbacks
Hi, I have defined a set of commands that the agsxmpp based client responds to automatically.

I send it a command from another chat client and it is supposed to automatically respond.

Most of the time it works but sometimes the receiving client fires an OnClose event.

I will look at the xml and see if I can figure out what is going on but I wanted to ask this here:

Question: Is it OK to call XmppCon.Send(msg) from within an XmppCon_OnMessage callback?

Seems to work - just confused by the occasional OnClose event fired right after the .Send call.

-Ayyrk
Avatar
Alex #2
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by ayyrk:
Hi, I have defined a set of commands that the agsxmpp based client responds to automatically.

I send it a command from another chat client and it is supposed to automatically respond.

Most of the time it works but sometimes the receiving client fires an OnClose event.

I will look at the xml and see if I can figure out what is going on but I wanted to ask this here:

  • do you get any error events in agsXMPP before the OnClose?
  • do you have a xml log?
  • do you send any characters with your commands which are invalid in xml? eg. some control characters?

Quote by ayyrk:
Question: Is it OK to call XmppCon.Send(msg) from within an XmppCon_OnMessage callback?
Seems to work - just confused by the occasional OnClose event fired right after the .Send call.

yes, this should be no problem
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS