From: ddl@danlan.*com   
      
   In article , spam@reppisch.de (reppisch) writes:   
   | hi, thanks for replying,   
   |   
   | >   
   | >>I experience strange lock-ups on older systems when submitting more than   
   | >>64k in one call.   
   | >   
   | >   
   | > The problem is likely elsewhere. Perhaps you mishandle returns values   
   | > less than the amount you passed.   
   |   
   | The same code is not showing the behavior on newer OS's. The one i   
   | mentioned was SCO sys v.   
   | Hopefully we have it out of the field now ;-)   
   | The return value of send is the number of bytes sent. If -1 is returned   
   | i query the last error on the sock via getsockopt(m_socket,   
   | SOL_SOCKET, SO_ERROR...   
   | "Wouldblock" is considered harmless, all other fatal.   
      
   This seems wrong. Unless things have changed a lot I don't think you   
   will ever retrieve an EWOULDBLOCK/EAGAIN type error with getsockopt(...   
   SO_ERROR...). The errors retrieved in this way are saved by the protocol   
   stack while blocking "errors" arise at the API level. It was traditional   
   that any saved error would make select() indicate the socket ready for   
   reading and writing which would obviously cause problems if blocking   
   indications were saved errors.   
      
   | What's the standard way to get the socket error (multi threaded env.   
   | errno???)   
      
   It might be errno (which might be defined in some tricky way) or something   
   like WSAGetLastError() on Windows.   
      
    Dan Lanciani   
    ddl@danlan.*com   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|