aboutsummaryrefslogtreecommitdiff
path: root/works/life/computer-network-experiment/Common.h
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-06-08 18:25:36 +0800
committercrupest <crupest@outlook.com>2021-06-08 18:25:36 +0800
commitf7d73f1bf08aaca98e789a6d6c56d672cc0c4c9f (patch)
treea059a5c93ac38c5826bb59555fa654cebc6ca951 /works/life/computer-network-experiment/Common.h
parentd9756de78c161c2d33a9d32d2cb1eaa68be1744e (diff)
downloadcrupest-f7d73f1bf08aaca98e789a6d6c56d672cc0c4c9f.tar.gz
crupest-f7d73f1bf08aaca98e789a6d6c56d672cc0c4c9f.tar.bz2
crupest-f7d73f1bf08aaca98e789a6d6c56d672cc0c4c9f.zip
import(life): ...
Diffstat (limited to 'works/life/computer-network-experiment/Common.h')
-rw-r--r--works/life/computer-network-experiment/Common.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/works/life/computer-network-experiment/Common.h b/works/life/computer-network-experiment/Common.h
index a4472c7..1e6c277 100644
--- a/works/life/computer-network-experiment/Common.h
+++ b/works/life/computer-network-experiment/Common.h
@@ -48,5 +48,7 @@ int CloseSocket(int socket);
void BeforeExit();
-void SafeSend(int socket, std::string_view buffer);
-std::string SafeReadUntil(int socket, char c, std::string &rest);
+// Return false for error.
+bool SafeSend(int socket, std::string_view buffer);
+// Return false for error.
+bool SafeReadUntil(int socket, char c, std::string &data, std::string &rest);