diff options
Diffstat (limited to 'works/life/computer-network-experiment/Common.h')
-rw-r--r-- | works/life/computer-network-experiment/Common.h | 6 |
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);
|