Samchon Framework for CPP  1.0.0
main.cpp
1 #include <samchon/example/invoke_binary/Server.hpp>
2 #include <samchon/example/invoke_binary/Client.hpp>
3 
4 #include <iostream>
5 #include <array>
6 #include <thread>
7 
8 #ifdef _WIN64
9 # ifdef _DEBUG
10 # pragma comment(lib, "x64/Debug/SamchonFramework.lib")
11 # else
12 # pragma comment(lib, "x64/Release/SamchonFramework.lib")
13 # endif
14 #else
15 # ifdef _DEBUG
16 # pragma comment(lib, "Debug/SamchonFramework.lib")
17 # else
18 # pragma comment(lib, "Release/SamchonFramework.lib")
19 # endif
20 #endif
21 
22 using namespace std;
23 using namespace samchon::example::invoke_binary;
24 
25 void main()
26 {
27  Server server;
28  Client client;
29 
30  array<thread, 2> threadArray =
31  {
32  thread([&server]()
33  {
34  server.open();
35  }),
36  thread([&client]()
37  {
38  //client.connect();
39  //client.listen();
40  })
41  };
42 
43  for (size_t i = 0; i < threadArray.size(); i++)
44  threadArray[i].join();
45 }
Definition: RWMutex.hpp:4