Aspyct.org

The day is over

| Comments

Yep, the day is over. It’s time for me to stop working on the “One Day Server” (cfr. previous post). The project is an HTTP server running on UNIX environments, developed in C. See the sources on github.

So… What has been done ?

  1. An asynchronous server base, primarily intended to serve static files over HTTP. The server is based on epoll(7), and therefore currently available for Linux only. But there is a wrapper around the epoll system, so it shouldn’t be too hard to port to other platforms.

  2. An abstraction around the epoll() mechanism, as explained above. It should be easily portable to other systems as well. Have a look at it :)

  3. An incremental HTTP parser that you can feed as you get the data from your client. It will parse the request as it comes, making information available as soon as possible.

Yes, but…

Ok, it’s not really functional yet. First, it doesn’t give you back the files, but only a text summary of you request…

1
2
3
4
5
6
7
8
9
10
aspyct@mothbuster:~/[...]$ telnet localhost 3000
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /hello/world HTTP/1.1
Taking care of your request:
  Method:  GET
  URI:     /hello/world
  Version: HTTP/1.1
Connection closed by foreign host.

Also, the HTTP request parser is not complete yet, and the system as a whole probably has some memory leaks and security issues… But OK, it’s a one-day dev :P And I’m not that far from a working system.

Now what ?

Well I probably won’t have time to further develop this server in the next few weeks. But who knows, I might resume development after that :) I’ll keep you posted ! Thanks for following me :)

Comments