Closed GoogleCodeExporter closed 9 years ago
I am using XMPPConnection. Could a boshConnection provide a more reliable
connection
to server?
Original comment by tobia.loschiavo
on 30 Mar 2010 at 7:41
The problem is at the lowest level: TCP. The TCP phone stack is designed to
survive a
handover to a new cell, in a train. Which means it's design to survive multiple
minutes of silence.
This is contrary to "real-time". Here is a good/common workaround: implement
server
ping and check for fast replies, drop the connection / reconnect.
You can either look into the jabbroid code for ping or into the buddycloud code
for
reader/writer based checking (hint: the reader/write is "protected" in asmack,
so
extending the XMPPConnection class may help).
BOSH has stream management "for free". So it might help to use it (at least for
delivery reliability.)
WontFix the ticket because it's not an asmack bug but rather a TCP level
problem.
Regards,
René
PS: gtalk uses a modified smack lib, too. But I'm still far from the same
stability.
Help would be appreciated.
Original comment by rtreffer@gmail.com
on 3 Apr 2010 at 2:32
Hi Rene, thanks for your answer. I was looking at buddycloud code...just to be
clear,
the code you were talking about is a sort of scheduler that checks the status
of a
connection and reconnect eventually right? Is this heavy for battery
consumption?
About this I am trying to understand wich system is the best for
reliability/battery
ratio. Indeed soon I would like to create an open project based heavily on xmpp
but
first we have to solve these problems. Anyway if you want help, I would be glad
to
help you for the sake of open source and open protocols.
Original comment by tobia.loschiavo
on 3 Apr 2010 at 3:14
Regard help: I'm always happy merge smack improvements. And to get feedback. My
trunk
is at [http://github.com/rtreffer/smack github/rtreffer/smack] and
[http://github.com/rtreffer/smack github/rtreffer/asmack], so feel free to fork.
Upstream patches to smack will be merged as well. Go ahead and push everything
you
might regard as usefull and I'll try to pull it in. Just one note: I'll keep it
under
the Apache Licence. As I want to maximalize the use of the lib.
As for best practices: I'll try to create some sample code, for chat /
reconnect, but
it's not post-login atm....
Original comment by rtreffer@gmail.com
on 4 Apr 2010 at 8:05
I have done the next test:
- start openfire
- start client
- shutdown and start openfire
- send packet from client
And I get:
connectionClosedOnError
java.io.IOException: Write error: I/O error during system call, Broken pipe
at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.nativewrite(Native
Method)
at
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.access$600(OpenSSLSocket
Impl.java:54)
at
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLOutputStream.write(Op
enSSLSocketImpl.java:568)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:183)
at java.io.OutputStreamWriter.convert(OutputStreamWriter.java:263)
at java.io.OutputStreamWriter.write(OutputStreamWriter.java:252)
at java.io.BufferedWriter.flush(BufferedWriter.java:145)
at org.jivesoftware.smack.util.ObservableWriter.flush(ObservableWriter.java:48)
at org.jivesoftware.smack.PacketWriter.writePackets(PacketWriter.java:195)
at org.jivesoftware.smack.PacketWriter.access$000(PacketWriter.java:42)
at org.jivesoftware.smack.PacketWriter$1.run(PacketWriter.java:78)
So, at this moment asmack knows that the connection is broken and it is still
not
reconnecting. I think that in this error the asmack could recover from crash
starting
the reconnecting.
Im sorry if I haven't understood well but I hope this will help.
I have used asmack-2010.05.07.jar
Original comment by cver...@gmail.com
on 1 Jun 2010 at 3:13
I was annoyed with some of the wifi problems on my android, so I developed an
app to solve them.
It's called "Fix My WiFi", and it Resolves these WiFi issues:
1) Re-connect failing on return to Access Point, or after conn drops.
2) WiFi dropping when phone left idle (Optional WiFi lock)
3) Access point available, but device not attempting to conn.
You can download it from the market.
Hope it helps!
Original comment by christian.zangerl@gmail.com
on 12 Aug 2010 at 10:29
Original issue reported on code.google.com by
tobia.loschiavo
on 28 Mar 2010 at 6:53