Because of I am a begginer with bucket and brigades
Is there any short example how to send simple string to the client?
I've found some examples but it were a pretty complicated for me.

E.g. http://www.apachetutor.org/dev/brigades 


regards / S pozdravem
Petr Hráček

-----Original Message-----
From: Graham Leggett [mailto:minf...@sharp.fm] 
Sent: Friday, January 30, 2009 12:59 PM
To: dev@httpd.apache.org
Subject: Re: Sending data to client

Hracek, Petr wrote:

> Thanks for the question about replacement of ap_*_timeout.
> 
> When the ap_soft_timeout and ap_rwrite are called in Apache 1.3
> I've never inserted HTML tags like <html><body> etc.
> They were inserted automatically?
> 
> Is it necessary to include HTML tags to buffer which is sent to the Client 
> side?

They are treated purely as strings.

The decision on what to output is made by your code. In the case of 
mod_status, mod_status chooses to output data as HTML, which is why it 
goes about sticking in <HTML> tags.

> And do you know how can I monitored if the date were successfully sent / 
> delivered to 
> the client side? All comunication is done over https.

It depends on the level of guarantee you need.

If you are just worried that the data you just wrote must be sent to the 
client right now, I suspect the bucket brigade API might help you with 
flush buckets.

If you send buckets instead of strings, you have more control over what 
you want to send. You might put a string in a bucket, and then another 
string in a bucket, followed by a flush bucket, followed by another 
string in a bucket.

The flush bucket tells the networking code "send what you have right 
now, don't wait for any more".

Regards,
Graham
--

Reply via email to