HttpOutgoingRequestResponse

Overview

The Abstract Base Class represents an outgoing HTTP message - either a request to be sent from the HttpClient, or a response to be sent from the HttpServer. You will usually deal with the separate descendants HttpClientRequest or HttpServerResponse that descend from this class.

Location


 

constructor  protected

 

constructor

 

HttpOutgoingRequestResponse()

 

Sub New()

constructor (HttpHeaders)  protected

 

constructor(header: HttpHeaders)

 

HttpOutgoingRequestResponse(HttpHeaders header)

 

Sub New(header As HttpHeaders)

Parameters:

  • header:

Client  protected    (declared in HttpRequestResponse)

 

property Client: Boolean read;

 

Boolean Client { get; }

 

ReadOnly Property Client() As Boolean

CloneEvents    (declared in HttpRequestResponse)

 

method CloneEvents(source: HttpRequestResponse)

 

void CloneEvents(HttpRequestResponse source)

 

Sub CloneEvents(source As HttpRequestResponse)

Parameters:

  • source:

CloseStream

When ContentSource is set to ContentStream (and a ContentStream is assigned), this property determines if the stream should be closed automatically after sending it to the connection (true) or not (false).

 

property CloseStream: Boolean read write;

 

Boolean CloseStream { get; set; }

 

Property CloseStream() As Boolean

ContentBytes

Assigns a byte array to send back as HTTP body to this property.

 

property ContentBytes: array of Byte read write;

 

Byte[] ContentBytes { get; set; }

 

Property ContentBytes() As Byte()

ContentSource

Defines which property (ContentBytes, ContentStream or ContantString) will be used to send the body of the response. Assigning any of these three properties will automatically set the ContentSource property so that the content will always be sent from the appropriate source.

 

property ContentSource: ContentSource read;

 

ContentSource ContentSource { get; }

 

ReadOnly Property ContentSource() As ContentSource

ContentStream

Assigns a stream to send back as HTTP body to this property. When assigned (and ContentSource is set to ContentStream), you can use the CloseStream property to determine if the stream should be closed automatically after sending it to the connection (true) or not (false).

 

property ContentStream: Stream read write;

 

Stream ContentStream { get; set; }

 

Property ContentStream() As Stream

ContentString

Assigns a string to send back as HTTP body to this property.

 

property ContentString: String read write;

 

String ContentString { get; set; }

 

Property ContentString() As String

Encoding    (declared in HttpRequestResponse)

 

property Encoding: Encoding read write;

 

Encoding Encoding { get; set; }

 

Property Encoding() As Encoding

FinalizeHeader

 

method FinalizeHeader

 

void FinalizeHeader()

 

Sub FinalizeHeader()

HandleOnBytesSent  protected

 

method HandleOnBytesSent(sender: Object; e: EventArgs)

 

void HandleOnBytesSent(Object sender, EventArgs e)

 

Sub HandleOnBytesSent(sender As Object, e As EventArgs)

Parameters:

  • sender:
  • e:

HasOnTransferProgress  protected    (declared in HttpRequestResponse)

 

property HasOnTransferProgress: Boolean read;

 

Boolean HasOnTransferProgress { get; }

 

ReadOnly Property HasOnTransferProgress() As Boolean

 

property Header: HttpHeaders read write;

 

HttpHeaders Header { get; set; }

 

Property Header() As HttpHeaders

KeepAlive

 

property KeepAlive: Boolean read write;

 

Boolean KeepAlive { get; set; }

 

Property KeepAlive() As Boolean

OnTransferEnd    (declared in HttpRequestResponse)

 

event OnTransferEnd: EventHandler<TransferEndEventArgs>;

 

delegate EventHandler<TransferEndEventArgs> OnTransferEnd()

 

Event OnTransferEnd As EventHandler<TransferEndEventArgs>

OnTransferProgress    (declared in HttpRequestResponse)

 

event OnTransferProgress: EventHandler<TransferProgressEventArgs>;

 

delegate EventHandler<TransferProgressEventArgs> OnTransferProgress()

 

Event OnTransferProgress As EventHandler<TransferProgressEventArgs>

OnTransferStart    (declared in HttpRequestResponse)

 

event OnTransferStart: EventHandler<TransferStartEventArgs>;

 

delegate EventHandler<TransferStartEventArgs> OnTransferStart()

 

Event OnTransferStart As EventHandler<TransferStartEventArgs>

Server  protected    (declared in HttpRequestResponse)

 

property Server: Boolean read;

 

Boolean Server { get; }

 

ReadOnly Property Server() As Boolean

TriggerOnTransferEnd  protected    (declared in HttpRequestResponse)

 

method TriggerOnTransferEnd(direction: TransferDirection)

 

void TriggerOnTransferEnd(TransferDirection direction)

 

Sub TriggerOnTransferEnd(direction As TransferDirection)

Parameters:

  • direction:

TriggerOnTransferProgress  protected    (declared in HttpRequestResponse)

 

method TriggerOnTransferProgress(direction: TransferDirection; position: Int64)

 

void TriggerOnTransferProgress(TransferDirection direction, Int64 position)

 

Sub TriggerOnTransferProgress(direction As TransferDirection, position As Int64)

Parameters:

  • direction:
  • position:

TriggerOnTransferStart  protected    (declared in HttpRequestResponse)

 

method TriggerOnTransferStart(direction: TransferDirection; size: Int64)

 

void TriggerOnTransferStart(TransferDirection direction, Int64 size)

 

Sub TriggerOnTransferStart(direction As TransferDirection, size As Int64)

Parameters:

  • direction:
  • size:

WriteBodyToConnection

 

method WriteBodyToConnection(connection: Connection)

 

void WriteBodyToConnection(Connection connection)

 

Sub WriteBodyToConnection(connection As Connection)

Parameters:

  • connection:

WriteHeaderToConnection

 

method WriteHeaderToConnection(connection: Connection)

 

void WriteHeaderToConnection(Connection connection)

 

Sub WriteHeaderToConnection(connection As Connection)

Parameters:

  • connection:

WriteToConnection

 

method WriteToConnection(connection: Connection)

 

void WriteToConnection(Connection connection)

 

Sub WriteToConnection(connection As Connection)

Parameters:

  • connection:

 

Client  protected    (declared in HttpRequestResponse)

 

property Client: Boolean read;

 

Boolean Client { get; }

 

ReadOnly Property Client() As Boolean

CloseStream

When ContentSource is set to ContentStream (and a ContentStream is assigned), this property determines if the stream should be closed automatically after sending it to the connection (true) or not (false).

 

property CloseStream: Boolean read write;

 

Boolean CloseStream { get; set; }

 

Property CloseStream() As Boolean

ContentBytes

Assigns a byte array to send back as HTTP body to this property.

 

property ContentBytes: array of Byte read write;

 

Byte[] ContentBytes { get; set; }

 

Property ContentBytes() As Byte()

ContentSource

Defines which property (ContentBytes, ContentStream or ContantString) will be used to send the body of the response. Assigning any of these three properties will automatically set the ContentSource property so that the content will always be sent from the appropriate source.

 

property ContentSource: ContentSource read;

 

ContentSource ContentSource { get; }

 

ReadOnly Property ContentSource() As ContentSource

ContentStream

Assigns a stream to send back as HTTP body to this property. When assigned (and ContentSource is set to ContentStream), you can use the CloseStream property to determine if the stream should be closed automatically after sending it to the connection (true) or not (false).

 

property ContentStream: Stream read write;

 

Stream ContentStream { get; set; }

 

Property ContentStream() As Stream

ContentString

Assigns a string to send back as HTTP body to this property.

 

property ContentString: String read write;

 

String ContentString { get; set; }

 

Property ContentString() As String

Encoding    (declared in HttpRequestResponse)

 

property Encoding: Encoding read write;

 

Encoding Encoding { get; set; }

 

Property Encoding() As Encoding

HasOnTransferProgress  protected    (declared in HttpRequestResponse)

 

property HasOnTransferProgress: Boolean read;

 

Boolean HasOnTransferProgress { get; }

 

ReadOnly Property HasOnTransferProgress() As Boolean

 

property Header: HttpHeaders read write;

 

HttpHeaders Header { get; set; }

 

Property Header() As HttpHeaders

KeepAlive

 

property KeepAlive: Boolean read write;

 

Boolean KeepAlive { get; set; }

 

Property KeepAlive() As Boolean

Server  protected    (declared in HttpRequestResponse)

 

property Server: Boolean read;

 

Boolean Server { get; }

 

ReadOnly Property Server() As Boolean

 

constructor  protected

 

constructor

 

HttpOutgoingRequestResponse()

 

Sub New()

constructor (HttpHeaders)  protected

 

constructor(header: HttpHeaders)

 

HttpOutgoingRequestResponse(HttpHeaders header)

 

Sub New(header As HttpHeaders)

Parameters:

  • header:

CloneEvents    (declared in HttpRequestResponse)

 

method CloneEvents(source: HttpRequestResponse)

 

void CloneEvents(HttpRequestResponse source)

 

Sub CloneEvents(source As HttpRequestResponse)

Parameters:

  • source:

FinalizeHeader

 

method FinalizeHeader

 

void FinalizeHeader()

 

Sub FinalizeHeader()

HandleOnBytesSent  protected

 

method HandleOnBytesSent(sender: Object; e: EventArgs)

 

void HandleOnBytesSent(Object sender, EventArgs e)

 

Sub HandleOnBytesSent(sender As Object, e As EventArgs)

Parameters:

  • sender:
  • e:

TriggerOnTransferEnd  protected    (declared in HttpRequestResponse)

 

method TriggerOnTransferEnd(direction: TransferDirection)

 

void TriggerOnTransferEnd(TransferDirection direction)

 

Sub TriggerOnTransferEnd(direction As TransferDirection)

Parameters:

  • direction:

TriggerOnTransferProgress  protected    (declared in HttpRequestResponse)

 

method TriggerOnTransferProgress(direction: TransferDirection; position: Int64)

 

void TriggerOnTransferProgress(TransferDirection direction, Int64 position)

 

Sub TriggerOnTransferProgress(direction As TransferDirection, position As Int64)

Parameters:

  • direction:
  • position:

TriggerOnTransferStart  protected    (declared in HttpRequestResponse)

 

method TriggerOnTransferStart(direction: TransferDirection; size: Int64)

 

void TriggerOnTransferStart(TransferDirection direction, Int64 size)

 

Sub TriggerOnTransferStart(direction As TransferDirection, size As Int64)

Parameters:

  • direction:
  • size:

WriteBodyToConnection

 

method WriteBodyToConnection(connection: Connection)

 

void WriteBodyToConnection(Connection connection)

 

Sub WriteBodyToConnection(connection As Connection)

Parameters:

  • connection:

WriteHeaderToConnection

 

method WriteHeaderToConnection(connection: Connection)

 

void WriteHeaderToConnection(Connection connection)

 

Sub WriteHeaderToConnection(connection As Connection)

Parameters:

  • connection:

WriteToConnection

 

method WriteToConnection(connection: Connection)

 

void WriteToConnection(Connection connection)

 

Sub WriteToConnection(connection As Connection)

Parameters:

  • connection:

 

OnTransferEnd    (declared in HttpRequestResponse)

 

event OnTransferEnd: EventHandler<TransferEndEventArgs>;

 

delegate EventHandler<TransferEndEventArgs> OnTransferEnd()

 

Event OnTransferEnd As EventHandler<TransferEndEventArgs>

OnTransferProgress    (declared in HttpRequestResponse)

 

event OnTransferProgress: EventHandler<TransferProgressEventArgs>;

 

delegate EventHandler<TransferProgressEventArgs> OnTransferProgress()

 

Event OnTransferProgress As EventHandler<TransferProgressEventArgs>

OnTransferStart    (declared in HttpRequestResponse)

 

event OnTransferStart: EventHandler<TransferStartEventArgs>;

 

delegate EventHandler<TransferStartEventArgs> OnTransferStart()

 

Event OnTransferStart As EventHandler<TransferStartEventArgs>