Skip to main content

Query Connection Status

Checks the connection status of the chat server.

Call Information

bool IsConnected() {}

Source Code

using UnityEngine;
using PlayNANOO.ChatServer;
using PlayNANOO.ChatServer.Models;

public class PlayNANOOChatExample : MonoBehaviour, IChatListener
{
ChatClient chatClient;

void Start()
{
chatClient = new ChatClient(this);
chatClient.SetPlayer("USER_ID", "USER_NAME");
chatClient.Connect();

bool isConnected = chatClient.IsConnected();
if (isConnected)
{
Debug.Log("Connected");
}
else
{
Debug.Log("DisConnected");
}
}
}