title: C++ Sockets Unsynched/Parallel Code without Multithreading
body: <p>I have this 2-side(client and server) program written in c++, which is basically a "chat program".</p>
  
  <p>So one side sends data to the other side which sends data to the other side .
  I am using C-Sockets (TCP/SOCK_STREAM).</p>
  
  <p>So my Problem is, that while the server is waiting for data ("recv()") it is unable to send data itself, as the recv queue is infinite, as far as my experience shows.</p>
  
  <p>I have thought of two ways to solve this, but I am not sure if its worth the time. Because there maybe is a simple solution, which I am just too stupid too think of.</p>
  
  <ol>
  <li>Make it a 6-sided connection, meaning I have a "physical Server", where my server is running on in four instances, twice for each client(sending and recieving). so if one server recieves data it stores the data in a file, for the sending server of the other client to read out and.. send it. Works same the other way around.</li>
  </ol>
  
  <p>As this solution sounds rather shitty, I might not go with it.</p>
  
  <ol start="2">
  <li>Using Multithreading. Which is as I have heard pure cancer to use and you shouldn't use it, unless you have to.</li>
  </ol>
  
  <p>So my question is, do I have to? or is there maybe a simple solution?</p>