aboutsummaryrefslogtreecommitdiff
path: root/works/life/computer-network-experiment/Common.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-06-06 22:13:43 +0800
committercrupest <crupest@outlook.com>2021-06-06 22:13:43 +0800
commitfcd2304e04dd3fabdefce4293b1b76ad99f8ed73 (patch)
treeee19cca7bfc1f66590d499a2b40d0e5c8b1d0d00 /works/life/computer-network-experiment/Common.cpp
parentf0309ee1e5cd268091f59f3aa377beca77d76c5c (diff)
downloadcrupest-fcd2304e04dd3fabdefce4293b1b76ad99f8ed73.tar.gz
crupest-fcd2304e04dd3fabdefce4293b1b76ad99f8ed73.tar.bz2
crupest-fcd2304e04dd3fabdefce4293b1b76ad99f8ed73.zip
import(life): ...
Diffstat (limited to 'works/life/computer-network-experiment/Common.cpp')
-rw-r--r--works/life/computer-network-experiment/Common.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/works/life/computer-network-experiment/Common.cpp b/works/life/computer-network-experiment/Common.cpp
index 02ac550..2e01dcb 100644
--- a/works/life/computer-network-experiment/Common.cpp
+++ b/works/life/computer-network-experiment/Common.cpp
@@ -5,7 +5,6 @@
#ifdef WIN32
#include <Windows.h>
#include <winsock.h>
-#pragma comment(lib, "Ws2_32.lib")
#endif
[[noreturn]] void PrintErrorMessageAndExit(StringView message,
@@ -46,3 +45,17 @@ void InitWSA() {
}
}
#endif
+
+int main() {
+#ifdef WIN32
+ InitWSA();
+#endif
+
+ int c = Main();
+
+#ifdef WIN32
+ WSACleanup();
+#endif
+
+ return c;
+}