From 1d53369c17013dc9bcf35636696dce68e043c098 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Mon, 27 Jan 2020 23:23:15 +0900 Subject: Indicate received lines --- netcatchat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netcatchat.cpp b/netcatchat.cpp index c5cd48b..01d35a1 100644 --- a/netcatchat.cpp +++ b/netcatchat.cpp @@ -123,7 +123,7 @@ static void communicate(int sock) { inbuffer.resize(prevsize + nr); for (size_t idx; (idx = inbuffer.find('\n')) != string::npos; ) { inbuffer[idx] = '\0'; - printf("\x1B[2K\x1B[G%s\n", inbuffer.data()); + printf("\x1B[2K\x1B[G> \x1B[36m%s\x1B[0m\n", inbuffer.data()); inbuffer.erase(inbuffer.begin(), inbuffer.begin() + idx + 1); } -- cgit v1.2.3-70-g09d2