> A simple example could be:
>
> 1 - Create a TForm with a button, then in the button's onClick event
> handler copy the code above.
> 2 - Create this method:
>
> TForm1.HeartBeat(Sender: TObject);
> var
>   lBlkSock: TBlockSocket;
>   lDownloaded: Integer
> begin
>   lBlkSock := TBlockSocket(Sender);
>   lDownloaded:= lBlkSock.RecvCounter;
>   Self.Caption := Format('%d', [lDownloaded]);
>
> end;
>
> That's all.

Hi Leonardo,

Thank you for the reply.

procedure TForm1.HeartBeat(Sender: TObject);
var
   lBlkSock: TBlockSocket;
   lDownloaded: Integer;
begin
   lBlkSock := TBlockSocket(Sender);
   lDownloaded:= lBlkSock.RecvCounter;
   Self.Caption := Format('%d', [lDownloaded]);
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
    HTT := THTTPSend.Create;
    HTT.Sock.OnHeartbeat:=@HeartBeat;

    HTT.Sock.HeartbeatRate := 5000;

    Response := TStringList.Create;
    HTT.KeepAlive := true;
    HTT.protocol := '1.1'; //'1.1', '1.0' (default) and '0.9'.
    HTT.MimeType := 'text';
    HTT.UserAgent := 'synapse';

    HTT.Sock.OnStatus := callback.Status;
end;

Above code gives me a message: "Variable required". What I'm doing 
wrong?

-- 
best regards
Piotr Polok

------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to