> > the purpose of the HTTP layer is to obviate the need for the caller of > the API to implement the protocol. If you want to control every
Sure, and evhhtp help a lot and is very well done. > single byte that is being sent in response to an HTTP request then it > sounds like you just want to write your own server implementation. I've just one callback that need to have such low level capability. This is surely not the goal to re-write my own ;-). I'm just looking for a way to do it correctly, and within my libevent/evhttp context. > So, given that the HTTP layer does HTTP formatting for you, what is it > that it is not doing for you? > It does all I need ;-). The point is that I want to integrate several libevent webservers. Can I just use a libevent api for this ? which one ? I'll try to explain the whole story nicely. Hope you'll follow ;-). I've build a WSGI webserver on top of libevent (it's the fastest wsgi server ;-)). Because some wsgi processes can be heavier than some others, I've the idea to start several of them. The main one (on port 80) will serve files and very simple processes. An other one will serve my wsgi application1 and an another one will serve my wsgi application2. By doing it like this I can share the work on different processes and mainly, I do not impact the main one. Thus the reactivity of the website stays very nice event is some processes are heavy. To allow such "communication" between webservers, I need to write a special callback mechanism where I will start a connection to this other webserver and take back the http data (as it is) and send back to the browser. Thanks to the bufferevent_new (like used in regress_http.c) I'm able to retrieve the whole http data (headers, content, ...), but I need to send it back to the browser. So, my question. _______________________________________________ Libevent-users mailing list Libevent-users@monkey.org http://monkeymail.org/mailman/listinfo/libevent-users