Skip to main content
Version: SDK-5.9.6

Friend Connection Handlers

These handlers are called when a friend connects to or disconnects from the real-time notification server.
You can get the nickname and gamerIndate when the user is connected/disconnected.

You can connect to the real-time notification server with the Backend.Notification.Connect() method.

The following events generate real-time notifications:

  • Friend connected to the real-time notification server
  • Friend disconnected from the real-time notification server

OnFriendConnected

public OnFriendConnect OnFriendConnected;

Description

This handler operates when a friend connects to the real-time notification server.

Example

Backend.Notification.OnFriendConnected = (string inDate, string nickname) => { 
Debug.log(nickname + " has connected.");
};

Response Cases

ValueTypeDescription
inDatestringgamerInDate of the friend connected to the real-time notification server
nicknamestringNickname of the friend connected to the real-time notification server

OnFriendDisconnected

public OnFriendConnect OnFriendDisconnected;

Description

This handler operates when a friend disconnects from the real-time notification server.

Example

Backend.Notification.OnFriendDisconnected= (string inDate, string nickname) => { 
Debug.Log(nickname + " has disconnected.");
};

Response Cases

ValueTypeDescription
inDatestringgamerInDate of the friend disconnected from the real-time notification server
nicknamestringNickname of the friend disconnected from the real-time notification server