기술 자료

​
​

Development

User Acquisition

Monetization

산업 분야

Vivox Core SDK

Vivox Core SDK

이 페이지는 선택한 언어로 제공되지 않습니다.
Vivox
​
​
Vivox Core SDK
  • Overview
  • Before you begin
  • Get started
  • Release notes
  • Developer Guide
    • Client SDK basics
    • Channels
      • Channel name criteria
      • Channel types
      • Echo channels
      • Positional channels
      • Volume differences
      • Channel identifiers for large scale games
      • Participant events
      • Channel webhooks
      • Join a channel
      • Leave a channel
      • Kick a user from a channel
      • Manage session groups
      • Audio injection
      • Methods for setting audio levels
      • Derumbler
      • Automatic connection recovery
        • Network connection state events
        • Network reconnect failure
        • Partial connection failure
    • 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

Network connection state events

Learn about network connection state events.
읽는 시간 3분
최근 업데이트: 8달 전

The Vivox SDK provides details on the network connection status through network connection state events, which are informational and require no immediate action. These events are intended to supplement the game’s own notion of network reachability. They provide visibility into the Vivox SDK’s internal automatic connection recovery process under the following conditions:
  • The initial network connection to Vivox services has been established after
    vx_req_account_anonymous_login
    .
    참고
    This indicates normal operation and is not indicative of network connection recovery.
  • The network connection recovery process has begun.
  • Either the network connection has been restored, or reconnection attempts have failed.
These network connection state changes are reported through the following events for each user account that is signed in by using the standard Vivox event reporting mechanism:
참고
Some Vivox APIs that depend on network connectivity might result in undefined behavior when the Vivox SDK is disconnected from the network or is trying to recover its connection to Vivox services. Your application can avoid undefined behavior in the Vivox SDK by monitoring the Vivox connection state events that are detailed in the following list. Defer or temporarily disable Vivox requests that require an account_handle or session_handle in the request data structures when the connection state is recovering, because the success of those requests depends on a network connection to Vivox services.
  • vx_evt_connection_state_changed
    : Sent when a change has occurred in the connection to Vivox services.
  • connection_state
    :
    • connection_state_connected
      : Initial network connection has been established after vx_req_account_anonymous_login. Network-dependent API calls are safe.
      참고
      This occurs once for each time that a user signs in.
    • connection_state_recovering
      : Attempting to reestablish a connection to Vivox services. Avoid making network-dependent API calls until the connection has recovered or has failed to recover, otherwise undefined behavior can result.
    • connection_state_failed_to_recover
      : Failed to reestablish network connection to Vivox services. A logged_out event will follow. Wait to sign in again until after the game’s network connection has been restored.
    • connection_state_recovered
      : Network connection to Vivox services has been successfully reestablished. Network-dependent API calls are safe.
  • account_handle
    : The handle of a user who is signed in.
The following code is an example of how to handle connection state events. This, combined with the game’s own notion of network reachability, could be used to indicate voice and text communications availability to the user.
void HandleConnectionStateChangedEvent(vx_evt_connection_state_changed &evt){    vx_connection_state connection_state = evt.connection_state;    switch (connection_state)    {        case connection_state_connected:            printf("%s is connected to Vivox\n", evt.acct_handle);            // All API calls are safe to make            break;        case connection_state_recovering:            printf("Network connection recovering\n");            // Avoid making network-dependent API calls while the connection is recovering, such as login, logout, add_session, or remove_session.            break;        case connection_state_failed_to_recover:            printf("Network connection failed to recover\n");            // Expect a logged_out event to follow            // Wait to login until after the network connection is restored            break;        case connection_state_recovered:            printf("Reconnected to network\n");            // All API calls are safe to make            break;    }}

Copyright © 2026 Unity Technologies
법률 정보개인정보 처리방침쿠키Documentation Terms of Use개인 정보 판매 또는 공유 금지개인정보 보호 선택(쿠키 설정)

'Unity', Unity 로고 및 기타 Unity 상표는 미국 및 기타 지역 내 Unity Technologies 또는 그 계열사의 상표 또는 등록상표입니다(자세한 내용은 여기에서 확인하세요). 기타 명칭 또는 브랜드는 해당 소유자의 상표입니다.

일부 페이지는 편의를 위해 기계 번역되었으며 부정확한 내용이 있을 수 있습니다. 정보가 상충되는 경우, 영어 버전을 우선으로 참조하세요.


    이 페이지의 문제 보고