add acl::acl_cpp_init() for some samples which were needed by Windows OS.

This commit is contained in:
zhengshuxin 2019-08-23 21:16:45 +08:00
parent 3295c10aea
commit b601b629e5
7 changed files with 12 additions and 0 deletions

View File

@ -38,6 +38,8 @@ int main(int argc, char* argv[])
if (argc >= 2)
addr = argv[1];
acl::acl_cpp_init();
int max = 100;
std::vector<acl::socket_stream*> conns;
std::vector<acl::thread*> threads;

View File

@ -85,6 +85,7 @@ int main(int argc, char* argv[])
}
}
acl::acl_cpp_init();
acl::log::stdout_open(true);
std::vector<acl::thread*> threads;

View File

@ -11,6 +11,8 @@ int main(int argc, char* argv[])
if (argc >= 2)
addr = argv[1];
acl::acl_cpp_init();
if (client.open(addr, 0, 0) == false)
{
printf("open %s error\n", addr.c_str());

View File

@ -15,6 +15,8 @@ int main(int argc, char* argv[])
if (argc >= 2)
addr = argv[1];
acl::acl_cpp_init();
if (client.open(addr, 0, 0) == false)
{
printf("open %s error\n", addr.c_str());

View File

@ -11,6 +11,8 @@ int main(int argc, char* argv[])
if (argc >= 2)
addr = argv[1];
acl::acl_cpp_init();
if (server.open(addr) == false)
{
printf("open %s error\r\n", addr.c_str());

View File

@ -37,6 +37,7 @@ int main(int argc, char* argv[])
acl::server_socket server;
acl::string addr = "127.0.0.1:9001";
acl::acl_cpp_init();
acl::log::stdout_open(true);
if (argc >= 2)

View File

@ -10,6 +10,8 @@ int main(int argc, char* argv[])
if (argc >= 2)
addr = argv[1];
acl::acl_cpp_init();
if (server.open(addr) == false)
{
printf("open %s error\r\n", addr.c_str());