C# Class Stumps.Http.HttpServer

A class that represents a basic HTTP server.
Inheritance: IHttpServer
Afficher le fichier Open project: Cayan-LLC/stumps Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
ProcessAsyncRequest ( ) : void

Processes the incoming HTTP request asynchronously.

WaitForConnections ( ) : void

Wait for incoming HTTP connections.

Method Details

Dispose() public méthode

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

HttpServer() public méthode

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.
Résultat System

HttpServer() public méthode

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.
Résultat System

StartListening() public méthode

Starts the instance listening for HTTP requests.
public StartListening ( ) : void
Résultat void

StopListening() public méthode

Stops the instance from listening for HTTP requests.
public StopListening ( ) : void
Résultat void