Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
bejeweled #1
Member since Jun 2005 · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: Error handling
Hello I m using your component with a pocketpc  under gprs.
All is working very well.
I m trying to get error raised when the gprs connection is lost

....
 AddHandler jClient.OnError, AddressOf jClient_OnError
.....

Private Sub jClient_OnError(ByVal sender As Object, ByVal ex As Exception)
        MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1)
End Sub 'jClient_OnError

with GPRS on ,I create  a XmppClientConnection, I send and receive message.
Now I manually close the GPRS connection (so I dont have anymore tcp connection) and then if I send a message I never have any error. And the message is not send.
How can I do ?
the only workaroud was to build special remote client with "ack" function wich send back ack for the message sent. But gprs packets are expensives...
Avatar
Alex #2
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
hi,

did you try to debug the library?
Did it close the network stream? Then the parser should fire an XML error. I made some improvements to this in the latest develper version. YOu can contact me by mail and i can send you a copy.
But anyway you should always close/shutdown your xmpp connection correctly when possible. Every Jabber session is one socket that must be alive during the whole session. When the socket disconnects then you must login again.
A workaround for this could be a xmpp server with HTTP polling like it is described in the JEP http://www.jabber.org/jeps/jep-0025.html

I had similar problems before with wireless LAN on pocket PCs. When i lost the signal because i was out of the range of teh access point i never got a disconnect event from the .NET sockets. When the signal came back then the socket behaved like a socket that got never disconnected.

Alex
Avatar
bejeweled #3
Member since Jun 2005 · 2 posts
Group memberships: Members
Show profile · Link to this post
hello,
Thanks for your response.
The socket is not closed when you loose gprs signal. That is the problem. But I think it's by design. When you get a phone call the data flow is stopped, but you can continue sendind receiving data on the same socket after you stop voice traffic. But sometimes you loose your tcp connection....
I don'n know much about tcp over gprs but I think there is a kind of proxy on the operator network handling (well or not) these situations.
But the ppc doesnt know these details and  the TCP methods like tcpclient.canwrite are not reliable.
Of course http pooling could be a good solution for this pb. But the goal, for me, was to save the amount of data send/received. I make sessions for 12 hours And I receive only 100 short  messages during this period. Of course I dont Know when.. But when i am suposed to receive a message I need it rapidly.  So http pooling need a lot of server query for a small number of message.
I am still searching for a reliable way to push over gprs. (sms killer...)
I ll contact you by email.
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