This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
zhangyang-libzt/examples/cpp/cxproj_dll/libztHelloWorld/libztHelloWorld.cpp

23 lines
509 B
C++
Raw Normal View History

// 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;
}