lightweight C# web server
Pull request Compare This branch is 179 commits behind kayakhttp:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Kayak
KayakExamples
KayakTests
lib
tools
.gitignore
Kayak.sln
LICENSE.txt
README.md

README.md

Kayak is a lightweight C# web server. Natively support the OWIN specification.

Kayak is Copyright (c) 2010 Benjamin van der Veen. Kayak is licensed under the MIT License. See LICENSE.txt.

http://kayakhttp.com
http://bvanderveen.com

Example

To run an OWIN app:

public delegate void
    OwinApplication(IDictionary<string, object> env,
    Action<string, IDictionary<string, IList<string>>, IEnumerable<object>> completed,
    Action<Exception> faulted); 

class Simple
{
    public static void Run()
    {
        var server = new DotNetServer();

        var pipe = server.Start();

        server.Host((env, respond, error) =>
            {
                respond(
                        "200 OK",
                        new Dictionary<string, IList<string>>() 
                        {
                            { "Content-Type",  new string[] { "text/html" } }
                        },
                        new object[] { Encoding.ASCII.GetBytes("Hello world.") }
                    );
            });

        Console.WriteLine("Listening on " + server.ListenEndPoint);
        Console.WriteLine("Press enter to exit.");
        Console.ReadLine();

        pipe.Dispose();
    }
}