TRVCamReceiver.OnReceiveUserData

Top  Previous  Next

The event occur in response to TRVCamSender.SendUserData

type // defined in MRVType unit

  TRVDataReadEvent  = procedure(Sender: TObject; SessionKey: TRVSessionKey
    AData: TStream; ASocket: TRVSocket;
    GUIDFrom, GUIDTo, GUIDGroup: TGUID;

    AMediaIndex : Wordof object;

property OnReceiveUserData: TRVDataReadEvent;

Parameters:

AData – received content

nGUIDFrom – identifier of the sender which sent the command (TRVCamSender.GUIDFrom)

nGUIDGroup – identifier of the group on the server, if this command was sent to a group.

AMediaIndex – index of the sender's media channel.

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.

The event is called in a thread context or a main process context, depending on SynchonizedReceiveUserData property.

Do not update user interface (or make any other operation that requires a context of the main process) in events called in a thread context.