We are in the process of developing an application on Android. We are using the jetty client 8.1.0 and cometd 2.4.0.
* Socket timeout exception occurs pretty frequently.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): Messages failed [{id=42, connectionType=long-polling, channel=/meta/connect, clientId=1a7zkwhlwuowqgg5u}]
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): org.eclipse.jetty.io.EofException
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): at org.eclipse.jetty.http.HttpGenerator.flushBuffer(HttpGenerator.java:939)
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): at org.eclipse.jetty.client.AsyncHttpConnection.handle(AsyncHttpConnection.java:86)
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609)
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): at java.lang.Thread.run(Thread.java:856)
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): Caused by: java.net.SocketException: sendto failed: EPIPE (Broken pipe)
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): at libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:496)
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): at libcore.io.IoBridge.sendto(IoBridge.java:479)
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): at java.nio.SocketChannelImpl.writeImpl(SocketChannelImpl.java:369)
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): at java.nio.SocketChannelImpl.write(SocketChannelImpl.java:327)
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): at org.eclipse.jetty.io.nio.ChannelEndPoint.flush(ChannelEndPoint.java:292)
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): at org.eclipse.jetty.io.nio.SelectChannelEndPoint.flush(SelectChannelEndPoint.java:344)
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): at org.eclipse.jetty.io.nio.ChannelEndPoint.flush(ChannelEndPoint.java:343)
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): at org.eclipse.jetty.io.nio.SelectChannelEndPoint.flush(SelectChannelEndPoint.java:319)
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): at org.eclipse.jetty.http.HttpGenerator.flushBuffer(HttpGenerator.java:866)
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): ... 6 more
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): Caused by: libcore.io.ErrnoException: sendto failed: EPIPE (Broken pipe)
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): at libcore.io.Posix.sendtoBytes(Native Method)
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): at libcore.io.Posix.sendto(Posix.java:139)
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:169)
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): at libcore.io.IoBridge.sendto(IoBridge.java:477)
05-28 16:49:24.504: I/BayeuxClient@1096943280(23801): ... 13 more
05-28 16:49:24.504: I/com.conversionsupport.comet.ConsoleChatClient(23801): =========message on Connection Listener {message=[Lorg.cometd.bayeux.Message$Mutable;@419ad810, id=42, successful=false, channel=/meta/connect, exception=org.eclipse.jetty.io.EofException}
05-28 16:49:24.504: I/com.conversionsupport.comet.ConsoleChatClient(23801): =========Connection to Server Broken======
05-28 16:49:33.254: I/BayeuxClient@1096943280(23801): Messages failed [{id=43, connectionType=long-polling, advice={timeout=0}, channel=/meta/connect, clientId=1a7zkwhlwuowqgg5u}]
05-28 16:49:33.254: I/BayeuxClient@1096943280(23801): org.eclipse.jetty.io.EofException: early EOF
05-28 16:49:33.254: I/BayeuxClient@1096943280(23801): at org.eclipse.jetty.client.AbstractHttpConnection$Handler.earlyEOF(AbstractHttpConnection.java:350)
05-28 16:49:33.254: I/BayeuxClient@1096943280(23801): at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:319)
05-28 16:49:33.254: I/BayeuxClient@1096943280(23801): at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
05-28 16:49:33.254: I/BayeuxClient@1096943280(23801): at org.eclipse.jetty.client.AsyncHttpConnection.handle(AsyncHttpConnection.java:126)
05-28 16:49:33.254: I/BayeuxClient@1096943280(23801): at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609)
05-28 16:49:33.254: I/BayeuxClient@1096943280(23801): at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
05-28 16:49:33.254: I/BayeuxClient@1096943280(23801): at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
05-28 16:49:33.254: I/BayeuxClient@1096943280(23801): at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
05-28 16:49:33.254: I/BayeuxClient@1096943280(23801): at java.lang.Thread.run(Thread.java:856)
05-28 16:49:33.257: I/com.conversionsupport.comet.ConsoleChatClient(23801): =========message on Connection Listener {message=[Lorg.cometd.bayeux.Message$Mutable;@41635d20, id=43, successful=false, channel=/meta/connect, exception=org.eclipse.jetty.io.EofException: early EOF}
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Has anyone else successfully implemented Cometd based apps on Android? It would be great to get some input on this.
Also Also is Cometd a good choice for an Android app that will have very frequent updates from the server?