WinInetSuperHttpClientChannel Class

From RemObjects Wiki
Jump to: navigation, search

This is a Library topic for RemObjects SDK for .NET
This page is generated from external data, please do not update

NamespacesInterfacesClassesEnumsImplements

Contents

Overview

The WinInetSuperHttpClientChannel class is specialization of the SuperHttpClientChannel class which provides client communication via the HTTP protocol based on the WinInet HTTP classes for .NET.


Location


Constants

DEFAULT_TARGET_URL   protected     (declared in SuperHttpClientChannel)



Oxygene:   const DEFAULT_TARGET_URL: String
C#:   const String DEFAULT_TARGET_URL
VB:   Dim DEFAULT_TARGET_URL As String


DEFAULT_USER_AGENT   protected     (declared in SuperHttpClientChannel)



Oxygene:   const DEFAULT_USER_AGENT: String
C#:   const String DEFAULT_USER_AGENT
VB:   Dim DEFAULT_USER_AGENT As String


URL_SCHEMES_NOT_SUPPORTED   protected     (declared in ClientChannel)



Oxygene:   const URL_SCHEMES_NOT_SUPPORTED: String
C#:   const String URL_SCHEMES_NOT_SUPPORTED
VB:   Dim URL_SCHEMES_NOT_SUPPORTED As String


WAITING_REQ_TIMEOUT   protected     (declared in SuperHttpClientChannel)



Oxygene:   const WAITING_REQ_TIMEOUT: Int32
C#:   const Int32 WAITING_REQ_TIMEOUT
VB:   Dim WAITING_REQ_TIMEOUT As Int32


Properties

Active     (declared in SuperHttpClientChannel)

Determines if the channel is currently active, i.e. has an open connection to the server, or is in the process of (re-)establishing a connection (true) or not (false).



Prism:   property Active: Boolean read write
C#:   Boolean Active { get; set; }
VB:   Property Active As Boolean


Busy     (declared in ClientChannel)

Busy is true if the transport channel is currently busy with an operation. Otherwise Busy is false. By default, if the transport channel is busy, it will not attempt to process another request and a ChannelBusyException exception is raised if you try to do so.



Prism:   property Busy: Boolean read
C#:   Boolean Busy { get; }
VB:   Property ReadOnly Busy As Boolean


Connected     (declared in SuperHttpClientChannel)

Indicates if there is an open connection to the server.



Prism:   property Connected: Boolean read
C#:   Boolean Connected { get; }
VB:   Property ReadOnly Connected As Boolean


ConnectionId     (declared in SuperHttpClientChannel)

Identifies a connection to this client on the server. Note that the value of this property does not necessarily correspond with the session ID on the server side.



Prism:   property ConnectionId: Guid read write
C#:   Guid ConnectionId { get; set; }
VB:   Property ConnectionId As Guid


ConnectTimeout     (declared in SuperHttpClientChannel)

Timeout in milliseconds after which this SuperHttpClientChannel will abort trying to connect to the server. This ensures that for unresponsive servers, the client will not hang indefinitely trying to establish a connection to the server.

The default value is 10000 (i.e. 10 seconds).



Prism:   property ConnectTimeout: Int32 read write
C#:   Int32 ConnectTimeout { get; set; }
VB:   Property ConnectTimeout As Int32


EventThreadPool     (declared in SuperHttpClientChannel)



Prism:   property EventThreadPool: ThreadPool read write
C#:   ThreadPool EventThreadPool { get; set; }
VB:   Property EventThreadPool As ThreadPool


HasAfterReceiveStream   protected     (declared in Channel)



Prism:   property HasAfterReceiveStream: Boolean read
C#:   Boolean HasAfterReceiveStream { get; }
VB:   Property ReadOnly HasAfterReceiveStream As Boolean


HasBeforeSendStream   protected     (declared in Channel)



Prism:   property HasBeforeSendStream: Boolean read
C#:   Boolean HasBeforeSendStream { get; }
VB:   Property ReadOnly HasBeforeSendStream As Boolean


HasOnTransferProgress   protected     (declared in ClientChannel)



Prism:   property HasOnTransferProgress: Boolean read
C#:   Boolean HasOnTransferProgress { get; }
VB:   Property ReadOnly HasOnTransferProgress As Boolean


HttpTimeout     (declared in SuperHttpClientChannel)

The timeout, in milliseconds, 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 10000 (i.e. 10 seconds).



Prism:   property HttpTimeout: Int32 read write
C#:   Int32 HttpTimeout { get; set; }
VB:   Property HttpTimeout As Int32


MaxPackageSize     (declared in SuperHttpClientChannel)

The maximum size for data packages that the channel can send (default is 1048576, 1MB).



Prism:   property MaxPackageSize: Int32 read write
C#:   Int32 MaxPackageSize { get; set; }
VB:   Property MaxPackageSize As Int32


RequestTimeout     (declared in SuperHttpClientChannel)

The timeout, in milliseconds, after which the SuperHTTP 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 60000 (i.e. 1 minute).



Prism:   property RequestTimeout: Int32 read write
C#:   Int32 RequestTimeout { get; set; }
VB:   Property RequestTimeout As Int32


SessionId     (declared in SuperHttpClientChannel)

GUID that uniquely identifies each client and allows the server to determine which calls are received from the same client. This property is used for session management.



Prism:   property SessionId: Guid read write
C#:   Guid SessionId { get; set; }
VB:   Property SessionId As Guid


StrippedTargetUrl   protected     (declared in SuperHttpClientChannel)



Prism:   property StrippedTargetUrl: String read
C#:   String StrippedTargetUrl { get; }
VB:   Property ReadOnly StrippedTargetUrl As String


TargetUri     (declared in ClientChannel)



Prism:   property TargetUri: Uri read write
C#:   Uri TargetUri { get; set; }
VB:   Property TargetUri As Uri


TargetUrl     (declared in ClientChannel)



Prism:   property TargetUrl: String read write
C#:   String TargetUrl { get; set; }
VB:   Property TargetUrl As String


UserAgent

Provides the User-Agent string. This string is sent for informational purposes only; you can set it to a custom value to detect and distinguish your client (as opposed to other client applications or web browsers accessing the server) in the server log files or HTTP packet monitors. Returns "RemObjects SDK for .NET Client" by default.



Prism:   property UserAgent: String read write
C#:   String UserAgent { get; set; }
VB:   Property UserAgent As String


Class Methods

BuildTargetUri   protected     (declared in ClientChannel)



Oxygene:   class method BuildTargetUri(protocol: String; host: String; port: Int32; message: String): Uri
C#:   static Uri BuildTargetUri(String protocol, String host, Int32 port, String message)
VB:   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)



Oxygene:   class method ChannelMatchingTargetUri(url: String): IClientChannel
C#:   static IClientChannel ChannelMatchingTargetUri(String url)
VB:   Shared Function ChannelMatchingTargetUri(url As String) As IClientChannel


Parameters:

  • url:


ChannelMatchingTargetUri (Uri): IClientChannel     (declared in ClientChannel)



Oxygene:   class method ChannelMatchingTargetUri(uri: Uri): IClientChannel
C#:   static IClientChannel ChannelMatchingTargetUri(Uri uri)
VB:   Shared Function ChannelMatchingTargetUri(uri As Uri) As IClientChannel


Parameters:

  • uri:


Instance Methods

constructor ()

Initializes the default values of the TargetUrl (to http://localhost:8099/bin) and the UserAgent (to "RemObjects SDK for .NET Client").


Oxygene:   constructor
C#:   constructor()
VB:   Sub New


constructor (IContainer)



Oxygene:   constructor(container: IContainer)
C#:   constructor(IContainer container)
VB:   Sub New (container As IContainer)


Parameters:

  • container:


Activate   protected     (declared in SuperHttpClientChannel)

Prepears EventThreadPool and the waiting thread for making asyncronous calls to the server.


Oxygene:   method Activate
C#:   void Activate()
VB:   Sub Activate


AsyncDispatch     (declared in ClientChannel)



Oxygene:   method AsyncDispatch(message: IMessage; callback: AsyncCallback; userData: Object): IClientAsyncResult
C#:   IClientAsyncResult AsyncDispatch(IMessage message, AsyncCallback callback, Object userData)
VB:   Function AsyncDispatch(message As IMessage, callback As AsyncCallback, userData As Object) As IClientAsyncResult


Parameters:

  • message:
  • callback:
  • userData:


BeforeDispatch   protected     (declared in SuperHttpClientChannel)

Before the first message dispatching (when the connection is not established yet), this method initiates the connection to the server in a separate thread (waiting thread) and adds WaitingConnection into SuperHttpServerConnection.WaitingConnections for future response. It also initializes the ClientID of the message with the SessionID.


Oxygene:   method BeforeDispatch(message: IMessage)
C#:   void BeforeDispatch(IMessage message)
VB:   Sub BeforeDispatch(message As IMessage)


Parameters:

  • message:


BeginDispatch (IMessage, AsyncCallback, Boolean, Object): IClientAsyncResult   protected     (declared in ClientChannel)



Oxygene:   method BeginDispatch(message: IMessage; callback: AsyncCallback; disposeChannel: Boolean; userData: Object): IClientAsyncResult
C#:   IClientAsyncResult BeginDispatch(IMessage message, AsyncCallback callback, Boolean disposeChannel, Object userData)
VB:   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)



Oxygene:   method BeginDispatch(message: IMessage; callback: AsyncCallback; userData: Object): IClientAsyncResult
C#:   IClientAsyncResult BeginDispatch(IMessage message, AsyncCallback callback, Object userData)
VB:   Function BeginDispatch(message As IMessage, callback As AsyncCallback, userData As Object) As IClientAsyncResult


Parameters:

  • message:
  • callback:
  • userData:


CancelRequest   protected

Aborts waiting or dispatching an HttpWebRequest.


Oxygene:   method CancelRequest(waitingThread: Boolean)
C#:   void CancelRequest(Boolean waitingThread)
VB:   Sub CancelRequest(waitingThread As Boolean)


Parameters:

  • waitingThread:


CheckChannelBusy   protected     (declared in SuperHttpClientChannel)



Oxygene:   method CheckChannelBusy
C#:   void CheckChannelBusy()
VB:   Sub CheckChannelBusy


Clone

Returns a deep copy of this.


Oxygene:   method Clone: Object
C#:   Object Clone()
VB:   Function Clone As Object


CopyProperties (Channel)   protected     (declared in Channel)



Oxygene:   method CopyProperties(source: Channel)
C#:   void CopyProperties(Channel source)
VB:   Sub CopyProperties(source As Channel)


Parameters:

  • source:


CopyProperties (ClientChannel)   protected

In addition to the base.CopyProperties, this method copies the values of the TargetUrl and the UserAgent.


Oxygene:   method CopyProperties(source: ClientChannel)
C#:   void CopyProperties(ClientChannel source)
VB:   Sub CopyProperties(source As ClientChannel)


Parameters:

  • source:


Deactivate   protected

In addition to the base.Deactivate, this method frees waiting or dispatching HttpWebRequests.


Oxygene:   method Deactivate
C#:   void Deactivate()
VB:   Sub Deactivate


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.


Oxygene:   method Dispatch(message: IMessage)
C#:   void Dispatch(IMessage message)
VB:   Sub Dispatch(message As IMessage)


Parameters:

  • message:


DispatchHttpRequest   protected



Oxygene:   method DispatchHttpRequest(waitingThread: Boolean; request: array of Byte; out response: array of Byte)
C#:   void DispatchHttpRequest(Boolean waitingThread, array of Byte request, out array of Byte response)
VB:   Sub DispatchHttpRequest(waitingThread As Boolean, request As array of Byte, <OutAttribute> ByRef response As array of Byte)


Parameters:

  • waitingThread:
  • request:
  • response:


Dispose   protected     (declared in SuperHttpClientChannel)



Oxygene:   method Dispose(disposing: Boolean)
C#:   void Dispose(Boolean disposing)
VB:   Sub Dispose(disposing As Boolean)


Parameters:

  • disposing:


EndDispatch     (declared in ClientChannel)



Oxygene:   method EndDispatch(ar: IAsyncResult): IMessage
C#:   IMessage EndDispatch(IAsyncResult ar)
VB:   Function EndDispatch(ar As IAsyncResult) As IMessage


Parameters:

  • ar:


IntDispatch   protected     (declared in SuperHttpClientChannel)

This method composes a request stream from the ConnectionID, package number and message body and sends it to the server using the DispatchHttpRequest method. It contains actions for possible errors or exceptions that occur on the server side during the processing of the request.


Oxygene:   method IntDispatch(request: Stream; response: IMessage)
C#:   void IntDispatch(Stream request, IMessage response)
VB:   Sub IntDispatch(request As Stream, response As IMessage)


Parameters:

  • request:
  • response:


RegisterEventReceiver     (declared in SuperHttpClientChannel)

This method is used by the EventReceiver class to add this component to the internal event receiver list.


Oxygene:   method RegisterEventReceiver(receiver: IEventReceiver)
C#:   void RegisterEventReceiver(IEventReceiver receiver)
VB:   Sub RegisterEventReceiver(receiver As IEventReceiver)


Parameters:

  • receiver:


ResetConnection   protected     (declared in SuperHttpClientChannel)



Oxygene:   method ResetConnection(waiting: Boolean)
C#:   void ResetConnection(Boolean waiting)
VB:   Sub ResetConnection(waiting As Boolean)


Parameters:

  • waiting:


TriggerAfterReceiveStream   protected     (declared in Channel)



Oxygene:   method TriggerAfterReceiveStream(var stream: Stream)
C#:   void TriggerAfterReceiveStream(ref Stream stream)
VB:   Sub TriggerAfterReceiveStream(ByRef stream As Stream)


Parameters:

  • stream:


TriggerBeforeSendStream   protected     (declared in Channel)



Oxygene:   method TriggerBeforeSendStream(var stream: Stream)
C#:   void TriggerBeforeSendStream(ref Stream stream)
VB:   Sub TriggerBeforeSendStream(ByRef stream As Stream)


Parameters:

  • stream:


TriggerOnException   protected     (declared in ClientChannel)



Oxygene:   method TriggerOnException(exception: Exception; out handled: Boolean)
C#:   void TriggerOnException(Exception exception, out Boolean handled)
VB:   Sub TriggerOnException(exception As Exception, <OutAttribute> ByRef handled As Boolean)


Parameters:

  • exception:
  • handled:


TriggerOnLoginNeeded   protected     (declared in ClientChannel)



Oxygene:   method TriggerOnLoginNeeded(exception: Exception; out loginSuccessful: Boolean)
C#:   void TriggerOnLoginNeeded(Exception exception, out Boolean loginSuccessful)
VB:   Sub TriggerOnLoginNeeded(exception As Exception, <OutAttribute> ByRef loginSuccessful As Boolean)


Parameters:

  • exception:
  • loginSuccessful:


TriggerOnTransferEnd   protected     (declared in ClientChannel)



Oxygene:   method TriggerOnTransferEnd(direction: TransferDirection)
C#:   void TriggerOnTransferEnd(TransferDirection direction)
VB:   Sub TriggerOnTransferEnd(direction As TransferDirection)


Parameters:

  • direction:


TriggerOnTransferProgress   protected     (declared in ClientChannel)



Oxygene:   method TriggerOnTransferProgress(direction: TransferDirection; current: Int64)
C#:   void TriggerOnTransferProgress(TransferDirection direction, Int64 current)
VB:   Sub TriggerOnTransferProgress(direction As TransferDirection, current As Int64)


Parameters:

  • direction:
  • current:


TriggerOnTransferStart   protected     (declared in ClientChannel)



Oxygene:   method TriggerOnTransferStart(direction: TransferDirection; total: Int64)
C#:   void TriggerOnTransferStart(TransferDirection direction, Int64 total)
VB:   Sub TriggerOnTransferStart(direction As TransferDirection, total As Int64)


Parameters:

  • direction:
  • total:


UnregisterEventReceiver     (declared in SuperHttpClientChannel)

This method is used by the EventReceiver class to remove this component from the internal event receiver list.


Oxygene:   method UnregisterEventReceiver(receiver: IEventReceiver)
C#:   void UnregisterEventReceiver(IEventReceiver receiver)
VB:   Sub UnregisterEventReceiver(receiver As IEventReceiver)


Parameters:

  • receiver:


WaitConnected     (declared in SuperHttpClientChannel)



Oxygene:   method WaitConnected
C#:   void WaitConnected()
VB:   Sub WaitConnected


Events

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 RemObjects 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.



Oxygene:   event AfterReceiveStream: StreamEventHandler
delegate: method Invoke(sender: Object; e: StreamEventArgs)

C#:   event StreamEventHandler AfterReceiveStream
delegate: void Invoke(Object sender, StreamEventArgs e)

VB:   Event AfterReceiveStream As StreamEventHandler
delegate: Sub Invoke(sender As Object, e As 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.



Oxygene:   event BeforeSendStream: StreamEventHandler
delegate: method Invoke(sender: Object; e: StreamEventArgs)

C#:   event StreamEventHandler BeforeSendStream
delegate: void Invoke(Object sender, StreamEventArgs e)

VB:   Event BeforeSendStream As StreamEventHandler
delegate: Sub Invoke(sender As Object, e As 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.



Oxygene:   event OnException: RequestExceptionEventHandler
delegate: method Invoke(sender: Object; e: RequestExceptionEventArgs)

C#:   event RequestExceptionEventHandler OnException
delegate: void Invoke(Object sender, RequestExceptionEventArgs e)

VB:   Event OnException As RequestExceptionEventHandler
delegate: Sub Invoke(sender As Object, e As RequestExceptionEventArgs)


OnInvalidClientId     (declared in SuperHttpClientChannel)

Fires when the server returns a response with error code for an unregistered connection with the client.



Oxygene:   event OnInvalidClientId: InvalidClientIdHandler
delegate: method Invoke(sender: Object; e: InvalidClientIdHandlerArgs)

C#:   event InvalidClientIdHandler OnInvalidClientId
delegate: void Invoke(Object sender, InvalidClientIdHandlerArgs e)

VB:   Event OnInvalidClientId As InvalidClientIdHandler
delegate: Sub Invoke(sender As Object, e As InvalidClientIdHandlerArgs)


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.



Oxygene:   event OnLoginNeeded: LoginNeededEventHandler
delegate: method Invoke(sender: Object; e: LoginNeededEventArgs)

C#:   event LoginNeededEventHandler OnLoginNeeded
delegate: void Invoke(Object sender, LoginNeededEventArgs e)

VB:   Event OnLoginNeeded As LoginNeededEventHandler
delegate: Sub Invoke(sender As Object, e As 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).



Oxygene:   event OnTransferEnd: TransferEndEventHandler
delegate: method Invoke(sender: Object; e: TransferEndEventArgs)

C#:   event TransferEndEventHandler OnTransferEnd
delegate: void Invoke(Object sender, TransferEndEventArgs e)

VB:   Event OnTransferEnd As TransferEndEventHandler
delegate: Sub Invoke(sender As Object, e As 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.



Oxygene:   event OnTransferProgress: TransferProgressEventHandler
delegate: method Invoke(sender: Object; e: TransferProgressEventArgs)

C#:   event TransferProgressEventHandler OnTransferProgress
delegate: void Invoke(Object sender, TransferProgressEventArgs e)

VB:   Event OnTransferProgress As TransferProgressEventHandler
delegate: Sub Invoke(sender As Object, e As 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.



Oxygene:   event OnTransferStart: TransferStartEventHandler
delegate: method Invoke(sender: Object; e: TransferStartEventArgs)

C#:   event TransferStartEventHandler OnTransferStart
delegate: void Invoke(Object sender, TransferStartEventArgs e)

VB:   Event OnTransferStart As TransferStartEventHandler
delegate: Sub Invoke(sender As Object, e As TransferStartEventArgs)


See Also


Product: RemObjects SDK
Available Editions: RemObjects SDK for .NET, Xcode, Delphi, Java and JavaScript

GlossaryArticlesLibrarySamples

Personal tools
Namespaces

Variants
Actions
Navigation
products
platforms
special
Toolbox