IsChatConnect
public bool IsChatConnect(ChannelType channelType);
Parameter
Value | Type | Description |
---|---|---|
channelType | ChannelType(enum) | Channel type to be checked. ChannelType.Public(normal) or ChannelType.Guild(guild) |
Description
Checks whether a socket connection is established between the client and the server.
- This function is simply to check whether the server and socket are connected. It is not a method to check if the connection has been made normally by sending a request to the chat server.
- This method simply checks the socket connection status.
Example
bool isConnect = Backend.Chat.IsChatConnect(ChannelType.Public);
// When the chat server and client are connected
// isConnect = true
// When the chat server and client are not connected
// isConnect = false
if(isConnect)
{
Debug.Log("Connected to general channel");
}
Response Cases
ReturnValue(bool) | Description |
---|---|
true | When the chat server and client are connected |
false | When the chat server and client are not connected |