Retrieve a random string key from the server.
This key is also referred in the SmartFoxServer documentation as the "secret key".
It's a unique key, valid for the current session only. It can be used to create a secure login system.
This key is also referred in the SmartFoxServer documentation as the "secret key".
It's a unique key, valid for the current session only. It can be used to create a secure login system.

C# | Visual Basic | Visual C++ |
public void GetRandomKey()
Public Sub GetRandomKey
public: void GetRandomKey()

Sends:
SFSEvent..::.OnRandomKeyDelegate
Version:
SmartFoxServer Pro

The following example shows how to handle the request a random key to the server.
CopyC#

SFSEvent.onRandomKey += OnRandomKey; smartFox.GetRandomKey(); public void OnRandomKey(string key) { Debug.WriteLine("Random key received from server: " + key) }
