UserIsConnectByIndate
public void UserIsConnectByIndate(string gamerIndate);
Parameter
Value | Type | Description |
---|---|---|
gamerIndate | string | gamerIndate of the user whose connection status to the real-time notification server is to be checked |
Description
Checks whether the user with the corresponding gamerIndate is connected to the real-time notification server.
The result is sent to the OnIsConnectUser
event handler.
You must call the Backend.Notification.Connect()
method in advance.
This is an upgraded version of CheckUserIsConnect() method / OnIsConnect handler.
Example
// Connect to the real-time notification server.
Backend.Notification.Connect();
// Find the inDate of the user whose nickname is "a1".
BackendReturnObject bro = Backend.Social.GetUserInfoByNickName("a01");
string gamerIndate = bro.GetFlattenJSON()["row"]["inDate"].ToString();
// Define OnIsConnectUser handler that will react when the UserIsConnectByIndate method is called.
Backend.Notification.OnIsConnectUser= (bool isConnect, string nickName, string gamerIndate) => {
Debug.Log($"{nickName} / {gamerIndate} connection status : " + isConnect);
};
// The OnIsConnectUser handler defined above is called when this method is called.
Backend.Notification.UserIsConnectByIndate(gamerIndate);
OnIsConnectUser
public OnIsConnectUser OnIsConnectUser;
Description
Shows whether a user is connected or not by sending a bool value to the event handler when the UserIsConnectByIndate
method is called.
If the nickname does not exist, string.Empty is returned.
The handler will not be called if there is no user with the given inDate.
Example
Backend.Notification.OnIsConnectUser = (bool isConnect, string nickName, string gamerIndate) => {
Debug.Log($"{nickName} / {gamerIndate} connection status : " + isConnect);
};
Response cases:
Value | Type | Description |
---|---|---|
isConnect | bool | Whether the user is connected(true if connected) |
nickName | string | User's nickname |
gamerIndate | string | User inDate |
Nickname and inDate arguments are always provided, regardless of the user's connection status.