C# Класс Incog.Servers.HttpProcessor

Simple Hypertext Transfer Protocol (HTTP) request processor.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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).

Приватные методы

Метод Описание
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.

Описание методов

HttpProcessor() публичный Метод

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.
Результат System

Process() публичный Метод

Process incoming requests.
public Process ( ) : void
Результат void

WriteFailure() публичный Метод

Write a HTTP failure (500).
public WriteFailure ( ) : void
Результат void

WriteLine() публичный Метод

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.
Результат void

WriteSuccess() публичный Метод

Write an HTTP success (200).
public WriteSuccess ( ) : void
Результат void