Skip to content

Instantly share code, notes, and snippets.

@bvanderveen
Created February 19, 2011 21:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bvanderveen/835403 to your computer and use it in GitHub Desktop.
Save bvanderveen/835403 to your computer and use it in GitHub Desktop.
Upcoming Kayak interface
using System;
using System.Collections.Generic;
namespace Kayak.Http
{
public class HttpRequestEventArgs : EventArgs
{
public IHttpServerRequest Request { get; internal set; }
public IHttpServerResponse Response { get; internal set; }
}
public interface IHttpServer
{
event EventHandler<HttpRequestEventArgs> OnRequest;
}
public interface IHttpServerRequest
{
event EventHandler<DataEventArgs> OnBody;
event EventHandler OnEnd;
string Method { get; }
string Uri { get; }
Version Version { get; }
IDictionary<string, string> Headers { get; }
}
public interface IHttpServerResponse
{
void WriteContinue();
void WriteHeaders(string status, IDictionary<string, string> headers);
bool WriteBody(ArraySegment<byte> data, Action continuation);
void End();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment