Created
February 19, 2011 21:52
-
-
Save bvanderveen/835403 to your computer and use it in GitHub Desktop.
Upcoming Kayak interface
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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