MsgCommunicator: Delphi Instant Messaging (IM) SDK
for easy creation of custom messenger system
Occurs when a new file or its next portion arrives.
type TMsgOnReceiveFile = procedure (
const FromUserID, FileID: Cardinal;
const SendingDate, DeliveryDate: TDateTime;
const FileName: String;
BlockSize, BlockNo, Blocks: Integer;
) of object;
property OnReceiveFile: TMsgOnReceiveFile;
OnReceiveFile occurs when the client receives request from other client which starts file sending or successive portion of file received.
FromUserID is an unique identifier of the sender.
FileID is an unique identifier of the file.
FileName - name of the file on the sender side.
SendingDate - date and time when file was sent.
DeliveryDate - date and time when file was delivered.
FullSize - size of the file in bytes.
BlockSize - maximum size (in bytes) of one block (latest block can be less).
BlockNo - number of current block (starting from 0). Can be equal to -1 that means initial request for sending which does not contain file data.
Blocks - number of blocks the file will be split in transmission.
Directly - True means direct transmission from client, False means sending thru server.
Received blocks are stored in the folder specified by IncomingPath property.
To receive and save full file on the disk, call ReceiveFile method.