TsgcWSPClient_FilesEvents › OnFileReceived

OnFileReceived Event

Fires when an incoming file has been fully received and persisted to disk.

Syntax

property OnFileReceived: TsgcWSFileEvent;
// TsgcWSFileEvent = procedure(Connection: TsgcWSConnection; const aMessage: TsgcWSMessageFile) of object

Default Value

Remarks

Raised after the last fragment is written and, for qosLevel1 and qosLevel2, after the file-received acknowledgment has been sent to the server. aMessage.FileName points to the saved file inside Files.SaveDirectory (or the path chosen in OnFileReceivedAuthorization).

Example

procedure TForm1.oProtocolFileReceived(Connection: TsgcWSConnection; const aMessage: TsgcWSMessageFile);
begin
  Memo1.Lines.Add('file saved: ' + aMessage.FileName);
end;

Back to Events