TRVCamSender.SendFile, SendUserData

<< Click to display table of contents >>

TRVCamSender.SendFile, SendUserData

Methods for sending a file and arbitrary data.

procedure SendFile(FileName: String; FileSeek: Int64 = 0;
  vGUIDTo: TRVMAnsiString = ''; vGUIDGroup: TRVMAnsiString = '';

  AMediaIndex: Word = 0);
procedure SendUserData(AStream: TMemoryStream;
  vGUIDTo: TRVMAnsiString = ''; TRVMAnsiString: TRVMAnsiString = '';

  AMediaIndex: Word = 0);

When connected to TRVMediaServer: The methods send data to the client specified in vGUIDTo (if vGUIDTo is empy, GUIDTo property is used instead). If they are empty, data are sent to clients belonging to the group having identifier vGUIDGroup (if vGUIDGroup is empty, GUIDGroup property is used instead). Otherwise, the command is sent to the default receivers (if they are defined).

When connected to TRVCamReceiver: The methods send data to the receiver, vGUIDTo may specify a receiver identifier (if vGUIDTo is empy, GUIDTo property is used instead). Group identifiers are ignored.

SendFile sends a file FileName (from the position (in bytes) defined in FileSeek parameter).

SendUserData sends data from AStream.

Media channels

The optional AMediaIndex parameter allows defining the index of media channel, thus linking this file/data to this channel. In the most applications, you can leave this parameter equal to 0.

Files and data in different channels can be sent at the same time.

On the receiver's side

When TRVCamReceiver receives a file, OnReceivingFile, OnReceiveFileData, OnReceivedFile events occur.

When TRVCamReceiver receives user data, OnReceiveUserData event occurs.