HTTP servers that run libev

Jann Horn jann+libev at thejh.net
Thu Jan 30 19:51:57 CET 2014


On Thu, Jan 30, 2014 at 11:07:04AM +0100, Harm van Tilborg wrote:
> I'm about to write a simple HTTP service, and since I have some good
> experience with libev, I was wondering whether there is a good
> starting point that provides some basic HTTP server functionality.

I'd have a look at joyent's http-parser which they also use in node.js:
<https://github.com/joyent/http-parser>

    This is a parser for HTTP messages written in C. It parses both
    requests and responses. The parser is designed to be used in
    performance HTTP applications. It does not make any syscalls nor
    allocations, it does not buffer data, it can be interrupted at
    anytime. Depending on your architecture, it only requires about
    40 bytes of data per message stream (in a web server that is per
    connection).

I used that in an HTTP proxy I wrote for some basic filtering. That
code is 2 years old and looking through it now, I see a few FIXMEs,
but maybe it's still useful for you?
<https://github.com/thejh/inceptroxy>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.schmorp.de/pipermail/libev/attachments/20140130/204c013f/attachment.sig>


More information about the libev mailing list