My Project
|
Represents the event data for the HTTP request events of the HttpServer class. More...
Public Member Functions | |
byte[] | ReadFile (string path) |
Reads the specified file from the document folder of the HttpServer class. | |
bool | TryReadFile (string path, out byte[] contents) |
Tries to read the specified file from the document folder of the HttpServer class. | |
Properties | |
HttpListenerRequest | Request [get] |
Gets the request data sent from a client. | |
HttpListenerResponse | Response [get] |
Gets the response data to return to the client. | |
IPrincipal | User [get] |
Gets the information for the client. | |
Represents the event data for the HTTP request events of the HttpServer class.
An HTTP request event occurs when the HttpServer instance receives an HTTP request.
You should access the Request property if you would like to get the request data sent from a client.
And you should access the Response property if you would like to get the response data to return to the client.
|
inline |
Reads the specified file from the document folder of the HttpServer class.
null
if it fails. That array receives the contents of the file.
path | A string that specifies a virtual path to find the file from the document folder. |
ArgumentNullException | path is null . |
ArgumentException | path is an empty string. -or- path contains "..". |
|
inline |
Tries to read the specified file from the document folder of the HttpServer class.
true
if it succeeds to read; otherwise, false
. path | A string that specifies a virtual path to find the file from the document folder. |
contents | When this method returns, an array of byte or null if it fails. That array receives the contents of the file. |
ArgumentNullException | path is null . |
ArgumentException | path is an empty string. -or- path contains "..". |
|
get |
Gets the request data sent from a client.
A HttpListenerRequest that provides the methods and properties for the request data.
|
get |
Gets the response data to return to the client.
A HttpListenerResponse that provides the methods and properties for the response data.
|
get |
Gets the information for the client.
A IPrincipal instance or null
if not authenticated.
That instance describes the identity, authentication scheme, and security roles for the client.