Create the connector object
How to create the connector object to fetch server configuration information.
Read time 1 minuteLast updated 7 months ago
Use a connector object after initialization to fetch server configuration information necessary for your game to login and use Vivox. The connector object is usually only called once per application startup before the first sign in.
To create the connector object, use the request structure and the function. This is typically the first request issued after .
vx_req_connector_createvx_req_connector_create_create()vx_initialize3()When the Vivox SDK processes the request, it contacts the Vivox network and downloads configuration information to the client that's relevant to your game's communications infrastructure. This is a one-time HTTP request. The configuration information is loaded into memory before the sign in operation.
vx_req_connector_createIf the game's connection is lost, you don't need to issue a second time because the information is already in memory. Simply proceed to re-sign in to the game.
vx_req_connector_createThe connector object doesn't hold open any ports, use bandwidth, network resources, or CPU for heartbeats, and only requires a small amount of memory to hold the configuration.
The following code displays an example creating the connector object:
vx_req_connector_create *req;vx_req_connector_create_create(&req);req->connector_handle = vx_strdup("c1");req->acct_mgmt_server = vx_strdup("https://mt1s.www.vivox.com/api2/");int request_count;int vx_issue_request3_response = vx_issue_request3(&req->base, &request_count);
After the game receives the message, the game can then sign in to Vivox.
vx_resp_connector_createDisconnect the connector object
Disconnecting the connector object unloads the configuration file from memory. You can disconnect the object by using the request.
vx_req_connector_initiate_shutdownUse instead of on application exit to clean up Vivox resources.
vx_uninitialize()vx_req_connector_initiate_shutdown