|Top Previous Next|
type // defined in MRVType unit
TRVFileEvent = procedure(Sender: TObject; SessionKey : TRVSessionKey;
property OnReceiveFileData: TRVFileReadEvent;
property OnReceivingFile: TRVFileEvent;
OnReceivingFile occurs when the receiver starts to receive a file.
OnReceiveFileData occurs (multiple times) while receiving file data.
OnReceivedFile occurs when a file has been received.
AData – received content
nGUIDFrom – identifier of the sender which sent the command (TRVCamSender.GUIDFrom)
FileName, FileOffs correspond to the parameters of TRVCamSender.SendFile. TotalFileSize – the size of the original file.
If you perform time consuming operations inside an event, it makes sense to compare values of SessionKey parameter and SessionKey property, to make sure that a connection was not closed or reopened.
OnReceivingFile and OnReceivedFile are called in the context of the main process.
OnReceiveFileData is called in a thread context. Do not update user interface (or make any other operation that requires a context of the main process) in this event.