A http server, implemented in C#. Originally built for the /r/dailyprogrammer hard challenge #322.

README.md 1.8KB

GlidingSquirrel

A http (and websockets!) server, implemented in C#.

Originally built for the /r/dailyprogrammer hard challenge #322.

GlidingSquirrel is currently in alpha testing! Don't use this in production unless you really know what you're doing :P

Features

  • HTTP 1.0 / 1.1 implemented so far
  • Uses C♯ 7
  • Does not have anything to do with System.Net.HttpServer whatsoever at all
  • Easily extendable (it's an abstract class)
  • Supports client requests with bodies (e.g. POST and PUT, but any http verb with a content-length will work)
  • Supports HEAD requests
  • Parses and respects the Accepts HTTP header
  • Supports keep-alive connections (HTTP 1.1 only, of course)
  • Supports Websockets (Initial implementation, version 13 only - RFC 6455, needs thorough testing - detailed bug reports welcome :D)

Todo

  • Trailing headers
  • Make logging much more flexible (it logs to the console only at the moment)
  • Give implementors of WebsocketServer a cleaner way to decide whether they want to accept a connection or not

Getting Started

A tutorial will be coming soon. For now, take a look at the HttpServer class and look at the abstract methods and their intellisense comments.

Useful Links