Alchemy Websockets
An extremely efficient C# WebSocket server.
Alchemy.Classes.Header Class Reference

This class implements a rudimentary HTTP header reading interface. More...

List of all members.

Public Member Functions

 Header (string data)
 Initializes a new instance of the Header class. Accepts a string that represents an HTTP header.

Public Attributes

HttpCookieCollection Cookies = new HttpCookieCollection()
 Any cookies sent with the header.
String Method = String.Empty
 The HTTP Method (GET/POST/PUT, etc.)
Protocol Protocol = Protocol.None
 What protocol this header represents, if any.
string RequestPath = string.Empty
 The path requested by the header.

Static Public Attributes

static string Pattern
 Regular expression to parse http header.

Properties

string this[string key] [get, set]
 Gets or sets the Fields object with the specified key.

Detailed Description

This class implements a rudimentary HTTP header reading interface.

Definition at line 21 of file Header.cs.


Constructor & Destructor Documentation

Initializes a new instance of the Header class. Accepts a string that represents an HTTP header.

Parameters:
dataThe data.

Definition at line 63 of file Header.cs.


Member Data Documentation

HttpCookieCollection Alchemy.Classes.Header.Cookies = new HttpCookieCollection()
String Alchemy.Classes.Header.Method = String.Empty

The HTTP Method (GET/POST/PUT, etc.)

Definition at line 45 of file Header.cs.

Initial value:
            @"^(?<connect>[^\s]+)?\s?(?<path>[^\s]+)?\s?HTTP\/1\.1(.*?)?\r\n" + 
            @"((?<field_name>[^:\r\n]+):(?<field_value>[^\r\n]+)\r\n)+"

Regular expression to parse http header.

Definition at line 26 of file Header.cs.

What protocol this header represents, if any.

Definition at line 50 of file Header.cs.

Referenced by Alchemy.Handlers.Authentication.Authenticate(), and Alchemy.Handlers.Handler.ProcessHeader().


Property Documentation

string Alchemy.Classes.Header.this[string key] [get, set]

Gets or sets the Fields object with the specified key.

Definition at line 124 of file Header.cs.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties