I have an app that sends an HTTP request to a server. The server holds the connection open until some data is received from a remote device. The connection can be held open for up to 30 seconds. However, the user can choose to do something else during those 30 seconds. And if that happens, the HTTP connection needs to be closed.
How can I kill an active http connection from a different thread?
Any help would be appreciated.