C# Class Server.Request

Afficher le fichier Open project: adrianrussell/MicroFrameworkWebServer Class Usage Examples

Méthodes publiques

Méthode Description
Dispose ( ) : void
ProcessRequestHeader ( ) : void
Request ( IClientSocket client, char data ) : Microsoft.SPOT
Send404 ( ) : void

Send a Not Found response

SendFile ( string filePath ) : void

Sends a file back to the client

Assumes the application using this has checked whether it exists

SendResponse ( string response, string type = "text/html" ) : void

Send a response back to the client

Private Methods

Méthode Description
DoesFileNameHaveExtentsion ( string filePath ) : bool
GetFileExtentsion ( string filePath ) : string
MapMIMEType ( string filePath, string type ) : string
NoBytesToRead ( int bytesRead ) : bool
ProcessRequestHeader ( char data ) : void
SendHeader ( string type, Stream inputStream ) : void
SendResponseFromFile ( Stream inputStream ) : void

Method Details

Dispose() public méthode

public Dispose ( ) : void
Résultat void

ProcessRequestHeader() public méthode

public ProcessRequestHeader ( ) : void
Résultat void

Request() public méthode

public Request ( IClientSocket client, char data ) : Microsoft.SPOT
client IClientSocket
data char
Résultat Microsoft.SPOT

Send404() public méthode

Send a Not Found response
public Send404 ( ) : void
Résultat void

SendFile() public méthode

Sends a file back to the client
Assumes the application using this has checked whether it exists
public SendFile ( string filePath ) : void
filePath string
Résultat void

SendResponse() public méthode

Send a response back to the client
public SendResponse ( string response, string type = "text/html" ) : void
response string
type string
Résultat void