I am writing a C # console application that connects to the server via TCP, uses a separate stream to listen for incoming messages from the server, and I want it to write them to the console while reading the message from the console. I was able to do this, but I have a problem.
The console displays this while I am typing and messages appear:
msg from server
msg from server
my msmsg from server
g per server
And I want it to separate my message from server messages like this:
msg from server
msg from server
msg from server
my msg to server
If I receive a message, I still want to keep my typed message, but I do not want it to mix with the received message, I want it to remain complete in the last line.
Can I do it? And How?
Can I move my message to the end of the console when a message arrives from the server?
source share