int main() { #ifdef _WIN32 WSADATA WSAData; WSAStartup(0x101, &WSAData); #else if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) return (1); #endif // initialize Pubnub state Pubnub_overload1("demo", "demo", "", "", false);//[Cipher key is Optional] printf("UUID:::%s", uuid()); return 0; }
int main() { #ifdef _WIN32 WSADATA WSAData; WSAStartup(0x101, &WSAData); #else if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) return (1); #endif // create a structure instance to pass as an argument to history function struct struct_history args = { .channel = "hello_world", .limit = 2, .cb = history_callback }; // initialize Pubnub state Pubnub_overload1("demo", "demo", "demo", "0123456789012345", false); // call history function history(&args); return 0; }