Skip to main content
Version: 5.5

App server data

Applications can share application data between an app client and the app server when making a 1-to-1 call or joining a group call (conference). App server data is name of the application data delivered from an app client to the app server.

Supported call typeSupported SDK version
1-to-1 call, group callAll versions
Note
  • App server data is functionally equivalent to "Service ticket ID" available in PlanetKit 5.0.x or lower. Only the name of the feature has been changed since PlanetKit 5.1.
  • In server callbacks, the stid parameter previously used for delivering the service ticket ID has been deprecated. Instead, the app_svr_data parameter delivers the app server data in server callbacks.

Sending app server data

The following sections describe how to send app server data based on the call type.

1-to-1 call

In 1-to-1 calls, only the caller can send app server data.

To send app server data in a 1-to-1 call, set the app server data in a MakeCallParam, and pass the MakeCallParam when calling MakeCall().

wchar_t szAppServerData[] = L"App server data for a 1-to-1 call";

PlanetKit::PlanetKitCallPtr pPlanetKitCall;
PlanetKit::MakeCallParamPtr pMakeCallParam = PlanetKit::MakeCallParam::CreateWithAccessToken(
myId, peerId, accessToken
);
pMakeCallParam->SetAppServerData(szAppServerData);

PlanetKit::PlanetKitManagerPtr pPlanetKitManager = PlanetKit::PlanetKitManager::GetInstance();
PlanetKit::SStartResult sStartResult = pPlanetKitManager->MakeCall(pMakeCallParam, &pPlanetKitCall);

The app server data is delivered in the app_svr_data parameter of Notify and 1-to-1 Call Event server callbacks.

Group call

In group calls, all participants are eligible to send app server data.

To send app server data in a group call, set the app server data in a ConferenceParam, and pass the ConferenceParam when calling JoinConference().

wchar_t szAppServerData[] = L"App server data for a group call";

PlanetKit::PlanetKitConferencePtr pPlanetKitConference;
PlanetKit::ConferenceParamPtr pConferenceParam = PlanetKit::ConferenceParam::CreateWithAccessToken(
myId, roomId, roomServiceId, accessToken
);
pConferenceParam->SetAppServerData(szAppServerData);

PlanetKit::PlanetKitManagerPtr pPlanetKitManager = PlanetKit::PlanetKitManager::GetInstance();
PlanetKit::SStartResult sStartResult = pPlanetKitManager->JoinConference(pConferenceParam, &pPlanetKitConference);

The app server data is delivered in the app_svr_data parameter of the Group Call Event server callback.

Size limitation

The maximum size of app server data is 4096 bytes including the null termination character.

Comparison of a call start message and app server data

A call start message and app server data have the following differences:

Source and destinationSupported call type
Call start messageApp client of a caller → App client of a callee
App client of a callee → App client of a caller
Only 1-to-1 call
App server dataApp client of a caller or participant → App server1-to-1 call, group call (conference)

APIs related to the app server data function are as follows.

1-to-1 call

Client API

Server API

Group call

Client API

Server API