TRVMediaServer.OnServerCmd

<< Click to display table of contents >>

TRVMediaServer.OnServerCmd

Occurs when a command is received from a client.

type
  TRVMSServerCmdEvent = procedure(Sender: TRVMediaServer;

    const GUIDUser, GUIDToUser, GUIDGroup: TRVMAnsiString;

    ServerCMD: TRVCmd);
property OnServerCmd: TRVMSServerCmdEvent;

This event occurs when a command sent by TRVCamSender.SendCmd (or by some other sender methods) is received by the server.

By default, this event is called only by commands specially addressed to the server. Names of these commands have prefixes either 'RVS_' or 'RVSU_'. You can set FilterUserCmd=False to call this event for all commands.

Parameters:

GUIDUser is a client identifier of the sender (TRVCamSender.GUIDFrom)

GUIDToUser is a client identifier of the addressee (TRVCamReceiver.GUIDFrom), this parameter is valid only for commands addressed from a client to a client.

GUIDGroup is an identifier of a group, if a command is sent to a group.

ServerCmd contains the command data.

This event 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.

If you perform time consuming operations inside an event, it makes to check that SessionKey property is not changed (to make sure that a connection is not closed or reopened).

See also:

TRVCamReceiver.OnReceiveCmdData