diff options
author | crupest <crupest@outlook.com> | 2021-06-07 19:24:39 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-06-07 19:24:39 +0800 |
commit | 868936626cd32590b697cc5ba0c67e032deabd38 (patch) | |
tree | 1834fb5eabb761252f34022284ed221cfa83b110 /works/life/computer-network-experiment/server.cpp | |
parent | 0dd20e5dde39d1cc42ca5c92f56cdb087c1b8f00 (diff) | |
download | crupest-868936626cd32590b697cc5ba0c67e032deabd38.tar.gz crupest-868936626cd32590b697cc5ba0c67e032deabd38.tar.bz2 crupest-868936626cd32590b697cc5ba0c67e032deabd38.zip |
import(life): ...
Diffstat (limited to 'works/life/computer-network-experiment/server.cpp')
-rw-r--r-- | works/life/computer-network-experiment/server.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/works/life/computer-network-experiment/server.cpp b/works/life/computer-network-experiment/server.cpp index 14987f3..f12630a 100644 --- a/works/life/computer-network-experiment/server.cpp +++ b/works/life/computer-network-experiment/server.cpp @@ -49,7 +49,7 @@ void ResponseThreadProc(int socket, sockaddr_in address) { byte_count_sent += byte_actually_sent;
}
- SendOutput(CRUT("Succeeded to send message to {}!\n"),
+ SendOutput(OutputColor::Green, CRUT("Succeeded to send message to {}!\n"),
ConvertCharString(address_string));
CloseSocket(socket);
@@ -78,9 +78,10 @@ int Main() { PrintErrorMessageAndExit(CRUT("Failed to listen."));
}
- while (true) {
- SendOutput(CRUT("Now start to accept incoming connection.\n"));
+ SendOutput(OutputColor::Green,
+ CRUT("Now start to accept incoming connection.\n"));
+ while (true) {
sockaddr_in client_address;
int client_socket;
unsigned sin_size = sizeof(sockaddr_in);
|