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

add_AfterReceiveStream

 

method add_AfterReceiveStream(value: EventHandler<StreamEventArgs>)

 

void add_AfterReceiveStream(EventHandler<StreamEventArgs> value)

 

Sub add_AfterReceiveStream(value As EventHandler<StreamEventArgs>)

Parameters:

  • value:

add_BeforeSendStream

 

method add_BeforeSendStream(value: EventHandler<StreamEventArgs>)

 

void add_BeforeSendStream(EventHandler<StreamEventArgs> value)

 

Sub add_BeforeSendStream(value As EventHandler<StreamEventArgs>)

Parameters:

  • value:

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; }

 

Property ReadOnly HasAfterReceiveStream As Boolean

HasBeforeSendStream  protected

 

property HasBeforeSendStream: Boolean read;

 

Boolean HasBeforeSendStream { get; }

 

Property ReadOnly HasBeforeSendStream As Boolean

remove_AfterReceiveStream

 

method remove_AfterReceiveStream(value: EventHandler<StreamEventArgs>)

 

void remove_AfterReceiveStream(EventHandler<StreamEventArgs> value)

 

Sub remove_AfterReceiveStream(value As EventHandler<StreamEventArgs>)

Parameters:

  • value:

remove_BeforeSendStream

 

method remove_BeforeSendStream(value: EventHandler<StreamEventArgs>)

 

void remove_BeforeSendStream(EventHandler<StreamEventArgs> value)

 

Sub remove_BeforeSendStream(value As EventHandler<StreamEventArgs>)

Parameters:

  • value:

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; }

 

Property ReadOnly HasAfterReceiveStream As Boolean

HasBeforeSendStream  protected

 

property HasBeforeSendStream: Boolean read;

 

Boolean HasBeforeSendStream { get; }

 

Property ReadOnly HasBeforeSendStream As Boolean

 

constructor  protected

 

constructor

 

Channel()

 

Sub New

add_AfterReceiveStream

 

method add_AfterReceiveStream(value: EventHandler<StreamEventArgs>)

 

void add_AfterReceiveStream(EventHandler<StreamEventArgs> value)

 

Sub add_AfterReceiveStream(value As EventHandler<StreamEventArgs>)

Parameters:

  • value:

add_BeforeSendStream

 

method add_BeforeSendStream(value: EventHandler<StreamEventArgs>)

 

void add_BeforeSendStream(EventHandler<StreamEventArgs> value)

 

Sub add_BeforeSendStream(value As EventHandler<StreamEventArgs>)

Parameters:

  • value:

CopyProperties  protected

 

method CopyProperties(source: Channel)

 

void CopyProperties(Channel source)

 

Sub CopyProperties(source As Channel)

Parameters:

  • source:

remove_AfterReceiveStream

 

method remove_AfterReceiveStream(value: EventHandler<StreamEventArgs>)

 

void remove_AfterReceiveStream(EventHandler<StreamEventArgs> value)

 

Sub remove_AfterReceiveStream(value As EventHandler<StreamEventArgs>)

Parameters:

  • value:

remove_BeforeSendStream

 

method remove_BeforeSendStream(value: EventHandler<StreamEventArgs>)

 

void remove_BeforeSendStream(EventHandler<StreamEventArgs> value)

 

Sub remove_BeforeSendStream(value As EventHandler<StreamEventArgs>)

Parameters:

  • value:

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>

Descendants

See Also