TROWinInetHTTPChannel

Overview

TROWinInetHTTPChannel implements an HTTP based channel that uses the WinInet HTTP implementation provided by the Windows operating system.

The channel will automatically make use of options such as proxy and firewall settings, and the online/offline state configured for Internet Explorer or using the Internet Control Panel. It is the most commonly used and recommended HTTP channel.

NOTE: This class is for Windows platform only.

Location


 

constructor Create  override

Standard component constructor

constructor Create(AOwner: TComponent)

Parameters:

  • AOwner: Owner

AccessType

Type of access required. This parameter can be one of the following values:

  • atDirect = Resolves all host names locally.
  • atProxy = Retrieves the proxy or direct configuration from the registry.
  • atPreconfig_with_no_autoproxy = Retrieves the proxy or direct configuration from the registry and prevents the use of a startup Microsoft JScript or Internet Setup (INS) file.
  • atPreconfig = Passes requests to the proxy unless a proxy bypass list is supplied and the name to be resolved bypasses the proxy.
property AccessType: TROWinInetAccessType read write

AllowGzipEncoding    (declared in TROBaseHTTPChannel)

Allows to use GZIP compression

property AllowGzipEncoding: Boolean read write

Assign  override

Copies the contents of another, similar object.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Instance whose properties will be copied

AssignEvents  protected override

Copies the events of another, similar object.

procedure AssignEvents(aSource: TROTransportChannel)

Parameters:

  • aSource: Instance whose properties will be copied

AssignSpecificProperties  protected override

Copies the specific properties of another, similar object.

procedure AssignSpecificProperties(aSource: TROTransportChannel)

Parameters:

  • aSource: Instance whose properties will be copied

AsyncException  protected virtual    (declared in TROTransportChannel)

Notifies about an exception in an asynchronous mode.

procedure AsyncException(aAsyncInterface: IROAsyncInterface; AsyncException: Exception)

Parameters:

  • aAsyncInterface: Exception source
  • AsyncException: Exception data

BeforeDispatch  protected virtual    (declared in TROTransportChannel)

Allows an implimentation to do necessary preparatory actions (checking the readiness of the channel, restore session data, etc.).

procedure BeforeDispatch(aMessage: IROMessage)

Parameters:


Busy    (declared in TROTransportChannel)

Informs whether the channel is currently busy executing a remote request (true) or not (false). Most channels (except most notably the TROSuperTCPChannel) are only capable of performing one request at a time; if a second request is attempted while the channel is Busy, an EROChannelBusy exception will be raised.

property Busy: Boolean read

ChangeServerLocator  protected virtual    (declared in TROTransportChannel)

procedure ChangeServerLocator(var aFaultStartLocatorIdx: Integer; var aRetry: Boolean; const aException: Exception)

Parameters:

  • aFaultStartLocatorIdx:
  • aRetry:
  • aException:

ChannelMatchingTargetUri    (declared in TROTransportChannel)

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 function ChannelMatchingTargetUri(const aUri: TROUri): TROTransportChannel

Parameters:

  • aUri: Server Uri

ChannelMatchingTargetUrl    (declared in TROTransportChannel)

class function ChannelMatchingTargetUrl(const aUrl: string): TROTransportChannel

Parameters:

  • aUrl:

CheckProperties  virtual    (declared in TROTransportChannel)

Validates channel properties

procedure CheckProperties

ClearConnectionPool    (declared in TROSimpleTransportChannel)

Clears connection pool

procedure ClearConnectionPool

ClientCert

Client certificate

property ClientCert: TROWinInetClientCert read write

Connected

Returns whether the client currently has an active connection to the server (true) or not (false).

property Connected: Boolean read write

CurrentLocator    (declared in TROTransportChannel)

Returns which of the fail-over/load balancing servers configured in the ServerLocators is currently active. Depending on the DispatchOptions defined, this value might change with each request, or only if the current server fails.

property CurrentLocator: TROServerLocator read write

DecryptStream (TStream, TStream)  protected overload    (declared in TROBaseConnection)

Decrypt stream

procedure DecryptStream(const Source: TStream; const Dest: TStream)

Parameters:

  • Source: Source
  • Dest: Destination

DecryptStream (TStream)  protected overload    (declared in TROBaseConnection)

Decrypt stream

procedure DecryptStream(const Stream: TStream)

Parameters:

  • Stream: Stream

DisableNagle  protected    (declared in TROBaseHTTPChannel)

Controls whether data packets are sent individually or if small packets are held back to send as part of fewer larger data packets. Normally, you will want this disabled as it can have a significant effect on performance. The only time when its worth keeping the property enabled is when there are many small packets to be sent and you need to keep network bandwidth to a minimum.

See more at Nagle's algorithm

property DisableNagle: Boolean read write

Dispatch (IROMessage)  protected reintroduce overload    (declared in TROTransportChannel)

Sends a request message through the Self channel for processing and gets back an aMessage. CodeGen uses this method when generating a proxy from RODL Files.

procedure Dispatch(aMessage: IROMessage)

Parameters:

  • aMessage: (In/out) message data

DispatchOptions    (declared in TROBaseHTTPChannel)

Configures the available fail-over and load balancing options provided by the Remoting SDK. By default, channels are set up to talk to one specific server only. Two independent options are available to provide fail-over and load balancing:

  • Enables fail-over support. If the connection to any given server fails, the channel will automatically keep trying the next server specified in ServerLocators, until a working server is found or all servers have been tried.
  • Enables load-balancing support. Each request dispatched through the channel will go to a different server configured in ServerLocators, resulting in calls being more or less equally distributed over the available servers.

Enabling any of these options obviously requires the server to be implemented in a stateless way, so that it does not depend on all requests from a client going to the same server. This implies using a class factory different from Per-Client and, if sessions are used, a session manager that allows sharing of session state between servers.

property DispatchOptions: TRODispatchOptions read write

DoAfterProbingServerEvent  protected virtual    (declared in TROTransportChannel)

Fires OnAfterProbingServer event

procedure DoAfterProbingServerEvent(const aServerLocator: TROServerLocator; const aFailed: Boolean)

Parameters:

  • aServerLocator: Server locator
  • aFailed:

DoAfterProbingServersEvent  protected virtual    (declared in TROTransportChannel)

Fires OnAfterProbingServer event

procedure DoAfterProbingServersEvent(const aProbedCount: Integer; const aEnabledCount: Integer; const aDisabledCount: Integer)

Parameters:

  • aProbedCount:
  • aEnabledCount:
  • aDisabledCount:

DoBeforeDecryptEvent  protected virtual    (declared in TROBaseConnection) obsolete

procedure DoBeforeDecryptEvent(aEncryptedStream: TStream)

Parameters:

  • aEncryptedStream: Stream

DoBeforeProbingServerEvent  protected virtual    (declared in TROTransportChannel)

Fires OnBeforeProbingServer event

procedure DoBeforeProbingServerEvent(const aServerLocator: TROServerLocator)

Parameters:

  • aServerLocator: Server locator

DoBeforeProbingServersEvent  protected virtual    (declared in TROTransportChannel)

Fires OnBeforeProbingServers event

procedure DoBeforeProbingServersEvent

DoDecodeStream  protected    (declared in TROBaseHTTPChannel)

Performs GZIP decoding

procedure DoDecodeStream(const aSource: TStream; const aDest: TStream)

Parameters:

  • aSource: Source
  • aDest: Destination

DoEncodeStream  protected    (declared in TROBaseHTTPChannel)

Performs GZIP encoding

procedure DoEncodeStream(const aSource: TStream)

Parameters:

  • aSource: Source

DoNeedSSL  protected override    (declared in TROBaseHTTPChannel)

Detects SSL state

function DoNeedSSL: Boolean

DoReceiveStreamEvent  protected virtual    (declared in TROTransportChannel)

Fires OnSendStream event

procedure DoReceiveStreamEvent(const Dest: TStream)

Parameters:

  • Dest: Stream

DoSendStreamEvent  protected virtual    (declared in TROTransportChannel)

Fires OnSendStream event

procedure DoSendStreamEvent(const Source: TStream)

Parameters:

  • Source: Stream

DoServerLocatorAssignmentEvent  protected virtual    (declared in TROTransportChannel)

Fires OnServerLocatorAssignment event

procedure DoServerLocatorAssignmentEvent(const aLocator: TROServerLocator; const aException: Exception)

Parameters:

  • aLocator:
  • aException:

Encryption    (declared in TROBaseConnection) obsolete

This is DES based enscryption, it is obsolete because works only for Delphi. Use message envelope AES Encryption Envelope instead.

property Encryption: TROEncryption read write

EncryptStream (TStream, TStream)  protected overload    (declared in TROBaseConnection)

Encrypt stream

procedure EncryptStream(const Source: TStream; const Dest: TStream)

Parameters:

  • Source: Source
  • Dest: Destination

EncryptStream (TStream)  protected overload    (declared in TROBaseConnection)

Encrypt stream

procedure EncryptStream(const Stream: TStream)

Parameters:

  • Stream: Stream

FaultToleranceLocatorIdx    (declared in TROTransportChannel)

property FaultToleranceLocatorIdx: Integer read write

GetBusy  protected override    (declared in TROSimpleTransportChannel)

Returns current channel state

function GetBusy: Boolean

GetChannelFromPool  protected override    (declared in TROSimpleTransportChannel)

function GetChannelFromPool: TROTransportChannel

GetTransportObject  protected virtual    (declared in TROTransportChannel)

Returns itself.

function GetTransportObject: TObject

InetConnect

property InetConnect: HINTERNET read

InetRoot

property InetRoot: HINTERNET read

InitializeAutoProxy

Merely refreshes the internal state of proxy configuration information from the registry. There may be a small delay if you are using this.

property InitializeAutoProxy: Boolean read write

InitServerLocator  protected virtual    (declared in TROTransportChannel)

Sets CurrentLocator

function InitServerLocator: Integer

IsEncryptionUsed  protected    (declared in TROBaseConnection)

Checks if encryption was used

function IsEncryptionUsed: Boolean

IsProbeMode  protected    (declared in TROTransportChannel)

property IsProbeMode: Boolean read

IsStreamEncrypted  protected    (declared in TROBaseConnection)

Checks state of stream

function IsStreamEncrypted(Source: TStream): Boolean

Parameters:

  • Source: Stream

KeepAlive    (declared in TROBaseHTTPChannel)

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

KeepConnection

This property specifies can we reuse the same TCP connection to send and receive multiple HTTP requests/responses or not. If it set to False then each pair request/response creates new one connection. Uses KeepConnection = True allows to improve HTTP performance for multiple requests.

property KeepConnection: Boolean read write

LaunchAsyncTask  protected    (declared in TROTransportChannel)

procedure LaunchAsyncTask(aRequest: IROAsyncRequest)

Parameters:

  • aRequest:

LoadBalancerLocatorIdx    (declared in TROTransportChannel)

property LoadBalancerLocatorIdx: Integer read write

LoadSSL  protected virtual    (declared in TROTransportChannel)

Loads SSL library if SSL protocol is used

procedure LoadSSL

Login

Defines the username and password that should be used to authenticate with the server. This login is used for HTTP level authentication only. It should be set if your web server (or proxy server) is configured to require login at HTTP level to accept communication. This is not to be confused with the Remoting SDK's own login on session level, as discussed in Authentication and Login.

property Login: TROLogin read write

MinSizeForGzipEncoding    (declared in TROBaseHTTPChannel)

The minimal size when GZIP encoding will be used (default is 4096 bytes)

property MinSizeForGzipEncoding: Integer read write

NeedDecodeResponse  protected    (declared in TROBaseHTTPChannel)

Indicates that response should in encoded with GZIP compression

property NeedDecodeResponse: Boolean read write

Notification  protected override    (declared in TROTransportChannel)

Forwards notification messages to all owned components.

procedure Notification(AComponent: TComponent; Operation: TOperation)

Parameters:

  • AComponent: component
  • Operation: operation

OnAfterAttemptConnect

property OnAfterAttemptConnect: TAfterAttemptConnectEvent read write
delegate: procedure OnAfterAttemptConnect(Sender: TObject; var aAttemptConnectResult: DWORD)

OnAfterConnect

property OnAfterConnect: TNotifyEvent read write

OnAfterEncrypt    (declared in TROBaseConnection)

Fired after stream was encrypted

property OnAfterEncrypt: TROBaseConnectionOperation read write
delegate: procedure OnAfterEncrypt(Sender: TROBaseConnection; aEncryptedStream: TStream)

OnAfterOpenRequest

property OnAfterOpenRequest: TWinInetAfterOpenRequestEvent read write
delegate: procedure OnAfterOpenRequest(Sender: TObject; aHandle: HINTERNET)

OnAfterProbingServer    (declared in TROBaseHTTPChannel)

Fires after the channel is done probing a specific server for availability. You can use this event to check the result of the probing, possibly to update internal data structures or to display server status in the user interface.

property OnAfterProbingServer: TROEndProbeServerEvent read write

OnAfterProbingServers    (declared in TROBaseHTTPChannel)

Fires after the channel is done probing all servers for availability. You can use this event to check the result of the probing, possibly to update internal data structures or to display server status in the user interface.

property OnAfterProbingServers: TROEndProbeServersEvent read write

OnAsyncException    (declared in TROTransportChannel)

Fires when exception is raised in asynchronous mode

property OnAsyncException: TROAsyncExceptionEvent read write
delegate: procedure OnAsyncException(Sender: TROTransportChannel; Async: IROAsyncInterface; anException: Exception)

OnBeforeDecrypt    (declared in TROBaseConnection)

Fired before stream will be decrypted

property OnBeforeDecrypt: TROBaseConnectionOperation read write
delegate: procedure OnBeforeDecrypt(Sender: TROBaseConnection; aEncryptedStream: TStream)

OnBeforeOpenConnection

property OnBeforeOpenConnection: TNotifyEvent read write

OnBeforeOpenRequest

property OnBeforeOpenRequest: TNotifyEvent read write

OnBeforeProbingServer    (declared in TROBaseHTTPChannel)

Fires before the channel starts probing a specific server for availability. You can use this event to:

property OnBeforeProbingServer: TROBeginProbeServerEvent read write

OnBeforeProbingServers    (declared in TROBaseHTTPChannel)

Fires before the channel starts probing all servers for availability. You can use this event:

  • to check or adjust the server configurations
  • to include/exclude individual server from being probed by changing their TROServerLocator properties.
property OnBeforeProbingServers: TROBeginProbeServersEvent read write

OnException    (declared in TROTransportChannel)

Fires if an exception is raised during the execution of a remote request. This could be an exception returned from the server, a communication problem or an error within the client. Depending on the type of error, your event handler can try to rectify the problem, and set aRetry to true to have the channel try and perform the request again. For example, an application could show a dialog asking the user to confirm if his internet connection is available, with Cancel and Retry buttons.
If aRetry is set to true and the call succeeds at the second attempt, the call will return to the original code that initiated the request, as if the exception never happened.

property OnException: TROExceptionEvent read write
delegate: procedure OnException(Sender: TROTransportChannel; anException: Exception; var aRetry: Boolean)

OnInvalidCertificate

property OnInvalidCertificate: TROInvalidCertificate read write
delegate: procedure OnInvalidCertificate(Sender: TObject; const aIssuer: AnsiString; const aSubject: AnsiString; var aAllow: Boolean)

OnLoginNeeded    (declared in TROBaseHTTPChannel)

Fires if an EROSessionNotFound (or the descendant SessionNotFoundException) exception is raised during the execution of a remote request. This usually indicates that the server cannot authenticate the client or that the session has expired. The most common use for this event is to perform a call to a special Login service provided by the server (possibly after prompting the user to enter username and password), and to set the aRetry parameter to true if login was successful.

property OnLoginNeeded: TROExceptionEvent read write

OnProgress    (declared in TROBaseHTTPChannel)

This event fires as the channel is transferring data for a request or response to or from the server, informing of the current progress. It can be used to keep the user interface updated during lengthy transfers,e.g. by showing a progress bar or the remaining transfer volume. Note: the accuracy and frequency of calls to OnProgress depends on the channel type; since channels transport data packets in different sized chunks (or even all-at-once), OnProgress might show a very fine progress for some channels, while jumping from 0 to 100% in one step with others.

property OnProgress: TProgressEvent read write

OnReceiveStream    (declared in TROBaseHTTPChannel)

Fires after a stream with a response message has been received from the server. Use this event handler to inspect and possibly modify the stream, before it continues to be processed by the higher levels of the Remoting SDK framework.

property OnReceiveStream: TStreamDispatch read write

OnSendStream    (declared in TROBaseHTTPChannel)

Fires just as a stream with a request message will be sent to the server. The event handler can inspect and possibly modify the stream, before it continues to be sent off to the server.

property OnSendStream: TStreamDispatch read write

OnServerLocatorAssignment    (declared in TROBaseHTTPChannel)

Fires before changing of a server locator.

property OnServerLocatorAssignment: TServerLocatorAssignment read write

Probe  protected    (declared in TROTransportChannel)

Checks the accessibility of servers from the ServerLocators. This method is intended to provide fail-over and load balancing support in the Remoting SDK Architecture.

function Probe(aServerLocator: TROServerLocator): Boolean

Parameters:

  • aServerLocator: Server locator

ProbeAll  protected    (declared in TROTransportChannel)

Checks the availability of all known servers.

procedure ProbeAll

ProbeFrequency    (declared in TROBaseHTTPChannel)

Sets at what intervals, in milliseconds, the channel will probe the servers configured in ServerLocators for availability. The default value is 60,000 (60 seconds). See the ProbeServers property for a more detailed description. Although somewhat misnamed, this property defines the Interval between probes, not the actual probing Frequency. The property name is persisted for backward compatibility.

property ProbeFrequency: Cardinal read write

ProbeServers    (declared in TROBaseHTTPChannel)

Toggles whether the channel will continuously probe the servers configured in ServerLocators for availability. If enabled (true), the channel will ping all servers at a regular interval to determine if they are reachable. If a server fails to respond, it will be disabled for future calls until a later probe can reach it again. The interval between probes can be configured using the ProbeFrequency property. By default, server probing is turned off.

property ProbeServers: Boolean read write

ProxyLogin

Defines the username and password that should be used to authenticate with the proxy.

property ProxyLogin: TROLogin read write

ResetProbingClone  protected virtual    (declared in TROTransportChannel)

Resets channel that is used for probing

procedure ResetProbingClone(aProbe: TROTransportChannel)

Parameters:

  • aProbe: Probing clone

RetrieveMetadata  protected virtual    (declared in TROTransportChannel)

Returns server-side RODL.

procedure RetrieveMetadata(out Dest: TStream)

Parameters:

  • Dest: Stream

RetrieveRODL  protected    (declared in TROTransportChannel)

This method is used for to obtaining the RODL library from the server without havin to rely on a channel-specific mechanism (such as a HTTP request to http://servername:port/rodl).

procedure RetrieveRODL(out RODLLibrary: TRODLLibrary)

Parameters:

  • RODLLibrary: Result

ReturnChannelToPool  protected override    (declared in TROSimpleTransportChannel)

procedure ReturnChannelToPool(aChannel: TROTransportChannel)

Parameters:

  • aChannel:

ROFreeNotification    (declared in TROComponent)

Forwards notification messages to all owned components.

procedure ROFreeNotification(aComponent: TComponent)

Parameters:

  • aComponent: component

RORemoveFreeNotification    (declared in TROComponent)

Forwards notification messages to all owned components.

procedure RORemoveFreeNotification(aComponent: TComponent)

Parameters:

  • aComponent: component

SendRemoveNotification  protected    (declared in TROComponent)

Forwards notification messages to all owned components.

procedure SendRemoveNotification(aComponent: TComponent)

Parameters:

  • aComponent: component

ServerAcceptEncodingModes  protected    (declared in TROBaseHTTPChannel)

Value of Accept-Encoding header that was returned by server

property ServerAcceptEncodingModes: TROHTTPAcceptEncodingModes read write

ServerLocators    (declared in TROBaseHTTPChannel)

Optionally, this collection property can be filled to contain a list of possible servers to be used for fail-over or load balancing purposes. Depending on the settings configured in DispatchOptions, the channel will automatically spread calls over the available servers, or fall back to another server if one fails.

property ServerLocators: TROServerLocatorCollection read write

SetAsyncBusy  protected virtual    (declared in TROTransportChannel)

procedure SetAsyncBusy(const Value: Boolean)

Parameters:

  • Value:

SetServerLocator  protected    (declared in TROTransportChannel)

Retrieves the location details of a server from aServerLocator.

procedure SetServerLocator(aServerLocator: TROServerLocator; anException: Exception)

Parameters:

  • aServerLocator: Configuration data of the server
  • anException: Exception

StoreConnected

This property specifies does Connected property should be stored in the dfm file or not.

property StoreConnected: Boolean read write

SuppressErrorDialogs

property SuppressErrorDialogs: Boolean read write

SynchronizedProbing    (declared in TROBaseHTTPChannel)

Determines whether server probing happens in the context of the main VCL thread (true, default) or in a background worker thread. See the ProbeServers property for a more detailed description.

property SynchronizedProbing: Boolean read write

TargetUri    (declared in TROTransportChannel)

Target URI

property TargetUri: TROUri read write

TargetUrl    (declared in TROBaseHTTPChannel)

The address of the server. By default, this is usually the host name of your server followed by 8099, plus the name of the dispatcher configured on the server, for example: http://myserver:8099/bin.

property TargetUrl: string read write

ThreadSafe  protected    (declared in TROTransportChannel)

property ThreadSafe: Boolean read write

Timeout

Sets the timeout, in milliseconds, after which a request will be aborted if no response has been received. The default value is 600,000 (10 minutes). If you are expecting long processing times on your server, make sure to adjust this timeout accordingly.

property Timeout: Integer read write

TriggerAfterConnect  protected

procedure TriggerAfterConnect

TriggerProgress  protected virtual    (declared in TROTransportChannel)

Fires OnProgress event

procedure TriggerProgress(aType: TProgressType; aDirection: TProgressDirection; aTransfered: Integer; aTotal: Integer)

Parameters:

  • aType: progress type
  • aDirection: direction
  • aTransfered: transfered bytes
  • aTotal: total bytes

TrustInvalidCA

property TrustInvalidCA: Boolean read write

UseConnectionPooling    (declared in TROSimpleTransportChannel)

Specifies can be the pooling be used or not

property UseConnectionPooling: Boolean read write

UserAgent    (declared in TROBaseHTTPChannel)

Declares 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 the HTTP packet monitors.

property UserAgent: string read write

 

AccessType

Type of access required. This parameter can be one of the following values:

  • atDirect = Resolves all host names locally.
  • atProxy = Retrieves the proxy or direct configuration from the registry.
  • atPreconfig_with_no_autoproxy = Retrieves the proxy or direct configuration from the registry and prevents the use of a startup Microsoft JScript or Internet Setup (INS) file.
  • atPreconfig = Passes requests to the proxy unless a proxy bypass list is supplied and the name to be resolved bypasses the proxy.
property AccessType: TROWinInetAccessType read write

AllowGzipEncoding    (declared in TROBaseHTTPChannel)

Allows to use GZIP compression

property AllowGzipEncoding: Boolean read write

Busy    (declared in TROTransportChannel)

Informs whether the channel is currently busy executing a remote request (true) or not (false). Most channels (except most notably the TROSuperTCPChannel) are only capable of performing one request at a time; if a second request is attempted while the channel is Busy, an EROChannelBusy exception will be raised.

property Busy: Boolean read

ClientCert

Client certificate

property ClientCert: TROWinInetClientCert read write

Connected

Returns whether the client currently has an active connection to the server (true) or not (false).

property Connected: Boolean read write

CurrentLocator    (declared in TROTransportChannel)

Returns which of the fail-over/load balancing servers configured in the ServerLocators is currently active. Depending on the DispatchOptions defined, this value might change with each request, or only if the current server fails.

property CurrentLocator: TROServerLocator read write

DisableNagle  protected    (declared in TROBaseHTTPChannel)

Controls whether data packets are sent individually or if small packets are held back to send as part of fewer larger data packets. Normally, you will want this disabled as it can have a significant effect on performance. The only time when its worth keeping the property enabled is when there are many small packets to be sent and you need to keep network bandwidth to a minimum.

See more at Nagle's algorithm

property DisableNagle: Boolean read write

DispatchOptions    (declared in TROBaseHTTPChannel)

Configures the available fail-over and load balancing options provided by the Remoting SDK. By default, channels are set up to talk to one specific server only. Two independent options are available to provide fail-over and load balancing:

  • Enables fail-over support. If the connection to any given server fails, the channel will automatically keep trying the next server specified in ServerLocators, until a working server is found or all servers have been tried.
  • Enables load-balancing support. Each request dispatched through the channel will go to a different server configured in ServerLocators, resulting in calls being more or less equally distributed over the available servers.

Enabling any of these options obviously requires the server to be implemented in a stateless way, so that it does not depend on all requests from a client going to the same server. This implies using a class factory different from Per-Client and, if sessions are used, a session manager that allows sharing of session state between servers.

property DispatchOptions: TRODispatchOptions read write

Encryption    (declared in TROBaseConnection) obsolete

This is DES based enscryption, it is obsolete because works only for Delphi. Use message envelope AES Encryption Envelope instead.

property Encryption: TROEncryption read write

FaultToleranceLocatorIdx    (declared in TROTransportChannel)

property FaultToleranceLocatorIdx: Integer read write

InetConnect

property InetConnect: HINTERNET read

InetRoot

property InetRoot: HINTERNET read

InitializeAutoProxy

Merely refreshes the internal state of proxy configuration information from the registry. There may be a small delay if you are using this.

property InitializeAutoProxy: Boolean read write

IsProbeMode  protected    (declared in TROTransportChannel)

property IsProbeMode: Boolean read

KeepAlive    (declared in TROBaseHTTPChannel)

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

KeepConnection

This property specifies can we reuse the same TCP connection to send and receive multiple HTTP requests/responses or not. If it set to False then each pair request/response creates new one connection. Uses KeepConnection = True allows to improve HTTP performance for multiple requests.

property KeepConnection: Boolean read write

LoadBalancerLocatorIdx    (declared in TROTransportChannel)

property LoadBalancerLocatorIdx: Integer read write

Login

Defines the username and password that should be used to authenticate with the server. This login is used for HTTP level authentication only. It should be set if your web server (or proxy server) is configured to require login at HTTP level to accept communication. This is not to be confused with the Remoting SDK's own login on session level, as discussed in Authentication and Login.

property Login: TROLogin read write

MinSizeForGzipEncoding    (declared in TROBaseHTTPChannel)

The minimal size when GZIP encoding will be used (default is 4096 bytes)

property MinSizeForGzipEncoding: Integer read write

NeedDecodeResponse  protected    (declared in TROBaseHTTPChannel)

Indicates that response should in encoded with GZIP compression

property NeedDecodeResponse: Boolean read write

OnAfterProbingServer    (declared in TROBaseHTTPChannel)

Fires after the channel is done probing a specific server for availability. You can use this event to check the result of the probing, possibly to update internal data structures or to display server status in the user interface.

property OnAfterProbingServer: TROEndProbeServerEvent read write

OnAfterProbingServers    (declared in TROBaseHTTPChannel)

Fires after the channel is done probing all servers for availability. You can use this event to check the result of the probing, possibly to update internal data structures or to display server status in the user interface.

property OnAfterProbingServers: TROEndProbeServersEvent read write

OnBeforeProbingServer    (declared in TROBaseHTTPChannel)

Fires before the channel starts probing a specific server for availability. You can use this event to:

property OnBeforeProbingServer: TROBeginProbeServerEvent read write

OnBeforeProbingServers    (declared in TROBaseHTTPChannel)

Fires before the channel starts probing all servers for availability. You can use this event:

  • to check or adjust the server configurations
  • to include/exclude individual server from being probed by changing their TROServerLocator properties.
property OnBeforeProbingServers: TROBeginProbeServersEvent read write

OnLoginNeeded    (declared in TROBaseHTTPChannel)

Fires if an EROSessionNotFound (or the descendant SessionNotFoundException) exception is raised during the execution of a remote request. This usually indicates that the server cannot authenticate the client or that the session has expired. The most common use for this event is to perform a call to a special Login service provided by the server (possibly after prompting the user to enter username and password), and to set the aRetry parameter to true if login was successful.

property OnLoginNeeded: TROExceptionEvent read write

OnProgress    (declared in TROBaseHTTPChannel)

This event fires as the channel is transferring data for a request or response to or from the server, informing of the current progress. It can be used to keep the user interface updated during lengthy transfers,e.g. by showing a progress bar or the remaining transfer volume. Note: the accuracy and frequency of calls to OnProgress depends on the channel type; since channels transport data packets in different sized chunks (or even all-at-once), OnProgress might show a very fine progress for some channels, while jumping from 0 to 100% in one step with others.

property OnProgress: TProgressEvent read write

OnReceiveStream    (declared in TROBaseHTTPChannel)

Fires after a stream with a response message has been received from the server. Use this event handler to inspect and possibly modify the stream, before it continues to be processed by the higher levels of the Remoting SDK framework.

property OnReceiveStream: TStreamDispatch read write

OnSendStream    (declared in TROBaseHTTPChannel)

Fires just as a stream with a request message will be sent to the server. The event handler can inspect and possibly modify the stream, before it continues to be sent off to the server.

property OnSendStream: TStreamDispatch read write

OnServerLocatorAssignment    (declared in TROBaseHTTPChannel)

Fires before changing of a server locator.

property OnServerLocatorAssignment: TServerLocatorAssignment read write

ProbeFrequency    (declared in TROBaseHTTPChannel)

Sets at what intervals, in milliseconds, the channel will probe the servers configured in ServerLocators for availability. The default value is 60,000 (60 seconds). See the ProbeServers property for a more detailed description. Although somewhat misnamed, this property defines the Interval between probes, not the actual probing Frequency. The property name is persisted for backward compatibility.

property ProbeFrequency: Cardinal read write

ProbeServers    (declared in TROBaseHTTPChannel)

Toggles whether the channel will continuously probe the servers configured in ServerLocators for availability. If enabled (true), the channel will ping all servers at a regular interval to determine if they are reachable. If a server fails to respond, it will be disabled for future calls until a later probe can reach it again. The interval between probes can be configured using the ProbeFrequency property. By default, server probing is turned off.

property ProbeServers: Boolean read write

ProxyLogin

Defines the username and password that should be used to authenticate with the proxy.

property ProxyLogin: TROLogin read write

ServerAcceptEncodingModes  protected    (declared in TROBaseHTTPChannel)

Value of Accept-Encoding header that was returned by server

property ServerAcceptEncodingModes: TROHTTPAcceptEncodingModes read write

ServerLocators    (declared in TROBaseHTTPChannel)

Optionally, this collection property can be filled to contain a list of possible servers to be used for fail-over or load balancing purposes. Depending on the settings configured in DispatchOptions, the channel will automatically spread calls over the available servers, or fall back to another server if one fails.

property ServerLocators: TROServerLocatorCollection read write

StoreConnected

This property specifies does Connected property should be stored in the dfm file or not.

property StoreConnected: Boolean read write

SuppressErrorDialogs

property SuppressErrorDialogs: Boolean read write

SynchronizedProbing    (declared in TROBaseHTTPChannel)

Determines whether server probing happens in the context of the main VCL thread (true, default) or in a background worker thread. See the ProbeServers property for a more detailed description.

property SynchronizedProbing: Boolean read write

TargetUri    (declared in TROTransportChannel)

Target URI

property TargetUri: TROUri read write

TargetUrl    (declared in TROBaseHTTPChannel)

The address of the server. By default, this is usually the host name of your server followed by 8099, plus the name of the dispatcher configured on the server, for example: http://myserver:8099/bin.

property TargetUrl: string read write

ThreadSafe  protected    (declared in TROTransportChannel)

property ThreadSafe: Boolean read write

Timeout

Sets the timeout, in milliseconds, after which a request will be aborted if no response has been received. The default value is 600,000 (10 minutes). If you are expecting long processing times on your server, make sure to adjust this timeout accordingly.

property Timeout: Integer read write

TrustInvalidCA

property TrustInvalidCA: Boolean read write

UseConnectionPooling    (declared in TROSimpleTransportChannel)

Specifies can be the pooling be used or not

property UseConnectionPooling: Boolean read write

UserAgent    (declared in TROBaseHTTPChannel)

Declares 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 the HTTP packet monitors.

property UserAgent: string read write

 

ChannelMatchingTargetUri    (declared in TROTransportChannel)

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 function ChannelMatchingTargetUri(const aUri: TROUri): TROTransportChannel

Parameters:

  • aUri: Server Uri

ChannelMatchingTargetUrl    (declared in TROTransportChannel)

class function ChannelMatchingTargetUrl(const aUrl: string): TROTransportChannel

Parameters:

  • aUrl:

 

constructor Create  override

Standard component constructor

constructor Create(AOwner: TComponent)

Parameters:

  • AOwner: Owner

Assign  override

Copies the contents of another, similar object.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Instance whose properties will be copied

AssignEvents  protected override

Copies the events of another, similar object.

procedure AssignEvents(aSource: TROTransportChannel)

Parameters:

  • aSource: Instance whose properties will be copied

AssignSpecificProperties  protected override

Copies the specific properties of another, similar object.

procedure AssignSpecificProperties(aSource: TROTransportChannel)

Parameters:

  • aSource: Instance whose properties will be copied

AsyncException  protected virtual    (declared in TROTransportChannel)

Notifies about an exception in an asynchronous mode.

procedure AsyncException(aAsyncInterface: IROAsyncInterface; AsyncException: Exception)

Parameters:

  • aAsyncInterface: Exception source
  • AsyncException: Exception data

BeforeDispatch  protected virtual    (declared in TROTransportChannel)

Allows an implimentation to do necessary preparatory actions (checking the readiness of the channel, restore session data, etc.).

procedure BeforeDispatch(aMessage: IROMessage)

Parameters:


ChangeServerLocator  protected virtual    (declared in TROTransportChannel)

procedure ChangeServerLocator(var aFaultStartLocatorIdx: Integer; var aRetry: Boolean; const aException: Exception)

Parameters:

  • aFaultStartLocatorIdx:
  • aRetry:
  • aException:

CheckProperties  virtual    (declared in TROTransportChannel)

Validates channel properties

procedure CheckProperties

ClearConnectionPool    (declared in TROSimpleTransportChannel)

Clears connection pool

procedure ClearConnectionPool

DecryptStream (TStream, TStream)  protected overload    (declared in TROBaseConnection)

Decrypt stream

procedure DecryptStream(const Source: TStream; const Dest: TStream)

Parameters:

  • Source: Source
  • Dest: Destination

DecryptStream (TStream)  protected overload    (declared in TROBaseConnection)

Decrypt stream

procedure DecryptStream(const Stream: TStream)

Parameters:

  • Stream: Stream

Dispatch (IROMessage)  protected reintroduce overload    (declared in TROTransportChannel)

Sends a request message through the Self channel for processing and gets back an aMessage. CodeGen uses this method when generating a proxy from RODL Files.

procedure Dispatch(aMessage: IROMessage)

Parameters:

  • aMessage: (In/out) message data

DoAfterProbingServerEvent  protected virtual    (declared in TROTransportChannel)

Fires OnAfterProbingServer event

procedure DoAfterProbingServerEvent(const aServerLocator: TROServerLocator; const aFailed: Boolean)

Parameters:

  • aServerLocator: Server locator
  • aFailed:

DoAfterProbingServersEvent  protected virtual    (declared in TROTransportChannel)

Fires OnAfterProbingServer event

procedure DoAfterProbingServersEvent(const aProbedCount: Integer; const aEnabledCount: Integer; const aDisabledCount: Integer)

Parameters:

  • aProbedCount:
  • aEnabledCount:
  • aDisabledCount:

DoBeforeDecryptEvent  protected virtual    (declared in TROBaseConnection) obsolete

procedure DoBeforeDecryptEvent(aEncryptedStream: TStream)

Parameters:

  • aEncryptedStream: Stream

DoBeforeProbingServerEvent  protected virtual    (declared in TROTransportChannel)

Fires OnBeforeProbingServer event

procedure DoBeforeProbingServerEvent(const aServerLocator: TROServerLocator)

Parameters:

  • aServerLocator: Server locator

DoBeforeProbingServersEvent  protected virtual    (declared in TROTransportChannel)

Fires OnBeforeProbingServers event

procedure DoBeforeProbingServersEvent

DoDecodeStream  protected    (declared in TROBaseHTTPChannel)

Performs GZIP decoding

procedure DoDecodeStream(const aSource: TStream; const aDest: TStream)

Parameters:

  • aSource: Source
  • aDest: Destination

DoEncodeStream  protected    (declared in TROBaseHTTPChannel)

Performs GZIP encoding

procedure DoEncodeStream(const aSource: TStream)

Parameters:

  • aSource: Source

DoNeedSSL  protected override    (declared in TROBaseHTTPChannel)

Detects SSL state

function DoNeedSSL: Boolean

DoReceiveStreamEvent  protected virtual    (declared in TROTransportChannel)

Fires OnSendStream event

procedure DoReceiveStreamEvent(const Dest: TStream)

Parameters:

  • Dest: Stream

DoSendStreamEvent  protected virtual    (declared in TROTransportChannel)

Fires OnSendStream event

procedure DoSendStreamEvent(const Source: TStream)

Parameters:

  • Source: Stream

DoServerLocatorAssignmentEvent  protected virtual    (declared in TROTransportChannel)

Fires OnServerLocatorAssignment event

procedure DoServerLocatorAssignmentEvent(const aLocator: TROServerLocator; const aException: Exception)

Parameters:

  • aLocator:
  • aException:

EncryptStream (TStream, TStream)  protected overload    (declared in TROBaseConnection)

Encrypt stream

procedure EncryptStream(const Source: TStream; const Dest: TStream)

Parameters:

  • Source: Source
  • Dest: Destination

EncryptStream (TStream)  protected overload    (declared in TROBaseConnection)

Encrypt stream

procedure EncryptStream(const Stream: TStream)

Parameters:

  • Stream: Stream

GetBusy  protected override    (declared in TROSimpleTransportChannel)

Returns current channel state

function GetBusy: Boolean

GetChannelFromPool  protected override    (declared in TROSimpleTransportChannel)

function GetChannelFromPool: TROTransportChannel

GetTransportObject  protected virtual    (declared in TROTransportChannel)

Returns itself.

function GetTransportObject: TObject

InitServerLocator  protected virtual    (declared in TROTransportChannel)

Sets CurrentLocator

function InitServerLocator: Integer

IsEncryptionUsed  protected    (declared in TROBaseConnection)

Checks if encryption was used

function IsEncryptionUsed: Boolean

IsStreamEncrypted  protected    (declared in TROBaseConnection)

Checks state of stream

function IsStreamEncrypted(Source: TStream): Boolean

Parameters:

  • Source: Stream

LaunchAsyncTask  protected    (declared in TROTransportChannel)

procedure LaunchAsyncTask(aRequest: IROAsyncRequest)

Parameters:

  • aRequest:

LoadSSL  protected virtual    (declared in TROTransportChannel)

Loads SSL library if SSL protocol is used

procedure LoadSSL

Notification  protected override    (declared in TROTransportChannel)

Forwards notification messages to all owned components.

procedure Notification(AComponent: TComponent; Operation: TOperation)

Parameters:

  • AComponent: component
  • Operation: operation

Probe  protected    (declared in TROTransportChannel)

Checks the accessibility of servers from the ServerLocators. This method is intended to provide fail-over and load balancing support in the Remoting SDK Architecture.

function Probe(aServerLocator: TROServerLocator): Boolean

Parameters:

  • aServerLocator: Server locator

ProbeAll  protected    (declared in TROTransportChannel)

Checks the availability of all known servers.

procedure ProbeAll

ResetProbingClone  protected virtual    (declared in TROTransportChannel)

Resets channel that is used for probing

procedure ResetProbingClone(aProbe: TROTransportChannel)

Parameters:

  • aProbe: Probing clone

RetrieveMetadata  protected virtual    (declared in TROTransportChannel)

Returns server-side RODL.

procedure RetrieveMetadata(out Dest: TStream)

Parameters:

  • Dest: Stream

RetrieveRODL  protected    (declared in TROTransportChannel)

This method is used for to obtaining the RODL library from the server without havin to rely on a channel-specific mechanism (such as a HTTP request to http://servername:port/rodl).

procedure RetrieveRODL(out RODLLibrary: TRODLLibrary)

Parameters:

  • RODLLibrary: Result

ReturnChannelToPool  protected override    (declared in TROSimpleTransportChannel)

procedure ReturnChannelToPool(aChannel: TROTransportChannel)

Parameters:

  • aChannel:

ROFreeNotification    (declared in TROComponent)

Forwards notification messages to all owned components.

procedure ROFreeNotification(aComponent: TComponent)

Parameters:

  • aComponent: component

RORemoveFreeNotification    (declared in TROComponent)

Forwards notification messages to all owned components.

procedure RORemoveFreeNotification(aComponent: TComponent)

Parameters:

  • aComponent: component

SendRemoveNotification  protected    (declared in TROComponent)

Forwards notification messages to all owned components.

procedure SendRemoveNotification(aComponent: TComponent)

Parameters:

  • aComponent: component

SetAsyncBusy  protected virtual    (declared in TROTransportChannel)

procedure SetAsyncBusy(const Value: Boolean)

Parameters:

  • Value:

SetServerLocator  protected    (declared in TROTransportChannel)

Retrieves the location details of a server from aServerLocator.

procedure SetServerLocator(aServerLocator: TROServerLocator; anException: Exception)

Parameters:

  • aServerLocator: Configuration data of the server
  • anException: Exception

TriggerAfterConnect  protected

procedure TriggerAfterConnect

TriggerProgress  protected virtual    (declared in TROTransportChannel)

Fires OnProgress event

procedure TriggerProgress(aType: TProgressType; aDirection: TProgressDirection; aTransfered: Integer; aTotal: Integer)

Parameters:

  • aType: progress type
  • aDirection: direction
  • aTransfered: transfered bytes
  • aTotal: total bytes

 

OnAfterAttemptConnect

property OnAfterAttemptConnect: TAfterAttemptConnectEvent read write
delegate: procedure OnAfterAttemptConnect(Sender: TObject; var aAttemptConnectResult: DWORD)

OnAfterConnect

property OnAfterConnect: TNotifyEvent read write

OnAfterEncrypt    (declared in TROBaseConnection)

Fired after stream was encrypted

property OnAfterEncrypt: TROBaseConnectionOperation read write
delegate: procedure OnAfterEncrypt(Sender: TROBaseConnection; aEncryptedStream: TStream)

OnAfterOpenRequest

property OnAfterOpenRequest: TWinInetAfterOpenRequestEvent read write
delegate: procedure OnAfterOpenRequest(Sender: TObject; aHandle: HINTERNET)

OnAsyncException    (declared in TROTransportChannel)

Fires when exception is raised in asynchronous mode

property OnAsyncException: TROAsyncExceptionEvent read write
delegate: procedure OnAsyncException(Sender: TROTransportChannel; Async: IROAsyncInterface; anException: Exception)

OnBeforeDecrypt    (declared in TROBaseConnection)

Fired before stream will be decrypted

property OnBeforeDecrypt: TROBaseConnectionOperation read write
delegate: procedure OnBeforeDecrypt(Sender: TROBaseConnection; aEncryptedStream: TStream)

OnBeforeOpenConnection

property OnBeforeOpenConnection: TNotifyEvent read write

OnBeforeOpenRequest

property OnBeforeOpenRequest: TNotifyEvent read write

OnException    (declared in TROTransportChannel)

Fires if an exception is raised during the execution of a remote request. This could be an exception returned from the server, a communication problem or an error within the client. Depending on the type of error, your event handler can try to rectify the problem, and set aRetry to true to have the channel try and perform the request again. For example, an application could show a dialog asking the user to confirm if his internet connection is available, with Cancel and Retry buttons.
If aRetry is set to true and the call succeeds at the second attempt, the call will return to the original code that initiated the request, as if the exception never happened.

property OnException: TROExceptionEvent read write
delegate: procedure OnException(Sender: TROTransportChannel; anException: Exception; var aRetry: Boolean)

OnInvalidCertificate

property OnInvalidCertificate: TROInvalidCertificate read write
delegate: procedure OnInvalidCertificate(Sender: TObject; const aIssuer: AnsiString; const aSubject: AnsiString; var aAllow: Boolean)