C# Класс WebSocketSharp.Net.HttpListener

Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Abort ( ) : void

Shuts down the HttpListener immediately.

BeginGetContext ( AsyncCallback callback, Object state ) : IAsyncResult

Begins getting an incoming request information asynchronously.

This asynchronous operation must be completed by calling the EndGetContext method. Typically, the method is invoked by the callback delegate.

Close ( ) : void

Shuts down the HttpListener.

EndGetContext ( IAsyncResult asyncResult ) : HttpListenerContext

Ends an asynchronous operation to get an incoming request information.

This method completes an asynchronous operation started by calling the BeginGetContext method.

GetContext ( ) : HttpListenerContext

Gets an incoming request information.

This method waits for an incoming request and returns the request information when received the request.

HttpListener ( ) : System

Initializes a new instance of the HttpListener class.

Start ( ) : void

Starts to receive incoming requests.

Stop ( ) : void

Stops receiving incoming requests.

Приватные методы

Метод Описание
AddConnection ( HttpConnection cnc ) : void
CheckDisposed ( ) : void
Cleanup ( bool force ) : void
CleanupConnections ( ) : void
CleanupContextRegistry ( ) : void
CleanupWaitQueue ( ) : void
Close ( bool force ) : void
GetContextFromQueue ( ) : HttpListenerContext
IDisposable ( ) : void

Releases all resource used by the HttpListener.

RegisterContext ( HttpListenerContext context ) : void
RemoveConnection ( HttpConnection cnc ) : void
SelectAuthenticationScheme ( HttpListenerContext context ) : AuthenticationSchemes
SendServiceUnavailable ( ) : void
UnregisterContext ( HttpListenerContext context ) : void

Описание методов

Abort() публичный Метод

Shuts down the HttpListener immediately.
public Abort ( ) : void
Результат void

BeginGetContext() публичный Метод

Begins getting an incoming request information asynchronously.
This asynchronous operation must be completed by calling the EndGetContext method. Typically, the method is invoked by the callback delegate.
/// This object has been closed. /// /// The has not been started or is stopped currently. ///
public BeginGetContext ( AsyncCallback callback, Object state ) : IAsyncResult
callback AsyncCallback /// An delegate that references the method(s) /// called when the asynchronous operation completes. ///
state Object /// An that contains a user defined object to pass to the delegate. ///
Результат IAsyncResult

Close() публичный Метод

Shuts down the HttpListener.
public Close ( ) : void
Результат void

EndGetContext() публичный Метод

Ends an asynchronous operation to get an incoming request information.
This method completes an asynchronous operation started by calling the BeginGetContext method.
/// This object has been closed. /// /// is . /// /// was not obtained by calling the method. /// /// The EndGetContext method was already called for the specified . ///
public EndGetContext ( IAsyncResult asyncResult ) : HttpListenerContext
asyncResult IAsyncResult /// An obtained by calling the method. ///
Результат HttpListenerContext

GetContext() публичный Метод

Gets an incoming request information.
This method waits for an incoming request and returns the request information when received the request.
/// /// The does not have any URI prefixes to listen on. /// /// /// -or- /// /// /// The has not been started or is stopped currently. /// /// /// This object has been closed. ///
public GetContext ( ) : HttpListenerContext
Результат HttpListenerContext

HttpListener() публичный Метод

Initializes a new instance of the HttpListener class.
public HttpListener ( ) : System
Результат System

Start() публичный Метод

Starts to receive incoming requests.
/// This object has been closed. ///
public Start ( ) : void
Результат void

Stop() публичный Метод

Stops receiving incoming requests.
/// This object has been closed. ///
public Stop ( ) : void
Результат void