aboutsummaryrefslogtreecommitdiff
path: root/computer-network-experiment/Common.h
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-06-06 23:43:52 +0800
committercrupest <crupest@outlook.com>2021-06-06 23:43:52 +0800
commit800923717d1f95cd16b270ad8f1e430f77f33f57 (patch)
treea6370a2a6f1393ba88f25392a702d291dec8a73b /computer-network-experiment/Common.h
parenta6088689ec605c97b846fb52beadc0de89fccf76 (diff)
downloadlife-800923717d1f95cd16b270ad8f1e430f77f33f57.tar.gz
life-800923717d1f95cd16b270ad8f1e430f77f33f57.tar.bz2
life-800923717d1f95cd16b270ad8f1e430f77f33f57.zip
...
Diffstat (limited to 'computer-network-experiment/Common.h')
-rw-r--r--computer-network-experiment/Common.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/computer-network-experiment/Common.h b/computer-network-experiment/Common.h
index 45a7da1..4e30439 100644
--- a/computer-network-experiment/Common.h
+++ b/computer-network-experiment/Common.h
@@ -14,8 +14,6 @@ inline auto &output_stream = std::wcout;
inline auto &error_stream = std::wcerr;
#define CRUT(string_literal) L##string_literal
-int Main();
-
inline String ConvertCharString(std::string_view s) {
return cru::ToUtf16WString(s);
}
@@ -28,12 +26,16 @@ inline auto &output_stream = std::cout;
inline auto &error_stream = std::cerr;
#define CRUT(string_literal) string_literal
-inline String ConvertCharString(std::string_view s) { return s; }
+inline String ConvertCharString(std::string_view s) { return String(s); }
#endif
+int Main();
+
[[noreturn]] void PrintErrorMessageAndExit(StringView message,
bool print_last_error = true);
#ifdef WIN32
void InitWSA();
#endif
+
+int Close(int socket);