# Network check

When there is a problem with user's network, you can know the exact information at that time to better locate the problem.

We provide you with two ways to detect user's network, which is ping and traceroute.

# API

# setNetworkCheckHostAddress()

After the story line configuration is completed in the aihelp dashboard, call this method to start network check when a storyline is triggered.

Your can also get the network check results through the callback, to carry out the next step of processing.

public void OnNetworkCheckResultCallback(const char* net_log){  
    // write your code here
}
AIHelpSupport::setNetworkCheckHostAddress("aihelp.net", OnNetworkCheckResultCallback);

# Definition

# hostAddress

  • Type: string
  • Details: Required. Specify the domain name of network detection, preferably the domain name or IP address where the user server is located, so as to detect the quality of network connection of users to the application.

# onNetworkCheckResultCallback

  • Type: void (*OnNetworkCheckResultCallback)(const char* net_log)
  • Details: Optional. Callback of network detection results, AIHelp will return the network check results to the caller through the interface.

# Code Example

Then, the code example is as follows:

public void OnNetworkCheckResultCallback(const char* net_log){  
    // write your code here
}
AIHelpSupport::setNetworkCheckHostAddress("aihelp.net", OnNetworkCheckResultCallback);

# Others

This function has switch and label configuration in the dashboard of AIHelp.

Please make sure that the relevant configuration in the dashboard is ready before your integrating.

Last Updated: 6/7/2023, 9:55:33 AM