title: winsock2 sending and receiving
body: <p>I've search forum but could not find proper answer for my problem. I'm going to make little logg-in procedure so I want send data being in edit box as login, then send data being in second edit box as password. </p>
  
  <pre><code>int ldata2 = send(Socket, buffs, len, 0);//send login via socket
  //send pass via socket
  int passData = send(Socket, buffPass, lenPass, 0);
  </code></pre>
  
  <p>Above instructions are handled by client off course. On server-side when i call recv i.e this way:</p>
  
  <pre><code>int dt = recv(SocketM[i], 
                                          strings,
                                          128,
                                          0);
  
                          int errsock = WSAGetLastError();
                          if(errsock != WSAEWOULDBLOCK &amp;&amp; errsock != 0)
                          {
                              std::cout &lt;&lt; "ERR CODE " &lt;&lt; errsock;
                              //shutdown(SocketM[Client]);
                              closesocket(SocketM[Client]);
                              break;
                          }
                          int passdt = recv(SocketM[i],
                                              passstrings,
                                              128,
                                              0);
                          std::cout &lt;&lt; strings &lt;&lt; std::endl;//Log and Password in the same buff :(
                          std::cout &lt;&lt; passstrings //nothing in buffer why?
  </code></pre>
  
  <p>I get in value string data from buffs and data from buffPass instead of only from buffs for exaple: if in Log-in edit box was "Log" and in Pass edit box- "Pass" i get LogPass
  but i want seperate data from log to one string and data from pass to second. Please help me
  Please help me. </p>