hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nitin singh <xmlpr...@gmail.com>
Subject Re: sending/streaming audio data using chunked encoding
Date Tue, 21 Sep 2010 19:03:15 GMT
Thanks Sebb for replying to my question. I had already gone though that
example. Can you be a little more specific?
- As I said I need to write data from a buffer when it gets available. So I
need a OutputStream while the example you mention below builds from an
InputStreamEntity.
- Also, once I call HtttpClient.execute can I still write onto the entity?
And once I am done with it call HttpEntity.consumeContent(). Is that the way
it should work?

Thanks
N




On Tue, Sep 21, 2010 at 3:44 AM, sebb <sebbaz@gmail.com> wrote:

>  On 21 September 2010 10:36, nitin singh <xmlprgrm@gmail.com> wrote:
> > Hi,
> > I am trying to stream real time audio data (usual length will be < 30
> > seconds) using http chunking. Specifially, the client will do a Post
> request
> > with TransferEncoding set as chunked in http 1.1.
> > - I have a thread which reads data from the codec and puts it into a
> shared
> > buffer.
> > - Another thread will read the data from the shared buffer and writes it
> in
> > the http chunk.
> > I have successfully done above using Java HttpUrlConnection class.
> However,
> > now we need to do above using https and I started looking at the
> HttpClient
> > classes. I have read all the documentation etc but am not clear how in
> real
> > time I can send data. Specifically,
> > - RequestEntity should not be buffered and cannot be repeatable. Also.
> > RequestEntity.getContentLength is not known.
> > - HttpClient.Execute looks a synchronous call  which writes data all at
> one.
> > It does not help since I write data only when its available.
> >
> > Has anyone done this before using HttpClient?
>
> http://hc.apache.org/httpcomponents-client-ga/examples.html
> and
>
> http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientChunkEncodedPost.java
>
> > Thanks in advance!
> > N
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message