aboutsummaryrefslogtreecommitdiff
path: root/works/life/computer-network-experiment/Common.h
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-06-07 23:24:43 +0800
committercrupest <crupest@outlook.com>2021-06-07 23:24:43 +0800
commit9c42586bc406015be0145576fd6cb3586686b4ca (patch)
tree92d0a84756dcc587f7e514ab98c5584e81852cc1 /works/life/computer-network-experiment/Common.h
parent08325faff52d0704c6f17d065ca8d72ea07ca6a0 (diff)
downloadcrupest-9c42586bc406015be0145576fd6cb3586686b4ca.tar.gz
crupest-9c42586bc406015be0145576fd6cb3586686b4ca.tar.bz2
crupest-9c42586bc406015be0145576fd6cb3586686b4ca.zip
import(life): ...
Diffstat (limited to 'works/life/computer-network-experiment/Common.h')
-rw-r--r--works/life/computer-network-experiment/Common.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/works/life/computer-network-experiment/Common.h b/works/life/computer-network-experiment/Common.h
index 6886e38..d2f2e52 100644
--- a/works/life/computer-network-experiment/Common.h
+++ b/works/life/computer-network-experiment/Common.h
@@ -2,6 +2,7 @@
#include "StringUtil.hpp"
#include <iostream>
+#include <sstream>
#include <string>
#include <string_view>
@@ -9,6 +10,7 @@
using Char = wchar_t;
using String = std::wstring;
using StringView = std::wstring_view;
+using StringStream = std::wstringstream;
inline auto &input_stream = std::wcin;
inline auto &output_stream = std::wcout;
inline auto &error_stream = std::wcerr;
@@ -25,6 +27,7 @@ inline std::string ConvertCharStringBack(StringView s) {
using Char = char;
using String = std::string;
using StringView = std::string_view;
+using StringStream = std::stringstream;
inline auto &input_stream = std::cin;
inline auto &output_stream = std::cout;
inline auto &error_stream = std::cerr;
@@ -43,7 +46,5 @@ int CloseSocket(int socket);
void BeforeExit();
-String ReadInputLine();
-
void SafeSend(int socket, std::string_view buffer);
std::string SafeReadUntil(int socket, char c, std::string &rest);