Speedify SDK for Desktop/Embedded
15.0.1
Basic Usage
#include <stdio.h>
#include "
speedifysdk/speedifysdk.h
"
int
main(
int
argc,
char
** argv ) {
// Create an SDK object, passing in the port you are running the daemon on
SpeedifySDK_CreateSettings
settings;
SpeedifySDK_InitializeCreateSettings
(&settings);
snprintf(settings.
name
,
SPEEDIFYSDK_MAX_APP_NAME_LENGTH
,
"%s"
,
"MyAppName"
);
settings.
port
=1234;
CSpeedifySDK
sdk =
SpeedifySDK_CreateWithSettings
( settings );
// Get the current state synchronously
SpeedifySDK_StateResult
res =
SpeedifySDK_GetState
( sdk, NULL, NULL );
if
( res.
isError
)
printf(
"error : %s\n"
, res.
errorMessage
);
else
printf(
"state : %s\n"
,
SpeedifySDK_State_toString
( res.
state
) );
// Cleanup the SDK object
SpeedifySDK_Destroy
( sdk );
}
Generated by
1.8.15