Return-Path: Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: (qmail 68388 invoked from network); 21 Sep 2010 19:04:00 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 Sep 2010 19:04:00 -0000 Received: (qmail 50567 invoked by uid 500); 21 Sep 2010 19:04:00 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 50382 invoked by uid 500); 21 Sep 2010 19:03:59 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 50373 invoked by uid 99); 21 Sep 2010 19:03:59 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Sep 2010 19:03:59 +0000 X-ASF-Spam-Status: No, hits=3.3 required=10.0 tests=FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,HK_RANDOM_ENVFROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of xmlprgrm@gmail.com designates 209.85.161.51 as permitted sender) Received: from [209.85.161.51] (HELO mail-fx0-f51.google.com) (209.85.161.51) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Sep 2010 19:03:36 +0000 Received: by fxm2 with SMTP id 2so1830057fxm.10 for ; Tue, 21 Sep 2010 12:03:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=vCZsS6ctOGe6j/gPFER44MuLHKdi5mODRsw+ObSvEtg=; b=vZ3y+sgDXiraeKRQ+WSpKenPvR8XXHNHiU8n0tUPFRnfsnEkvHhsJ2JsSLhBM7TzOX QyHSxj64OviIYWBvU2AECYKcogHSF//eBOLoqrB4W7n4rHRTsDv+DrXSpwINsbf15pwR I5xShrRtgdVwqtk7hIQPNXwzZuhxhmhdtoziw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Nbhdu6L7Rbr7ljWJEJuNELhJtDwr5unNaaEAYQFJsUXjlTirhOrxOw9PCs7bWG/G7J cnbqz9M1Npe4Nyglu2kenBU3WSIy6A6rnyu3jQrOxlPGR+FewhKW+JRbkVhkEd+bc0jw f9zm6ndjAVPrOWuaQnHb026CZz7vVLlQXPtu0= MIME-Version: 1.0 Received: by 10.223.105.82 with SMTP id s18mr6725372fao.77.1285095795817; Tue, 21 Sep 2010 12:03:15 -0700 (PDT) Received: by 10.223.103.211 with HTTP; Tue, 21 Sep 2010 12:03:15 -0700 (PDT) In-Reply-To: References: Date: Tue, 21 Sep 2010 12:03:15 -0700 Message-ID: Subject: Re: sending/streaming audio data using chunked encoding From: nitin singh To: HttpClient User Discussion Content-Type: multipart/alternative; boundary=0016e6d38540697c220490c9ae06 X-Virus-Checked: Checked by ClamAV on apache.org --0016e6d38540697c220490c9ae06 Content-Type: text/plain; charset=ISO-8859-1 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 wrote: > On 21 September 2010 10:36, nitin singh 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 > > --0016e6d38540697c220490c9ae06--