C# Class Netty.HttpResponse

Provides a concrete implementation of the IHttpResponse interface based on a HttpListenerResponse.
Inheritance: System.MarshalByRefObject, IHttpResponse, IDisposable
ファイルを表示 Open project: Cayan-LLC/netty Class Usage Examples

Public Methods

Method Description
AddHeader ( string name, string value ) : void

Adds the specified header and value to the HTTP headers for this response.

AppendHeader ( string name, string value ) : void

Appends a value to the specified HTTP header to be sent with this response.

ClearOutputStream ( ) : void

Clears the output stream.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

FlushResponse ( ) : void

Flushes all data in the instance to the underlying HttpListenerResponse.

HttpResponse ( HttpListenerResponse response ) : System

Initializes a new instance of the HttpResponse class.

Redirect ( string url ) : void

Configures the response to redirect the client to the specified URL.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources.

Private Methods

Method Description
InitializeLifetimeService ( ) : object

Method Details

AddHeader() public method

Adds the specified header and value to the HTTP headers for this response.
public AddHeader ( string name, string value ) : void
name string The name of the HTTP header to set.
value string The value for the name header.
return void

AppendHeader() public method

Appends a value to the specified HTTP header to be sent with this response.
public AppendHeader ( string name, string value ) : void
name string The name of the HTTP header to append value to.
value string The value to append to the name header.
return void

ClearOutputStream() public method

Clears the output stream.
public ClearOutputStream ( ) : void
return void

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

Dispose() protected method

Releases unmanaged and - optionally - managed resources.
protected Dispose ( bool disposing ) : void
disposing bool /// true to release both managed and unmanaged resources; false to release only unmanaged resources. ///
return void

FlushResponse() public method

Flushes all data in the instance to the underlying HttpListenerResponse.
public FlushResponse ( ) : void
return void

HttpResponse() public method

Initializes a new instance of the HttpResponse class.
public HttpResponse ( HttpListenerResponse response ) : System
response System.Net.HttpListenerResponse The response.
return System

Redirect() public method

Configures the response to redirect the client to the specified URL.
public Redirect ( string url ) : void
url string The URL that the client should use to locate the requested resource.
return void