On Wed, 2010-11-03 at 12:31 -0400, Hemant Tiwari wrote: > Hi, > > I am using HttpClient for connecting to streaming server. At client side I > am checking for server response and in case I get an unexpected response I > am trying to close connection. > > My question is > > Is there any way for me to use or get access to socket to terminate my Http > streaming (received as chunk data) from server. >
HttpClient makes intentionally difficult to have direct access to the underlying HTTP connection. It is possible but strongly discouraged. > Right now I was not able to locate a way to close a connection as > inputstream.close() doesn't work. And streaming connection stays on till > server does not close. > Use HttpUriRequest#abort() method to shut down the underlying connection. hope this helps Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
