Rooster is a simple server built in Chicken Scheme. It requires epoll at the moment.
Switch branches/tags
Nothing to show
Latest commit e3f3339 Nov 27, 2010 @davidreynolds amended comment
Failed to load latest commit information.
.gitignore added examples directory and wrapped ##epoll#epoll_ctl in an exported… Aug 15, 2010
README Update README to show how to run a basic webserver Aug 22, 2010


Rooster is a server built in Chicken Scheme.
Rooster makes use of the epoll egg that I wrote ( to handle socket events.

Right now I'm working on making Rooster into a web server. Don't expect too much right now.

Requires linux + epoll at the moment.
I'd like to fallback to poll if epoll isn't available.

Run make to generate

    $ make

To use for a basic web server:

    (require 'rooster)

    (define (handler fd buf)
        (let* ((msg "Hello, world")
               (headers (format
                            "HTTP/1.1 200 OK\r\nContent-Length:~A\r\n\r\n"
                            (string-length msg))))
            (send-to-client fd (string-append headers msg))))

    ;; pass handler to rooster
    (run-rooster handler)

To run the examples, make rooster and then do:

    $ csi examples/webserver/webserver.scm

You'll then be dropped into the Chicken Scheme Interpreter and from another shell prompt
you can

    $ curl localhost:6666