C# Class Stumps.Http.HttpServer

A class that represents a basic HTTP server.
Inheritance: IHttpServer
ファイルを表示 Open project: Cayan-LLC/stumps Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

HttpServer ( ServerScheme scheme, int port, IHttpHandler handler ) : System

Initializes a new instance of the T:Stumps.Http.HttpServer class.

HttpServer ( int port, IHttpHandler handler ) : System

Initializes a new instance of the T:Stumps.Http.HttpServer class.

StartListening ( ) : void

Starts the instance listening for HTTP requests.

StopListening ( ) : void

Stops the instance from listening for HTTP requests.

Private Methods

Method Description
ProcessAsyncRequest ( ) : void

Processes the incoming HTTP request asynchronously.

WaitForConnections ( ) : void

Wait for incoming HTTP connections.

Method Details

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

HttpServer() public method

Initializes a new instance of the T:Stumps.Http.HttpServer class.
/// is null. /// exceeds the allowed TCP port range.
public HttpServer ( ServerScheme scheme, int port, IHttpHandler handler ) : System
scheme ServerScheme
port int The port the HTTP server is using to listen for traffic.
handler IHttpHandler The default executed when receiving traffic.
return System

HttpServer() public method

Initializes a new instance of the T:Stumps.Http.HttpServer class.
/// is null. /// exceeds the allowed TCP port range.
public HttpServer ( int port, IHttpHandler handler ) : System
port int The port the HTTP server is using to listen for traffic.
handler IHttpHandler The default executed when receiving traffic.
return System

StartListening() public method

Starts the instance listening for HTTP requests.
public StartListening ( ) : void
return void

StopListening() public method

Stops the instance from listening for HTTP requests.
public StopListening ( ) : void
return void