title: recvfrom function returns -1 with no error
body: <p>The title pretty much says it all. I have a receiving thread waiting for input from a client, but when nothing is read, instead of returning 0 bytes read, it returns -1 yet no errors are returned.</p>
  
  <p>Any hints has to why this function would behave like that?</p>
  
  <p>Thanks</p>
  
  <p>EDIT:</p>
  
  <p>This is the receiving code</p>
  
  <pre><code>sockaddr_in remote;
  remote.sin_family = AF_UNSPEC;
  remote.sin_addr.s_addr = inet_addr( _host.c_str() );
  remote.sin_port = htons( atoi( _port.c_str() ) );
  int remoteSize = sizeof(remote);
  
  bytesRead = recvfrom(_os.socket, 
      (char*)buffer, 
      bufferSize, 
      0,(SOCKADDR*)&amp;remote, &amp;remoteSize);
  
  _error = WSAGetLastError();
  </code></pre>
  
  <p>When I'm executing, <code>bytesRead</code> is -1 and <code>_error</code> is 0.</p>