Provides a minimalistic HTTP web server that can provide only a single file. Useful for testing download code.
More...
|
| MicroServer ([Localizable(false)] string resourceName, Stream fileContent) |
| Starts a HTTP web server that listens on a random port. More...
|
|
void | Dispose () |
| Stops listening for incoming HTTP connections. More...
|
|
|
Uri | ServerUri [get] |
| The URL under which the server root can be reached. Usually you should use FileUri instead. More...
|
|
Uri | FileUri [get] |
| The complete URL under which the server provides its file. More...
|
|
Stream | FileContent [get] |
| The content of the file to be served under FileUri. More...
|
|
bool | Slow [get, set] |
| Wait for twenty seconds every time before finishing a response. More...
|
|
Provides a minimalistic HTTP web server that can provide only a single file. Useful for testing download code.
◆ MicroServer()
NanoByte.Common.Net.MicroServer.MicroServer |
( |
[Localizable(false)] string |
resourceName, |
|
|
Stream |
fileContent |
|
) |
| |
|
inline |
Starts a HTTP web server that listens on a random port.
- Parameters
-
resourceName | The HTTP resource name under which to provide the content. |
fileContent | The content of the file to serve. |
◆ Dispose()
void NanoByte.Common.Net.MicroServer.Dispose |
( |
| ) |
|
Stops listening for incoming HTTP connections.
◆ FileContent
Stream NanoByte.Common.Net.MicroServer.FileContent |
|
get |
The content of the file to be served under FileUri.
◆ FileUri
Uri NanoByte.Common.Net.MicroServer.FileUri |
|
get |
The complete URL under which the server provides its file.
◆ ServerUri
Uri NanoByte.Common.Net.MicroServer.ServerUri |
|
get |
The URL under which the server root can be reached. Usually you should use FileUri instead.
◆ Slow
bool NanoByte.Common.Net.MicroServer.Slow |
|
getset |
Wait for twenty seconds every time before finishing a response.
The documentation for this class was generated from the following file:
- Common/Net/MicroServer.cs