C# Class ModServer.HttpEngine

Inheritance: HelperClass
Afficher le fichier Open project: tyandjel94/RowanParkingPassApp

Méthodes publiques

Свойство Type Description
PAGE_NOT_FOUND String
PAGE_ROOT String
PAGE_SIGN_IN String
pageMutations string>.Dictionary

Méthodes publiques

Méthode Description
HttpEngine ( Stream networkStream, TcpClient client ) : System
addPageMutation ( string placeholder, string replacement ) : bool
process ( String strmessage, byte message ) : void

Méthodes protégées

Méthode Description
on404 ( HttpRequest request ) : void
onInit ( HttpRequest request ) : String
processGet ( HttpRequest request ) : bool

This method checks that the request path exists in the PAGE_ROOT directory. Then the content-type is parsed from the request. An HttpRequest is generated and sent, followed by the file specified. Call this method conditionally from any subclass unless there are no conditions as to what clients are permitted to GET.

processHead ( HttpRequest request ) : bool
processPost ( HttpRequest request ) : void
writeHtmlStream ( Stream s, HttpResponse response ) : void
writeStream ( Stream s, HttpResponse response ) : void

Method Details

HttpEngine() public méthode

public HttpEngine ( Stream networkStream, TcpClient client ) : System
networkStream Stream
client System.Net.Sockets.TcpClient
Résultat System

addPageMutation() public static méthode

public static addPageMutation ( string placeholder, string replacement ) : bool
placeholder string
replacement string
Résultat bool

on404() protected abstract méthode

protected abstract on404 ( HttpRequest request ) : void
request HttpRequest
Résultat void

onInit() protected abstract méthode

protected abstract onInit ( HttpRequest request ) : String
request HttpRequest
Résultat String

process() public méthode

public process ( String strmessage, byte message ) : void
strmessage String
message byte
Résultat void

processGet() protected méthode

This method checks that the request path exists in the PAGE_ROOT directory. Then the content-type is parsed from the request. An HttpRequest is generated and sent, followed by the file specified. Call this method conditionally from any subclass unless there are no conditions as to what clients are permitted to GET.
protected processGet ( HttpRequest request ) : bool
request HttpRequest
Résultat bool

processHead() protected méthode

protected processHead ( HttpRequest request ) : bool
request HttpRequest
Résultat bool

processPost() protected méthode

protected processPost ( HttpRequest request ) : void
request HttpRequest
Résultat void

writeHtmlStream() protected méthode

protected writeHtmlStream ( Stream s, HttpResponse response ) : void
s Stream
response HttpResponse
Résultat void

writeStream() protected méthode

protected writeStream ( Stream s, HttpResponse response ) : void
s Stream
response HttpResponse
Résultat void

Property Details

PAGE_NOT_FOUND public_oe static_oe property

public static String PAGE_NOT_FOUND
Résultat String

PAGE_ROOT public_oe static_oe property

public static String PAGE_ROOT
Résultat String

PAGE_SIGN_IN public_oe static_oe property

public static String PAGE_SIGN_IN
Résultat String

pageMutations public_oe static_oe property

public static Dictionary pageMutations
Résultat string>.Dictionary