Documentation

Development

User Acquisition

Monetization

Industry

Vivox Core SDK

Vivox Core SDK

Vivox
​
​
Vivox Core SDK
  • Overview
  • Before you begin
  • Get started
  • Release notes
  • Developer Guide
    • Client SDK basics
      • Initialize the Vivox SDK
      • Handle messages
      • Message types
      • Character encoding
      • Requests and responses
        • Request, response, and event mapping to Vivox functionality
      • Create the connector object
      • Sign in to a game
      • Sign out of a game
      • Uninitialize the Vivox SDK
    • Channels
    • Presence management
    • Messaging
    • Manage audio
    • Couch co-op
    • Android app development
    • iOS app development
    • macOS app development
    • Windows app development
    • Real-time recording
    • Speech-to-text audio transcription
    • Text-to-speech
    • Troubleshooting
  • Reference
  • Privacy overview
  1. Vivox Core SDK documentation

Requests and responses

Learn about requests and responses in Vivox.
Read time 2 minutes
Last updated 8 months ago

The Vivox SDK supports various requests that you can use to control its behavior. For each request issued to the Vivox SDK, there is a response that the game processes as a part of its response handler.
Requests are created by using functions that are closely named to the type of request. For example, the
vx_req_account_anonymous_login
request is created by calling the
vx_req_account_anonymous_login_create()
function. The request is then sent to the Vivox SDK by calling
vx_issue_request3()
.
The following code displays an example of this process:
. . .vx_req_account_anonymous_login_t *req;vx_req_account_anonymous_login_create(&req);req->account_name = vx_strdup(".myissuer.myid.");req->account_handle = vx_strdup(".myid.");req->connector_handle = vx_strdup("c1");vx_issue_request3(&req->base, &request_count);. . .
Note
Use
vx_issue_request3()
to get a count of the current request queue depth whenever a request is issued, and to monitor the queue depth in your application.
When
vx_issue_request3()
is called, the Vivox SDK posts a
vx_resp_base_t
message back to the game. Each
vx_resp_base_t
message that the game processes could be the response to one of multiple different requests. The game determines the true type of the
vx_resp_base_t
message by looking at the
vx_resp_base_t.type
field, and then casts that message to the corresponding specific response structure.
The convention for mapping
vx_response_type
values to response types is to use the following format: if the
vx_response_type
value is
esp_xxx
, then the corresponding structure type is
vx_resp_xxx_t
.
The following code displays an example of this process:
void MyGamesResponseHandler(vx_resp_base_t *resp){ switch(resp->type) { case resp_connector_create: { vx_resp_connector_create_t *tresp =reinterpret_cast<vx_resp_connector_create_t *>(resp); // handle the response here. break; } case resp_account_anonymous_login: { // etc break; } }}
When the Vivox SDK returns a response, configure the application to check the
return_code
and the
status_code
fields.
The following code displays an example of this process:
. . .vx_resp_base_t *resp;. . .if (resp->base.return_code == 1){ // This is a failure printf("resp type %s returned %d: %s\n", vx_get_response_type_string(resp->base.type), resp->base.status_code, vx_get_error_string(resp->base.status_code)); return;}
For a mapping of all possible messages to common game functionality, refer to Request, response, and event mapping to Vivox functionality.

Copyright © 2026 Unity Technologies
LegalPrivacy PolicyCookiesDocumentation Terms of UseDo Not Sell or Share My Personal InformationYour Privacy Choices (Cookie Settings)

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S and elsewhere (more info here). Other names or brands are trademarks of their respective owners.

Some pages are machine-translated for convenience, and may contain inaccuracies. In the event of conflicting information, the English version is authoritative.


    Report a problem with this page
    ​
    ​