dcsimg
Reading endless feed stream from HTTP server
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Marlen_Antonyan
Posted On:   Monday, January 31, 2005 06:18 AM

I have JDE 4.0 installed. I run MDS with 7230 simulator. This code works fine in general: HttpConnection conn = (HttpConnection) Connector.open(url); int status = conn.getResponseCode(); But in particular when I wanna get an endless stream from HTTP server (Some kind of a realtime data stream) this code hangs on conn.getResponseCode() invocation. I guess this is because HTTP server never closes the stream. Seems like HttpConnection does try to get response as a whole. And in this case it is a problem since it never can read InputStream to the end. Actually when I'm reading finite stream everything is ok. I use HttpConnection and it's InputStream.    More>>

I have JDE 4.0 installed. I run MDS with 7230 simulator.
This code works fine in general:


			

HttpConnection conn = (HttpConnection) Connector.open(url);
int status = conn.getResponseCode();


But in particular when I wanna get an endless stream from HTTP server (Some kind of a realtime data stream) this code hangs on conn.getResponseCode() invocation.
I guess this is because HTTP server never closes the stream.



Seems like HttpConnection does try to get response as a whole. And in this case it is a problem since it never can read InputStream to the end.



Actually when I'm reading finite stream everything is ok.
I use HttpConnection and it's InputStream.



Does anybody have any idea or may be _working_ code sample which reads endless feed stream from HTTP server.



Regards, Merelin

   <<Less
About | Sitemap | Contact