C# Class WebSocketSharp.Net.HttpListener

Inheritance: IDisposable
Show file Open project: NIAEFEUP/Kommando Class Usage Examples

Public Methods

Method Description
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.

Private Methods

Method Description
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

Method Details

Abort() public method

Shuts down the HttpListener immediately.
public Abort ( ) : void
return void

BeginGetContext() public method

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. ///
return IAsyncResult

Close() public method

Shuts down the HttpListener.
public Close ( ) : void
return void

EndGetContext() public method

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. ///
return HttpListenerContext

GetContext() public method

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
return HttpListenerContext

HttpListener() public method

Initializes a new instance of the HttpListener class.
public HttpListener ( ) : System
return System

Start() public method

Starts to receive incoming requests.
/// This object has been closed. ///
public Start ( ) : void
return void

Stop() public method

Stops receiving incoming requests.
/// This object has been closed. ///
public Stop ( ) : void
return void