Skip to content

Instantly share code, notes, and snippets.

@bistole
Last active January 29, 2021 22:45
Show Gist options
  • Select an option

  • Save bistole/b7cccf38f3f6b658f45a5fa20ff01115 to your computer and use it in GitHub Desktop.

Select an option

Save bistole/b7cccf38f3f6b658f45a5fa20ff01115 to your computer and use it in GitHub Desktop.
get arguments as string
const EncodableValue* value = call.arguments();
if (std::holds_alternative<std::string>(*value)) {
std::string ip = std::get<std::string>(*value);
const char* ipchar = ip.c_str();
char* ipcharDump = _strdup(ipchar);
printf("CMD_SET_CURRENT_IP: %s\n", ipcharDump);
Backend_SetCurrentIP(ipcharDump);
free(ipcharDump);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment