how to listen and talk at the same time across different machines [closed]
I now can get one machine to talk and the other one listen, but if I wanna do something like "instant messaging" at both computers such that still one talk one listen but they can switch listener/talker position. For example, I talk you listen, but if you talk, I can hear too. Now I am using std::cin
to achieve string input on the talker side.
How do I achieve the half-duplex communication as I described?
Thanks.
Please clarify what you want to do. This is too vague to help you.