diff options
author | crupest <crupest@outlook.com> | 2021-06-08 18:25:36 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-06-08 18:25:36 +0800 |
commit | f27bda8e8d7fcfe82ad20d345c63d327ff047b11 (patch) | |
tree | c2ff251ec1b7c769fb8b4d8fde42e8c9cec74978 /computer-network-experiment/Common.h | |
parent | fcd0d3aaea9b6a312565e95ad191b5bef17dd541 (diff) | |
download | life-f27bda8e8d7fcfe82ad20d345c63d327ff047b11.tar.gz life-f27bda8e8d7fcfe82ad20d345c63d327ff047b11.tar.bz2 life-f27bda8e8d7fcfe82ad20d345c63d327ff047b11.zip |
...
Diffstat (limited to 'computer-network-experiment/Common.h')
-rw-r--r-- | computer-network-experiment/Common.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/computer-network-experiment/Common.h b/computer-network-experiment/Common.h index a4472c7..1e6c277 100644 --- a/computer-network-experiment/Common.h +++ b/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);
|