lightweight C# web server
Switch branches/tags
Nothing to show
Pull request Compare This branch is 183 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 featuring native OWIN support.

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 static void Run()
{
    var server = new DotNetServer();

    var pipe = server.Start();

    server.Host((env, respond, error) =>
        {
            respond(new Tuple<string, IDictionary<string, IEnumerable<string>>, IEnumerable<object>>(
                    "200 OK",
                    new Dictionary<string, IEnumerable<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();
}