|
void | HandleRequestWithoutBody (HttpProcessor p, string method) |
| Handles a request that does not contain a body (as of the HTTP spec).- Parameters
-
p | The HTTP processor. |
method | The HTTP method. |
|
void | HandleRequestWithBody (HttpProcessor p, MemoryStream inputData, string method) |
| Handles a general request with a request body.- Parameters
-
p | The HTTP processor. |
inputData | The stream to read the request body from. |
method | The HTTP method. |
|
string | GetFullUrlFor (string relativeUrl) |
| Resolves the full url to the provided path on the current server.- Parameters
-
- Returns
|
void | Start () |
| Start the server.
|
void | Stop () |
| Stop the server.
|
virtual void | Dispose () |
| Disposes the server (stops it if it is running)
|
void | Start () |
| Start the server.
|
void | Stop () |
| Stop the server.
|
|
| HttpServerBase (int port) |
| HttpServerBase () |
override IProcessor | CreateProcessorFor (TcpClient client) |
| TcpServer (int minPort=5000, int maxPort=32000) |
| Construct the server with a random port within the provided range.
|
| TcpServer (int port) |
| Construct the server with the explicitly-provided port.
|
void | Init () |
| Override in derived classes: this initializes the server system.
|
void | Log (string message, params object[] parameters) |
| Provides a convenience logging mechanism which outputs via the established LogAction.
|
IProcessor | CreateProcessorFor (TcpClient client) |
| Create a processor for a particular TCP client.
|
virtual int | NextRandomPort () |
| Guesses the next random port to attempt to bind to.
|
|
Action< RequestLogItem > | RequestLogAction = null [get, set] |
| Log action used for requests.
|
HttpVersion | Version [get, set] |
| HTTP version reported by the server in responses Note that this does not change behavior of the server, only the exact format of the response.
|
string | BaseUrl [get] |
| Provides the base url from which the server serves.
|
bool | Disposed [get] |
| Flag: when true, this server has been disposed.
|
int | MaxShutDownTime = 1000 [get, set] |
| Maximum time, in milliseconds, to wait on the listener task when shutting down.
|
bool | LogRandomPortDiscovery [get, set] |
| Whether or not to log random port discovery processes.
|
Action< string > | LogAction = Console.WriteLine [get, set] |
| Action to employ when logging (defaults to logging to the console)
|
int | Port [get, protected set] |
| Port which this server has bound to.
|
bool | IsListening [get] |
| Flag exposing listening state.
|
bool | Disposed [get] |
| Flag: when true, this server has been disposed.
|
int | MaxShutDownTime [get, set] |
| Maximum time, in milliseconds, to wait on the listener task when shutting down.
|
bool | LogRandomPortDiscovery [get, set] |
| Whether or not to log random port discovery processes.
|
Action< string > | LogAction [get, set] |
| Action to employ when logging (defaults to logging to the console)
|
int | Port [get] |
| Port which this server has bound to.
|
bool | IsListening [get] |
| Flag exposing listening state.
|
Provides the abstract base HTTP Server.