C# Class Server.Request

Datei anzeigen Open project: adrianrussell/MicroFrameworkWebServer Class Usage Examples

Public Methods

Method 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

Method 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 method

public Dispose ( ) : void
return void

ProcessRequestHeader() public method

public ProcessRequestHeader ( ) : void
return void

Request() public method

public Request ( IClientSocket client, char data ) : Microsoft.SPOT
client IClientSocket
data char
return Microsoft.SPOT

Send404() public method

Send a Not Found response
public Send404 ( ) : void
return void

SendFile() public method

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

SendResponse() public method

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