On 29 May 2008, at 11:18, Stefan de Konink wrote:

> While server_info itself can do only the add_buffer method? Is this a
> shortcut because it is assumed to be less that 8k?

I don't think I have understood the question.
Anyway, let me briefly summarize how a handler internally works:

- First of all, the handler is instanced by calling its _new() method.

- Then, the _init() method is called. It ought to prepare whatever the
   handler needs to reply the request: a data base connection, open a
   file, build a file list, etc.

- The _add_headers() method is invoked, and the handler returns the
   request reply headers, if any.

- And finally, the _step() method is called a number of times. It
   usually returns a chunk of information each time that it is
   called. Actually, the method returns a code that points the server
   what has happened inside:

   * ret_ok:     There is new information in the buffer..
   * ret_eagain: No information in the buffer: try again
   * ret_eof:    It is done. All the information has been sent.
   * ret_eof_have_data: It is an optimization. There is information in
     the buffer, but you know in advanced that it is the last chunk. It
     could be translated to two calls: ret_ok + ret_eof.

> So what am I working on?
>
> I'm creating a handler for the OpenStreetMap project, that uses
> MonetDB5/SQL+GIS as backend. In best case to replace Lighttpd+Ruby 
> +MySQL.

Sounds pretty interesting.. :-)

--
Greetings, alo.

_______________________________________________
Cherokee mailing list
[email protected]
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee

Reply via email to