C# Class Incog.Servers.HttpProcessor

Simple Hypertext Transfer Protocol (HTTP) request processor.
Afficher le fichier Open project: SimWitty/Incog Class Usage Examples

Méthodes publiques

Méthode Description
HttpProcessor ( TcpClient socket, HttpServer server ) : System

Initializes a new instance of the HttpProcessor class.

Process ( ) : void

Process incoming requests.

WriteFailure ( ) : void

Write a HTTP failure (500).

WriteLine ( string value ) : void

Write a single line of ASCII text followed by the new line character.

WriteSuccess ( ) : void

Write an HTTP success (200).

Private Methods

Méthode Description
ParseHeaders ( ) : void

Parse the headers.

ParseRequest ( ) : void

Parse the request to load the method, URL, and protocol.

ReadLine ( ) : string

Read the next line from the HTTP request.

Method Details

HttpProcessor() public méthode

Initializes a new instance of the HttpProcessor class.
public HttpProcessor ( TcpClient socket, HttpServer server ) : System
socket System.Net.Sockets.TcpClient Pass in the client socket.
server HttpServer Pass in the HTTP server.
Résultat System

Process() public méthode

Process incoming requests.
public Process ( ) : void
Résultat void

WriteFailure() public méthode

Write a HTTP failure (500).
public WriteFailure ( ) : void
Résultat void

WriteLine() public méthode

Write a single line of ASCII text followed by the new line character.
public WriteLine ( string value ) : void
value string The string in ASCII format.
Résultat void

WriteSuccess() public méthode

Write an HTTP success (200).
public WriteSuccess ( ) : void
Résultat void