C# Class NanoByte.Common.Net.MicroServer

Provides a minimalistic HTTP webserver that can provide only a single file. Useful for testing download code.
Inheritance: IDisposable
ファイルを表示 Open project: nano-byte/common Class Usage Examples

Private Properties

Property Type Description
HandleRequest void
ListenLoop void
MicroServer System
StartListening string

Public Methods

Method Description
Dispose ( ) : void

Stops listening for incoming HTTP connections.

Private Methods

Method Description
HandleRequest ( HttpListenerContext context ) : void
ListenLoop ( ) : void

Waits for HTTP requests and responds to them if they ask for "file".

MicroServer ( [ resourceName, [ fileContent ) : System
StartListening ( ) : string

Starts listening and returns the URL prefix under which the content is reachable.

Method Details

Dispose() public method

Stops listening for incoming HTTP connections.
public Dispose ( ) : void
return void