Channel

Overview

Channel is the common base class for both ClientChannel and ServerChannels, and introduces common properties and events.

Location


 

constructor  protected

 

constructor

 

Channel()

 

Sub New()

AfterReceiveStream

This event is triggered by client and server channels directly after a request or response stream has been received and before the stream gets parsed into a message. User code can assign handlers to this event to process, inspect or modify incoming messages, before they get handled by the Remoting SDK framework. The passed Stream is a MemoryStream and may be modified.

If no handlers are assigned to the AfterReceiveStream event, the message will load the data directly from the incoming medium (usually the network stream); assigning event handlers to AfterReceiveStream will induce a slight overhead as the data will first be copied into a local memory buffer for the event handler. This should not have any noticeably effect except for very large messages or on resource-limited systems such as Compact Framework Clients, but if utmost performance is important, take this note into consideration.

 

event AfterReceiveStream: EventHandler<StreamEventArgs>;

 

delegate EventHandler<StreamEventArgs> AfterReceiveStream()

 

Event AfterReceiveStream As EventHandler<StreamEventArgs>

BeforeSendStream

This event is triggered by client and server channels directly before a request or response stream will be sent over the network. User code can assign handlers to this event to process, inspect or modify incoming messages before they get sent out to the remote system.

The passed Stream is a MemoryStream and may be modified.

 

event BeforeSendStream: EventHandler<StreamEventArgs>;

 

delegate EventHandler<StreamEventArgs> BeforeSendStream()

 

Event BeforeSendStream As EventHandler<StreamEventArgs>

CopyProperties  protected

 

method CopyProperties(source: Channel)

 

void CopyProperties(Channel source)

 

Sub CopyProperties(source As Channel)

Parameters:

  • source:

HasAfterReceiveStream  protected

 

property HasAfterReceiveStream: Boolean read;

 

Boolean HasAfterReceiveStream { get; }

 

ReadOnly Property HasAfterReceiveStream() As Boolean

HasBeforeSendStream  protected

 

property HasBeforeSendStream: Boolean read;

 

Boolean HasBeforeSendStream { get; }

 

ReadOnly Property HasBeforeSendStream() As Boolean

TriggerAfterReceiveStream  protected

 

method TriggerAfterReceiveStream(var stream: Stream)

 

void TriggerAfterReceiveStream(ref Stream stream)

 

Sub TriggerAfterReceiveStream(ByRef stream As Stream)

Parameters:

  • stream:

TriggerBeforeSendStream  protected

 

method TriggerBeforeSendStream(var stream: Stream)

 

void TriggerBeforeSendStream(ref Stream stream)

 

Sub TriggerBeforeSendStream(ByRef stream As Stream)

Parameters:

  • stream:

 

HasAfterReceiveStream  protected

 

property HasAfterReceiveStream: Boolean read;

 

Boolean HasAfterReceiveStream { get; }

 

ReadOnly Property HasAfterReceiveStream() As Boolean

HasBeforeSendStream  protected

 

property HasBeforeSendStream: Boolean read;

 

Boolean HasBeforeSendStream { get; }

 

ReadOnly Property HasBeforeSendStream() As Boolean

 

constructor  protected

 

constructor

 

Channel()

 

Sub New()

CopyProperties  protected

 

method CopyProperties(source: Channel)

 

void CopyProperties(Channel source)

 

Sub CopyProperties(source As Channel)

Parameters:

  • source:

TriggerAfterReceiveStream  protected

 

method TriggerAfterReceiveStream(var stream: Stream)

 

void TriggerAfterReceiveStream(ref Stream stream)

 

Sub TriggerAfterReceiveStream(ByRef stream As Stream)

Parameters:

  • stream:

TriggerBeforeSendStream  protected

 

method TriggerBeforeSendStream(var stream: Stream)

 

void TriggerBeforeSendStream(ref Stream stream)

 

Sub TriggerBeforeSendStream(ByRef stream As Stream)

Parameters:

  • stream:

 

AfterReceiveStream

This event is triggered by client and server channels directly after a request or response stream has been received and before the stream gets parsed into a message. User code can assign handlers to this event to process, inspect or modify incoming messages, before they get handled by the Remoting SDK framework. The passed Stream is a MemoryStream and may be modified.

If no handlers are assigned to the AfterReceiveStream event, the message will load the data directly from the incoming medium (usually the network stream); assigning event handlers to AfterReceiveStream will induce a slight overhead as the data will first be copied into a local memory buffer for the event handler. This should not have any noticeably effect except for very large messages or on resource-limited systems such as Compact Framework Clients, but if utmost performance is important, take this note into consideration.

 

event AfterReceiveStream: EventHandler<StreamEventArgs>;

 

delegate EventHandler<StreamEventArgs> AfterReceiveStream()

 

Event AfterReceiveStream As EventHandler<StreamEventArgs>

BeforeSendStream

This event is triggered by client and server channels directly before a request or response stream will be sent over the network. User code can assign handlers to this event to process, inspect or modify incoming messages before they get sent out to the remote system.

The passed Stream is a MemoryStream and may be modified.

 

event BeforeSendStream: EventHandler<StreamEventArgs>;

 

delegate EventHandler<StreamEventArgs> BeforeSendStream()

 

Event BeforeSendStream As EventHandler<StreamEventArgs>