Method | Description | |
---|---|---|
AddHandler ( HttpRequestHandler handler ) : void |
Add a request handler
|
|
AddHandler ( string method, string contentType, string path, HttpRequestCallback callback ) : void |
Add a request handler
|
|
RemoveHandler ( HttpRequestHandler handler ) : void |
Remove a request handler
|
|
Set404Handler ( HttpRequestCallback callback ) : void |
Set a callback to override the default 404 (Not Found) response
|
|
Start ( ) : void |
Start the server
|
|
Stop ( ) : void |
Stop the server
|
|
WebServer ( |
Initialize the server in HTTP mode
|
|
WebServer ( |
Initialize the server in HTTPS (TLS 1.0) mode
|
Method | Description | |
---|---|---|
FireRequestCallback ( IHttpClientContext client, IHttpRequest request, IHttpResponse response, HttpRequestCallback callback ) : void | ||
RequestHandler ( IHttpClientContext client, IHttpRequest request ) : void |
public AddHandler ( HttpRequestHandler handler ) : void | ||
handler | HttpRequestHandler | Request handler to add |
return | void |
public AddHandler ( string method, string contentType, string path, HttpRequestCallback callback ) : void | ||
method | string | HTTP verb to match, or null to skip verb matching |
contentType | string | Content-Type header to match, or null to skip Content-Type matching |
path | string | Request URI path regular expression to match, or null to skip URI path matching |
callback | HttpRequestCallback | Callback to fire when an incoming request matches the given pattern |
return | void |
public RemoveHandler ( HttpRequestHandler handler ) : void | ||
handler | HttpRequestHandler | Request handler to remove |
return | void |
public Set404Handler ( HttpRequestCallback callback ) : void | ||
callback | HttpRequestCallback | Callback that will be fired when an unhandled /// request is received, or null to reset to the default handler |
return | void |
public WebServer ( |
||
address | IP address to bind to | |
port | int | Port number to bind to |
return | System |
public WebServer ( |
||
address | IP address to bind to | |
port | int | Port number to bind to |
certificate | X.509 server certificate for SSL | |
rootCA | X.509 certificate for the root certificate authority /// that signed the server certificate and/or any client certificates | |
requireClientCerts | bool | True if client SSL certificates are /// required, otherwise false |
return | System |