What is a good way to share a session between two HTTPClients in a Java program?
问题 I have been developing an Android/Java application that opens up two simultaneous Apache HTTP connections. I have been developing a Chat application, and one connection is almost always running (the server was long polling; it would only respond once changes were made), and a second request to send data to the same site, using the same Session (due to being "logged in") was needed. After plenty of searching on StackOverflow, I have not found a good way to do this. How can this be accomplished