TROSynapseProgress

Overview

TROSynapseProgress is a support class that subscribes to TBlockSocket.OnStatus event and calls TROTransportChannel.TriggerProgress with collected data.

Usage:

constructor TROSynapseHTTPChannel.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  fhttp := THTTPSend.Create;
...
  fProgress:=TROSynapseProgress.Create(Self, fhttp, pdUnknown);
end;

This class is designed only for internal usage.

Location


 

constructor Create (TROTransportChannel, THTTPSend, TProgressDirection)  overload

Calls TROTransportChannel.TriggerProgress

constructor Create(aOwner: TROTransportChannel; aHTTPSend: THTTPSend; aLogDirection: TProgressDirection)

Parameters:

  • aOwner: Synapse channel
  • aHTTPSend: HTTPSend instance
  • aLogDirection: Direction

constructor Create (TROTransportChannel, TBlockSocket)  overload

Calls TROTransportChannel.TriggerProgress

constructor Create(aOwner: TROTransportChannel; aSocket: TBlockSocket)

Parameters:

  • aOwner: Synapse channel
  • aSocket: BlockSocket instance

ReadDone

This method initiates event of complete reading. it should be called from outside

procedure ReadDone

ReadTotal

Number of bytes to be read.

property ReadTotal: Integer read write

ResetValues

Reset ReadTotal and WriteTotal with default values.

procedure ResetValues

WriteTotal

Number of bytes to be written.

property WriteTotal: Integer read write

 

ReadTotal

Number of bytes to be read.

property ReadTotal: Integer read write

WriteTotal

Number of bytes to be written.

property WriteTotal: Integer read write

 

constructor Create (TROTransportChannel, THTTPSend, TProgressDirection)  overload

Calls TROTransportChannel.TriggerProgress

constructor Create(aOwner: TROTransportChannel; aHTTPSend: THTTPSend; aLogDirection: TProgressDirection)

Parameters:

  • aOwner: Synapse channel
  • aHTTPSend: HTTPSend instance
  • aLogDirection: Direction

constructor Create (TROTransportChannel, TBlockSocket)  overload

Calls TROTransportChannel.TriggerProgress

constructor Create(aOwner: TROTransportChannel; aSocket: TBlockSocket)

Parameters:

  • aOwner: Synapse channel
  • aSocket: BlockSocket instance

ReadDone

This method initiates event of complete reading. it should be called from outside

procedure ReadDone

ResetValues

Reset ReadTotal and WriteTotal with default values.

procedure ResetValues