Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
sanbsw #1
Member since Nov 2014 · 4 posts
Group memberships: Members, Premium
Show profile · Link to this post
Subject: Check if message has been delivered to server
Hi,

I am trying to send multiple messages from a client to the server. How can I check which messages have been delivered successfully to the server?

Using the OnError event only tells me that there is an error but doesn't tell me which message failed.

Therefore I tried to get notified about the messages that have been delivered successfully.
The only problem I have is that there is no message object. Only a XML string (e.Text) that contains the message.

  1.     Private Sub xmppClient_OnSendXml(sender As Object, e As TextEventArgs) Handles xmppClient.OnSendXml
  2.         Dim msg As New Matrix.Xmpp.Client.Message
  3.         'I need something like this to parse a message from the xml-string
  4.         msg.Parse(e.Text)
  5.         'tell user that the message has been delivered to the server
  6.         SetSuccess(msg.Id)
  7.     End Sub

Is it possible to parse e.Text into a message object?

Thank you!

- Christoph
Avatar
Alex #2
Member since Feb 2003 · 4296 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by sanbsw:
I am trying to send multiple messages from a client to the server. How can I check which messages have been delivered successfully to the server?

when you download the latest release from:
http://www.ag-software.net/download-directory/

The Send function returns a string which is unique stanza id.
Then there is the OnStanzaSent event which notifies you of the stanzas which left the socket async without any errors.

The OnSendXml event does not help you, because it gets fired when an asynchronous Send process was started. But the Sent is not complete yet.

Quote by sanbsw:
Is it possible to parse e.Text into a message object?

yes, you can always use the MatriX serializer you get a strongly typed object.

  1. Dim el as XmppXElement = XmppXElement.LoadXml(myXmlString)
Avatar
sanbsw #3
Member since Nov 2014 · 4 posts
Group memberships: Members, Premium
Show profile · Link to this post
I am using the latest nuget package where Send() is still a sub. Do you update the nuget packages too or are they outdated?

Thanks,
Christoph
Avatar
Alex #4
Member since Feb 2003 · 4296 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
we don't update them as often as the latest downloads. Because they contain many different platforms which all have custom codes.
A release for all platforms to the same version is very time consuming and cannot be fully automated.
If the MatriX version number for a platform is different than the nuget version number I think this could be a problem.
But its on our TODO list to roll out a Nuget update soon.

I suggest to download the latest build for now manual.

Maybe we should offer them at Nuget also for a single platform like others do to solve this. Any feedback is welcome here.

Alex
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: MatriX RSS