Interface IHttpListener
Interface to create a HTTP Listener.
Namespace: EmbedIO
Syntax
public interface IHttpListener : IDisposable
Properties
IgnoreWriteExceptions
Gets or sets a value indicating whether the listener should ignore write exceptions. By default the flag is set on.
Declaration
bool IgnoreWriteExceptions { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
|
IsListening
Gets a value indicating whether this instance is listening.
Declaration
bool IsListening { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
|
Name
Gets or sets the name.
Declaration
string Name { get; }
Property Value
| Type | Description |
|---|---|
| String | The name. |
Prefixes
Gets the prefixes.
Declaration
List<string> Prefixes { get; }
Property Value
| Type | Description |
|---|---|
| List<String> | The prefixes. |
Methods
AddPrefix(String)
Adds the prefix.
Declaration
void AddPrefix(string urlPrefix)
Parameters
| Type | Name | Description |
|---|---|---|
| String | urlPrefix | The URL prefix. |
GetContextAsync(CancellationToken)
Gets the HTTP context asynchronous.
Declaration
Task<IHttpContextImpl> GetContextAsync(CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<IHttpContextImpl> | A task that represents the time delay for the HTTP Context. |
Start()
Starts this listener.
Declaration
void Start()
Stop()
Stops this listener.
Declaration
void Stop()