IpHttpClientChannel
Overview
The IpHttpClientChannel class inherits from ClientChannel to provide client communication via the HTTP protocol based on HttpClient.
Location
- Reference: RemObjects.SDK.dll
- Namespace: RemObjects.SDK
- Ancestry: Component | Channel | ClientChannel | IpClientChannel | IpHttpClientChannel
constructor
constructor
IpHttpClientChannel()
Sub New()
AfterReceiveStream (declared in Channel)
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>
AsyncDispatch (declared in ClientChannel)
method AsyncDispatch(message: IMessage; callback: AsyncCallback; userData: Object): IClientAsyncResult
IClientAsyncResult AsyncDispatch(IMessage message, AsyncCallback callback, Object userData)
Function AsyncDispatch(message As IMessage, callback As AsyncCallback, userData As Object) As IClientAsyncResult
Parameters:
- message:
- callback:
- userData:
Bearer
property Bearer: String read write;
String Bearer { get; set; }
Property Bearer() As String
BeforeDispatch protected (declared in ClientChannel)
method BeforeDispatch(message: IMessage)
void BeforeDispatch(IMessage message)
Sub BeforeDispatch(message As IMessage)
Parameters:
- message:
BeforeSendStream (declared in Channel)
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>
BeginDispatch (IMessage, AsyncCallback, Boolean, Object): IClientAsyncResult protected (declared in ClientChannel)
method BeginDispatch(message: IMessage; callback: AsyncCallback; disposeChannel: Boolean; userData: Object): IClientAsyncResult
IClientAsyncResult BeginDispatch(IMessage message, AsyncCallback callback, Boolean disposeChannel, Object userData)
Function BeginDispatch(message As IMessage, callback As AsyncCallback, disposeChannel As Boolean, userData As Object) As IClientAsyncResult
Parameters:
- message:
- callback:
- disposeChannel:
- userData:
BeginDispatch (IMessage, AsyncCallback, Object): IClientAsyncResult (declared in ClientChannel)
method BeginDispatch(message: IMessage; callback: AsyncCallback; userData: Object): IClientAsyncResult
IClientAsyncResult BeginDispatch(IMessage message, AsyncCallback callback, Object userData)
Function BeginDispatch(message As IMessage, callback As AsyncCallback, userData As Object) As IClientAsyncResult
Parameters:
- message:
- callback:
- userData:
BuildTargetUri protected (declared in ClientChannel)
class method BuildTargetUri(protocol: String; host: String; port: Int32; message: String): Uri
static Uri BuildTargetUri(String protocol, String host, Int32 port, String message)
Shared Function BuildTargetUri(protocol As String, host As String, port As Int32, message As String) As Uri
Parameters:
- protocol:
- host:
- port:
- message:
ChannelMatchingTargetUri (String): IClientChannel (declared in ClientChannel)
Creates a client channel instance with type, target host and target port matching the provided target Uri. F.e. for provided uri supertcp://192.168.1.100:7020/bin this method will return an instance of the Super Tcp channel with target host set to 192.168.1.100 and port set to 7020.
class method ChannelMatchingTargetUri(uri: String): IClientChannel
static IClientChannel ChannelMatchingTargetUri(String uri)
Shared Function ChannelMatchingTargetUri(uri As String) As IClientChannel
Parameters:
- uri: Server Uri
ChannelMatchingTargetUri (Uri): IClientChannel (declared in ClientChannel)
Creates a client channel instance with type, target host and target port matching the provided target Uri. F.e. for provided uri supertcp://192.168.1.100:7020/bin this method will return an instance of the Super Tcp channel with target host set to 192.168.1.100 and port set to 7020.
class method ChannelMatchingTargetUri(uri: Uri): IClientChannel
static IClientChannel ChannelMatchingTargetUri(Uri uri)
Shared Function ChannelMatchingTargetUri(uri As Uri) As IClientChannel
Parameters:
- uri: Server Uri
CheckChannelStatus protected
method CheckChannelStatus
void CheckChannelStatus()
Sub CheckChannelStatus()
Clone
method Clone: Object
Object Clone()
Function Clone() As Object
method CopyProperties(source: Channel)
void CopyProperties(Channel source)
Sub CopyProperties(source As Channel)
Parameters:
- source:
CopyProperties (ClientChannel) protected
method CopyProperties(source: ClientChannel)
void CopyProperties(ClientChannel source)
Sub CopyProperties(source As ClientChannel)
Parameters:
- source:
Dispatch (declared in ClientChannel)
The implementation of IClientChannel.Dispatch. This method ensures the transport is not busy before calling IntDispatch and passing the given IMessage. If the transport is busy, a ChannelBusyException is thrown.
method Dispatch(message: IMessage)
void Dispatch(IMessage message)
Sub Dispatch(message As IMessage)
Parameters:
- message:
Dispose protected
method Dispose(disposing: Boolean)
void Dispose(Boolean disposing)
Sub Dispose(disposing As Boolean)
Parameters:
- disposing:
EndDispatch (declared in ClientChannel)
method EndDispatch(ar: IAsyncResult): IMessage
IMessage EndDispatch(IAsyncResult ar)
Function EndDispatch(ar As IAsyncResult) As IMessage
Parameters:
- ar:
HasAfterReceiveStream protected (declared in Channel)
property HasAfterReceiveStream: Boolean read;
Boolean HasAfterReceiveStream { get; }
ReadOnly Property HasAfterReceiveStream() As Boolean
HasBeforeSendStream protected (declared in Channel)
property HasBeforeSendStream: Boolean read;
Boolean HasBeforeSendStream { get; }
ReadOnly Property HasBeforeSendStream() As Boolean
HasOnTransferProgress protected (declared in ClientChannel)
property HasOnTransferProgress: Boolean read;
Boolean HasOnTransferProgress { get; }
ReadOnly Property HasOnTransferProgress() As Boolean
HookUpConnectionEvents protected (declared in IpClientChannel)
If the HasOnTransferEvents property returns true (which means that the OnTransferProgress event handler is defined), this method assigns the OnBytesSend and OnBytesReceived event handlers to the corresponding events of the provided Connection.
This method adds events routing from the underlying Connection to this ClientChannel instance. It is called when a concrete implementation of the ClientChannel performs network operations like dispatching a request to the server.
method HookUpConnectionEvents(connection: Connection)
void HookUpConnectionEvents(Connection connection)
Sub HookUpConnectionEvents(connection As Connection)
Parameters:
- connection:
HttpClient
Provides access to the underlying HttpClient component that will be used for the communication with the server.
property HttpClient: HttpClient read;
HttpClient HttpClient { get; }
ReadOnly Property HttpClient() As HttpClient
IntDispatch protected
method IntDispatch(request: Stream; response: IMessage)
void IntDispatch(Stream request, IMessage response)
Sub IntDispatch(request As Stream, response As IMessage)
Parameters:
- request:
- response:
IsBusy (declared in ClientChannel)
property IsBusy: Boolean read;
Boolean IsBusy { get; }
ReadOnly Property IsBusy() As Boolean
KeepAlive
Controls whether to use HTTP Keep-Alive to keep the connection alive between requests.
If enabled (true), once a request is made and a connection is established, this connection is kept open and used for future requests.
If disabled, the connection is closed, and a new connection is created for future requests.
Since establishing a connection is - relatively speaking - a costly and resource intensive operation for the network, compared to sending small amounts of data, it is recommended to keep this option enabled for optimal performance, if requests to the server are done relatively frequently.
For Keep-Alive to work, the option must be supported and enabled on both client and server.
property KeepAlive: Boolean read write;
Boolean KeepAlive { get; set; }
Property KeepAlive() As Boolean
OnBytesReceived protected (declared in IpClientChannel)
This method acts as event handler for the Connection actually performing the network operations. It is added and removed via HookUpConnectionEvents and UnhookConnectionEvents.
This method routes the received event by calling the TriggerOnTransferProgress method, which raises the OnTransferProgress event of the ClientChannel class.
method OnBytesReceived(sender: Object; e: EventArgs)
void OnBytesReceived(Object sender, EventArgs e)
Sub OnBytesReceived(sender As Object, e As EventArgs)
Parameters:
- sender: Sender of the event. Should be an instance of the Connection class.
- e:
OnBytesSent protected (declared in IpClientChannel)
This method acts as event handler for the Connection actually performing the network operations. It is added and removed via HookUpConnectionEvents and UnhookConnectionEvents.
This method routes the received event by calling the TriggerOnTransferProgress method, which raises the OnTransferProgress event of the ClientChannel class.
method OnBytesSent(sender: Object; e: EventArgs)
void OnBytesSent(Object sender, EventArgs e)
Sub OnBytesSent(sender As Object, e As EventArgs)
Parameters:
- sender: Sender of the event. Should be an instance of the Connection class.
- e:
OnException (declared in ClientChannel)
This event is raised if an exception occurs during the execution of a remote request through the channel. The event will be raised both for exceptions originating from the server and for exceptions during communication (such as unavailability of the server). Attach a handler to this event to do custom handling of events without having to reply on explicit try/catch blocks in the calling code.
This event will not be raised for SessionNotFoundExceptions. These will be handled separately by the OnLoginNeeded event.
event OnException: EventHandler<RequestExceptionEventArgs>;
delegate EventHandler<RequestExceptionEventArgs> OnException()
Event OnException As EventHandler<RequestExceptionEventArgs>
OnLoginNeeded (declared in ClientChannel)
This event is raised if an SessionNotFoundException occurs during the execution of a remote request through the channel. The event gives you the opportunity to perform a login on the server (for example by calling a custom Login method, and then retry the call by setting the EventArgs' LoginSuccessful property to true. This way, your client can recover from a timed-out session to automatically logging in again, without the calling code having to consider the handling of SessionNotFoundExceptions manually.
event OnLoginNeeded: EventHandler<LoginNeededEventArgs>;
delegate EventHandler<LoginNeededEventArgs> OnLoginNeeded()
Event OnLoginNeeded As EventHandler<LoginNeededEventArgs>
OnTransferEnd (declared in ClientChannel)
This event is triggered by the client channel after a transfer is completed (either the sending of a request or the receiving of a response).
event OnTransferEnd: EventHandler<TransferEndEventArgs>;
delegate EventHandler<TransferEndEventArgs> OnTransferEnd()
Event OnTransferEnd As EventHandler<TransferEndEventArgs>
OnTransferProgress (declared in ClientChannel)
This event is triggered by the client channel during a transfer (either the sending of a request or the receiving of a response) whenever a new block of data has been sent or received.
event OnTransferProgress: EventHandler<TransferProgressEventArgs>;
delegate EventHandler<TransferProgressEventArgs> OnTransferProgress()
Event OnTransferProgress As EventHandler<TransferProgressEventArgs>
OnTransferStart (declared in ClientChannel)
This event is triggered by the client channel when a transfer (either the sending of a request or the receiving of a response) is about to be started.
event OnTransferStart: EventHandler<TransferStartEventArgs>;
delegate EventHandler<TransferStartEventArgs> OnTransferStart()
Event OnTransferStart As EventHandler<TransferStartEventArgs>
Password
property Password: String read write;
String Password { get; set; }
Property Password() As String
ProxySettings
property ProxySettings: HttpProxySettings read;
HttpProxySettings ProxySettings { get; }
ReadOnly Property ProxySettings() As HttpProxySettings
SslOptions
property SslOptions: SslConnectionFactory read;
SslConnectionFactory SslOptions { get; }
ReadOnly Property SslOptions() As SslConnectionFactory
TargetUri (declared in ClientChannel)
property TargetUri: Uri read write;
Uri TargetUri { get; set; }
Property TargetUri() As Uri
TargetUrl (declared in ClientChannel)
property TargetUrl: String read write;
String TargetUrl { get; set; }
Property TargetUrl() As String
Timeout
Specified the timeout, in seconds, after which the client channel will abort the request. This ensures that for unresponsive servers, the client will not hang indefinitely waiting for a reply. The Default value is 60 (seconds, i.e. 1 minute).
property Timeout: Int32 read write;
Int32 Timeout { get; set; }
Property Timeout() As Int32
TimeoutEnabled
Gets or set a flag indicating whether client channel will timeout waiting for a request if no data is received over the connection for the amount of time specified by the Timeout property.
property TimeoutEnabled: Boolean read write;
Boolean TimeoutEnabled { get; set; }
Property TimeoutEnabled() As Boolean
TriggerAfterReceiveStream protected (declared in Channel)
method TriggerAfterReceiveStream(var stream: Stream)
void TriggerAfterReceiveStream(ref Stream stream)
Sub TriggerAfterReceiveStream(ByRef stream As Stream)
Parameters:
- stream:
TriggerBeforeSendStream protected (declared in Channel)
method TriggerBeforeSendStream(var stream: Stream)
void TriggerBeforeSendStream(ref Stream stream)
Sub TriggerBeforeSendStream(ByRef stream As Stream)
Parameters:
- stream:
TriggerOnException protected (declared in ClientChannel)
method TriggerOnException(exception: Exception; out handled: Boolean)
void TriggerOnException(Exception exception, out Boolean handled)
Sub TriggerOnException(exception As Exception, <OutAttribute> ByRef handled As Boolean)
Parameters:
- exception:
- handled:
TriggerOnLoginNeeded protected (declared in ClientChannel)
method TriggerOnLoginNeeded(exception: Exception; out loginSuccessful: Boolean)
void TriggerOnLoginNeeded(Exception exception, out Boolean loginSuccessful)
Sub TriggerOnLoginNeeded(exception As Exception, <OutAttribute> ByRef loginSuccessful As Boolean)
Parameters:
- exception:
- loginSuccessful:
TriggerOnTransferEnd protected (declared in ClientChannel)
method TriggerOnTransferEnd(direction: TransferDirection)
void TriggerOnTransferEnd(TransferDirection direction)
Sub TriggerOnTransferEnd(direction As TransferDirection)
Parameters:
- direction:
TriggerOnTransferProgress protected (declared in ClientChannel)
method TriggerOnTransferProgress(direction: TransferDirection; current: Int64)
void TriggerOnTransferProgress(TransferDirection direction, Int64 current)
Sub TriggerOnTransferProgress(direction As TransferDirection, current As Int64)
Parameters:
- direction:
- current:
TriggerOnTransferStart protected (declared in ClientChannel)
method TriggerOnTransferStart(direction: TransferDirection; total: Int64)
void TriggerOnTransferStart(TransferDirection direction, Int64 total)
Sub TriggerOnTransferStart(direction As TransferDirection, total As Int64)
Parameters:
- direction:
- total:
UnhookConnectionEvents protected (declared in IpClientChannel)
Removes event handlers previously added via the HookUpConnectionEvents method.
method UnhookConnectionEvents(connection: Connection)
void UnhookConnectionEvents(Connection connection)
Sub UnhookConnectionEvents(connection As Connection)
Parameters:
- connection:
UseConnectionPooling
Specified whether connection pooling is enabled for this channel, or not. But default, connection pooling is turned off. When operating with connection pooling enabled, the channel allows multiple simultaneous requests to be made on different threads, utilizing a common threadsafe pool of connections to reuse. Enable this option to use IpHttpClientChannel component in a multi-threaded application, when you cannot easily control which threads will be making calls at what times or when several threads will be making calls at unpredictable times.
Use separate IpHttpClientChannel components when using a single thread, when you can easily create individual channel instances for each thread that makes calls or when each thread will make frequent or continuous requests.
property UseConnectionPooling: Boolean read write;
Boolean UseConnectionPooling { get; set; }
Property UseConnectionPooling() As Boolean
UserAgent
The User Agent value to be transmitted to the server. Typically this value will not affect functionality however it might show up as the "Browser Name" in the server log files.
property UserAgent: String read write;
String UserAgent { get; set; }
Property UserAgent() As String
UserName
property UserName: String read write;
String UserName { get; set; }
Property UserName() As String
Bearer
property Bearer: String read write;
String Bearer { get; set; }
Property Bearer() As String
HasAfterReceiveStream protected (declared in Channel)
property HasAfterReceiveStream: Boolean read;
Boolean HasAfterReceiveStream { get; }
ReadOnly Property HasAfterReceiveStream() As Boolean
HasBeforeSendStream protected (declared in Channel)
property HasBeforeSendStream: Boolean read;
Boolean HasBeforeSendStream { get; }
ReadOnly Property HasBeforeSendStream() As Boolean
HasOnTransferProgress protected (declared in ClientChannel)
property HasOnTransferProgress: Boolean read;
Boolean HasOnTransferProgress { get; }
ReadOnly Property HasOnTransferProgress() As Boolean
HttpClient
Provides access to the underlying HttpClient component that will be used for the communication with the server.
property HttpClient: HttpClient read;
HttpClient HttpClient { get; }
ReadOnly Property HttpClient() As HttpClient
IsBusy (declared in ClientChannel)
property IsBusy: Boolean read;
Boolean IsBusy { get; }
ReadOnly Property IsBusy() As Boolean
KeepAlive
Controls whether to use HTTP Keep-Alive to keep the connection alive between requests.
If enabled (true), once a request is made and a connection is established, this connection is kept open and used for future requests.
If disabled, the connection is closed, and a new connection is created for future requests.
Since establishing a connection is - relatively speaking - a costly and resource intensive operation for the network, compared to sending small amounts of data, it is recommended to keep this option enabled for optimal performance, if requests to the server are done relatively frequently.
For Keep-Alive to work, the option must be supported and enabled on both client and server.
property KeepAlive: Boolean read write;
Boolean KeepAlive { get; set; }
Property KeepAlive() As Boolean
Password
property Password: String read write;
String Password { get; set; }
Property Password() As String
ProxySettings
property ProxySettings: HttpProxySettings read;
HttpProxySettings ProxySettings { get; }
ReadOnly Property ProxySettings() As HttpProxySettings
SslOptions
property SslOptions: SslConnectionFactory read;
SslConnectionFactory SslOptions { get; }
ReadOnly Property SslOptions() As SslConnectionFactory
TargetUri (declared in ClientChannel)
property TargetUri: Uri read write;
Uri TargetUri { get; set; }
Property TargetUri() As Uri
TargetUrl (declared in ClientChannel)
property TargetUrl: String read write;
String TargetUrl { get; set; }
Property TargetUrl() As String
Timeout
Specified the timeout, in seconds, after which the client channel will abort the request. This ensures that for unresponsive servers, the client will not hang indefinitely waiting for a reply. The Default value is 60 (seconds, i.e. 1 minute).
property Timeout: Int32 read write;
Int32 Timeout { get; set; }
Property Timeout() As Int32
TimeoutEnabled
Gets or set a flag indicating whether client channel will timeout waiting for a request if no data is received over the connection for the amount of time specified by the Timeout property.
property TimeoutEnabled: Boolean read write;
Boolean TimeoutEnabled { get; set; }
Property TimeoutEnabled() As Boolean
UseConnectionPooling
Specified whether connection pooling is enabled for this channel, or not. But default, connection pooling is turned off. When operating with connection pooling enabled, the channel allows multiple simultaneous requests to be made on different threads, utilizing a common threadsafe pool of connections to reuse. Enable this option to use IpHttpClientChannel component in a multi-threaded application, when you cannot easily control which threads will be making calls at what times or when several threads will be making calls at unpredictable times.
Use separate IpHttpClientChannel components when using a single thread, when you can easily create individual channel instances for each thread that makes calls or when each thread will make frequent or continuous requests.
property UseConnectionPooling: Boolean read write;
Boolean UseConnectionPooling { get; set; }
Property UseConnectionPooling() As Boolean
UserAgent
The User Agent value to be transmitted to the server. Typically this value will not affect functionality however it might show up as the "Browser Name" in the server log files.
property UserAgent: String read write;
String UserAgent { get; set; }
Property UserAgent() As String
UserName
property UserName: String read write;
String UserName { get; set; }
Property UserName() As String
BuildTargetUri protected (declared in ClientChannel)
class method BuildTargetUri(protocol: String; host: String; port: Int32; message: String): Uri
static Uri BuildTargetUri(String protocol, String host, Int32 port, String message)
Shared Function BuildTargetUri(protocol As String, host As String, port As Int32, message As String) As Uri
Parameters:
- protocol:
- host:
- port:
- message:
ChannelMatchingTargetUri (String): IClientChannel (declared in ClientChannel)
Creates a client channel instance with type, target host and target port matching the provided target Uri. F.e. for provided uri supertcp://192.168.1.100:7020/bin this method will return an instance of the Super Tcp channel with target host set to 192.168.1.100 and port set to 7020.
class method ChannelMatchingTargetUri(uri: String): IClientChannel
static IClientChannel ChannelMatchingTargetUri(String uri)
Shared Function ChannelMatchingTargetUri(uri As String) As IClientChannel
Parameters:
- uri: Server Uri
ChannelMatchingTargetUri (Uri): IClientChannel (declared in ClientChannel)
Creates a client channel instance with type, target host and target port matching the provided target Uri. F.e. for provided uri supertcp://192.168.1.100:7020/bin this method will return an instance of the Super Tcp channel with target host set to 192.168.1.100 and port set to 7020.
class method ChannelMatchingTargetUri(uri: Uri): IClientChannel
static IClientChannel ChannelMatchingTargetUri(Uri uri)
Shared Function ChannelMatchingTargetUri(uri As Uri) As IClientChannel
Parameters:
- uri: Server Uri
constructor
constructor
IpHttpClientChannel()
Sub New()
AsyncDispatch (declared in ClientChannel)
method AsyncDispatch(message: IMessage; callback: AsyncCallback; userData: Object): IClientAsyncResult
IClientAsyncResult AsyncDispatch(IMessage message, AsyncCallback callback, Object userData)
Function AsyncDispatch(message As IMessage, callback As AsyncCallback, userData As Object) As IClientAsyncResult
Parameters:
- message:
- callback:
- userData:
BeforeDispatch protected (declared in ClientChannel)
method BeforeDispatch(message: IMessage)
void BeforeDispatch(IMessage message)
Sub BeforeDispatch(message As IMessage)
Parameters:
- message:
BeginDispatch (IMessage, AsyncCallback, Boolean, Object): IClientAsyncResult protected (declared in ClientChannel)
method BeginDispatch(message: IMessage; callback: AsyncCallback; disposeChannel: Boolean; userData: Object): IClientAsyncResult
IClientAsyncResult BeginDispatch(IMessage message, AsyncCallback callback, Boolean disposeChannel, Object userData)
Function BeginDispatch(message As IMessage, callback As AsyncCallback, disposeChannel As Boolean, userData As Object) As IClientAsyncResult
Parameters:
- message:
- callback:
- disposeChannel:
- userData:
BeginDispatch (IMessage, AsyncCallback, Object): IClientAsyncResult (declared in ClientChannel)
method BeginDispatch(message: IMessage; callback: AsyncCallback; userData: Object): IClientAsyncResult
IClientAsyncResult BeginDispatch(IMessage message, AsyncCallback callback, Object userData)
Function BeginDispatch(message As IMessage, callback As AsyncCallback, userData As Object) As IClientAsyncResult
Parameters:
- message:
- callback:
- userData:
CheckChannelStatus protected
method CheckChannelStatus
void CheckChannelStatus()
Sub CheckChannelStatus()
Clone
method Clone: Object
Object Clone()
Function Clone() As Object
method CopyProperties(source: Channel)
void CopyProperties(Channel source)
Sub CopyProperties(source As Channel)
Parameters:
- source:
CopyProperties (ClientChannel) protected
method CopyProperties(source: ClientChannel)
void CopyProperties(ClientChannel source)
Sub CopyProperties(source As ClientChannel)
Parameters:
- source:
Dispatch (declared in ClientChannel)
The implementation of IClientChannel.Dispatch. This method ensures the transport is not busy before calling IntDispatch and passing the given IMessage. If the transport is busy, a ChannelBusyException is thrown.
method Dispatch(message: IMessage)
void Dispatch(IMessage message)
Sub Dispatch(message As IMessage)
Parameters:
- message:
Dispose protected
method Dispose(disposing: Boolean)
void Dispose(Boolean disposing)
Sub Dispose(disposing As Boolean)
Parameters:
- disposing:
EndDispatch (declared in ClientChannel)
method EndDispatch(ar: IAsyncResult): IMessage
IMessage EndDispatch(IAsyncResult ar)
Function EndDispatch(ar As IAsyncResult) As IMessage
Parameters:
- ar:
HookUpConnectionEvents protected (declared in IpClientChannel)
If the HasOnTransferEvents property returns true (which means that the OnTransferProgress event handler is defined), this method assigns the OnBytesSend and OnBytesReceived event handlers to the corresponding events of the provided Connection.
This method adds events routing from the underlying Connection to this ClientChannel instance. It is called when a concrete implementation of the ClientChannel performs network operations like dispatching a request to the server.
method HookUpConnectionEvents(connection: Connection)
void HookUpConnectionEvents(Connection connection)
Sub HookUpConnectionEvents(connection As Connection)
Parameters:
- connection:
IntDispatch protected
method IntDispatch(request: Stream; response: IMessage)
void IntDispatch(Stream request, IMessage response)
Sub IntDispatch(request As Stream, response As IMessage)
Parameters:
- request:
- response:
OnBytesReceived protected (declared in IpClientChannel)
This method acts as event handler for the Connection actually performing the network operations. It is added and removed via HookUpConnectionEvents and UnhookConnectionEvents.
This method routes the received event by calling the TriggerOnTransferProgress method, which raises the OnTransferProgress event of the ClientChannel class.
method OnBytesReceived(sender: Object; e: EventArgs)
void OnBytesReceived(Object sender, EventArgs e)
Sub OnBytesReceived(sender As Object, e As EventArgs)
Parameters:
- sender: Sender of the event. Should be an instance of the Connection class.
- e:
OnBytesSent protected (declared in IpClientChannel)
This method acts as event handler for the Connection actually performing the network operations. It is added and removed via HookUpConnectionEvents and UnhookConnectionEvents.
This method routes the received event by calling the TriggerOnTransferProgress method, which raises the OnTransferProgress event of the ClientChannel class.
method OnBytesSent(sender: Object; e: EventArgs)
void OnBytesSent(Object sender, EventArgs e)
Sub OnBytesSent(sender As Object, e As EventArgs)
Parameters:
- sender: Sender of the event. Should be an instance of the Connection class.
- e:
TriggerAfterReceiveStream protected (declared in Channel)
method TriggerAfterReceiveStream(var stream: Stream)
void TriggerAfterReceiveStream(ref Stream stream)
Sub TriggerAfterReceiveStream(ByRef stream As Stream)
Parameters:
- stream:
TriggerBeforeSendStream protected (declared in Channel)
method TriggerBeforeSendStream(var stream: Stream)
void TriggerBeforeSendStream(ref Stream stream)
Sub TriggerBeforeSendStream(ByRef stream As Stream)
Parameters:
- stream:
TriggerOnException protected (declared in ClientChannel)
method TriggerOnException(exception: Exception; out handled: Boolean)
void TriggerOnException(Exception exception, out Boolean handled)
Sub TriggerOnException(exception As Exception, <OutAttribute> ByRef handled As Boolean)
Parameters:
- exception:
- handled:
TriggerOnLoginNeeded protected (declared in ClientChannel)
method TriggerOnLoginNeeded(exception: Exception; out loginSuccessful: Boolean)
void TriggerOnLoginNeeded(Exception exception, out Boolean loginSuccessful)
Sub TriggerOnLoginNeeded(exception As Exception, <OutAttribute> ByRef loginSuccessful As Boolean)
Parameters:
- exception:
- loginSuccessful:
TriggerOnTransferEnd protected (declared in ClientChannel)
method TriggerOnTransferEnd(direction: TransferDirection)
void TriggerOnTransferEnd(TransferDirection direction)
Sub TriggerOnTransferEnd(direction As TransferDirection)
Parameters:
- direction:
TriggerOnTransferProgress protected (declared in ClientChannel)
method TriggerOnTransferProgress(direction: TransferDirection; current: Int64)
void TriggerOnTransferProgress(TransferDirection direction, Int64 current)
Sub TriggerOnTransferProgress(direction As TransferDirection, current As Int64)
Parameters:
- direction:
- current:
TriggerOnTransferStart protected (declared in ClientChannel)
method TriggerOnTransferStart(direction: TransferDirection; total: Int64)
void TriggerOnTransferStart(TransferDirection direction, Int64 total)
Sub TriggerOnTransferStart(direction As TransferDirection, total As Int64)
Parameters:
- direction:
- total:
UnhookConnectionEvents protected (declared in IpClientChannel)
Removes event handlers previously added via the HookUpConnectionEvents method.
method UnhookConnectionEvents(connection: Connection)
void UnhookConnectionEvents(Connection connection)
Sub UnhookConnectionEvents(connection As Connection)
Parameters:
- connection:
AfterReceiveStream (declared in Channel)
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 (declared in Channel)
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>
OnException (declared in ClientChannel)
This event is raised if an exception occurs during the execution of a remote request through the channel. The event will be raised both for exceptions originating from the server and for exceptions during communication (such as unavailability of the server). Attach a handler to this event to do custom handling of events without having to reply on explicit try/catch blocks in the calling code.
This event will not be raised for SessionNotFoundExceptions. These will be handled separately by the OnLoginNeeded event.
event OnException: EventHandler<RequestExceptionEventArgs>;
delegate EventHandler<RequestExceptionEventArgs> OnException()
Event OnException As EventHandler<RequestExceptionEventArgs>
OnLoginNeeded (declared in ClientChannel)
This event is raised if an SessionNotFoundException occurs during the execution of a remote request through the channel. The event gives you the opportunity to perform a login on the server (for example by calling a custom Login method, and then retry the call by setting the EventArgs' LoginSuccessful property to true. This way, your client can recover from a timed-out session to automatically logging in again, without the calling code having to consider the handling of SessionNotFoundExceptions manually.
event OnLoginNeeded: EventHandler<LoginNeededEventArgs>;
delegate EventHandler<LoginNeededEventArgs> OnLoginNeeded()
Event OnLoginNeeded As EventHandler<LoginNeededEventArgs>
OnTransferEnd (declared in ClientChannel)
This event is triggered by the client channel after a transfer is completed (either the sending of a request or the receiving of a response).
event OnTransferEnd: EventHandler<TransferEndEventArgs>;
delegate EventHandler<TransferEndEventArgs> OnTransferEnd()
Event OnTransferEnd As EventHandler<TransferEndEventArgs>
OnTransferProgress (declared in ClientChannel)
This event is triggered by the client channel during a transfer (either the sending of a request or the receiving of a response) whenever a new block of data has been sent or received.
event OnTransferProgress: EventHandler<TransferProgressEventArgs>;
delegate EventHandler<TransferProgressEventArgs> OnTransferProgress()
Event OnTransferProgress As EventHandler<TransferProgressEventArgs>
OnTransferStart (declared in ClientChannel)
This event is triggered by the client channel when a transfer (either the sending of a request or the receiving of a response) is about to be started.
event OnTransferStart: EventHandler<TransferStartEventArgs>;
delegate EventHandler<TransferStartEventArgs> OnTransferStart()
Event OnTransferStart As EventHandler<TransferStartEventArgs>