Flattened examples directory
This commit is contained in:
22
examples/cpp/cxproj_dll/libztHelloWorld/libztHelloWorld.cpp
Normal file
22
examples/cpp/cxproj_dll/libztHelloWorld/libztHelloWorld.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
// libztHelloWorld - Simple demo with libzt.lib and libzt.dll
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <Windows.h>
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
#include <strsafe.h>
|
||||
|
||||
#include "..\..\..\..\include\libzt.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
printf("waiting for libzt to come online...\n");
|
||||
zts_startjoin("config_path", "17d709436c2c5367");
|
||||
printf("started. now performing a socket call\n");
|
||||
int fd = zts_socket(AF_INET, SOCK_STREAM, 0);
|
||||
printf("fd=%d\n", fd);
|
||||
// zts_connect(), zts_bind(), etc...
|
||||
zts_stop();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user