title: Sending while receiving in C
body: <p>I've made a piece of code in what's on my server as multiple threads</p>
  
  <p>The problem is that it doesn't send data while im receiving on the other socket. </p>
  
  <p>so if i send something from to client 1 to client 2, client2 only receives if he sends something himself(jumps out of the recv function) .. how can i solve this ?</p>
  
  <pre><code> /* Thread*/
  while (! stop_received) {
          nr_bytes_recv = recv(s, buffer, BUFFSIZE, 0);
  
          if(strncmp(buffer, "SEND", 4) == 0) {
              char *message = "Text asads \n";
              rv = send(users[0].s, message, strlen(message), 0);
              rv = send(users[1].s, message, strlen(message), 0);
              if (rv &lt; 0) {
                  perror("Error sending");
                  exit(EXIT_FAILURE);
              }           
          }else{
              char *message = "Unknown command \n";
              rv = send(s, message, strlen(message), 0);
              if (rv &lt; 0) {
                  perror("Error sending");
                  exit(EXIT_FAILURE);
              }
          }
  }
  </code></pre>