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, TBlockSocket)  overload

Creates an instance and subscribes to TBlockSocket.OnStatus.

constructor Create(AOwner: TROTransportChannel; ASocket: TBlockSocket)

Parameters:

  • AOwner: Synapse channel
  • ASocket: BlockSocket instance

constructor Create (TROTransportChannel, THTTPSend, TProgressDirection)  overload

Creates an instance and subscribes to THTTPSend.Sock.OnStatus and to THTTPSend.Headers.OnChange

constructor Create(AOwner: TROTransportChannel; AHTTPSend: THTTPSend; ALogDirection: TProgressDirection)

Parameters:

  • AOwner: Synapse channel
  • AHTTPSend: HTTPSend instance
  • ALogDirection: Direction

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, TBlockSocket)  overload

Creates an instance and subscribes to TBlockSocket.OnStatus.

constructor Create(AOwner: TROTransportChannel; ASocket: TBlockSocket)

Parameters:

  • AOwner: Synapse channel
  • ASocket: BlockSocket instance

constructor Create (TROTransportChannel, THTTPSend, TProgressDirection)  overload

Creates an instance and subscribes to THTTPSend.Sock.OnStatus and to THTTPSend.Headers.OnChange

constructor Create(AOwner: TROTransportChannel; AHTTPSend: THTTPSend; ALogDirection: TProgressDirection)

Parameters:

  • AOwner: Synapse channel
  • AHTTPSend: HTTPSend instance
  • ALogDirection: Direction

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

See Also