Scenario :
1. I have a list view, fetching data on the fly. Due to scrolling what data it might get could be stale.
2. When I implemented HTTP client using a thread , on scroll i would cancel all requests threadHandler.removeMessages(intwhat) so that no stale data was returned.
3. The autobahn Websocket API gives me option to sendmessage and receive its response asynchronously.
4. Can anyone advice me on how to go about cancelling the requests from the WebsocketWriter ? or a work around.
5. If the above description is not sufficient , I can elaborate more.
The OPs question has been taken to the Autobahn mailing list here.
Extract:
sendMessage()
cannot be canceled. Upon invoking, it'll forward the message to the background writer thread, and that thread will send out the bytes on wire.What you can do (at app level) is ignore any responses to the sent message the application expects.