TRVCamReceiver.SessionKey, SessionKey2 (read-only)

Top  Previous  Next

Returns the identifier of the current session.

property SessionKey: TRVSessionKey;

property SessionKey2: TRVSessionKey;

Value of SessionKey is changed (incremented by 1) every time when Active becomes True. When Active=False, this property returns 0.

Value of SessionKey is passed as a parameter to events of TRVCamReceiver. If you perform time consuming operations inside an event, it makes sense to compare values of this property and SessionKey parameter, to make sure that a connection was not closed or reopened.

Value of SessionKey is not necessary equal to the SessionKey of the connected TRVCamSender (they are completely independent from each other).

Note: SessionKey returns a non-zero value for the whole period of connection, not only when all channels are open (and even in the mode when channels are not created).

SessionKey2 returns the same value as SessionKey when Active=True. But when Active=False, it returns the key of the previous session.

See also

State