<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi there,<br>
    <br>
    I've just upgraded our live555 version (from <span
      style="font-family: 'Courier New,courier';">2011.06.12 to </span><span
      style=" font-family:'Courier New,courier';">2012.05.17) and
      RTSPClient::connectToServer is failing on Windows.</span> The
    following check fails:<br>
    <br>
    <u><span style=" font-family:'Courier New,courier';"></span></u><tt>int
      const err = envir().getErrno();<br>
      if (err == EINPROGRESS || err == EWOULDBLOCK) {<br>
          ...<br>
      }</tt><br>
    <br>
    I read Ross Finlayson's <a
href="http://lists.live555.com/pipermail/live-devel/2012-January/014432.html">response
      to a previous post</a> by Jeff Shanab, where he added EWOULDBLOCK
    as a platform-independent solution. However, it turns out
    EWOULDBLOCK != WSAEWOULDBLOCK.<br>
    <br>
    <u>winerror.h</u><br>
    <tt>#define WSAEWOULDBLOCK                   10035L<br>
    </tt><u>errno.h</u><br>
    <tt>#define EWOULDBLOCK     140</tt><br>
    <u>winsock.h / winsock2.h</u><br>
    <tt>#if 0<br>
      #define EWOULDBLOCK             WSAEWOULDBLOCK<br>
    </tt><br>
    See <a
href="http://connect.microsoft.com/VisualStudio/feedback/details/509380/errno-h-socket-return-codes-now-inconsistent-with-wsagetlasterror">this
      feedback entry</a> and <a
href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms737828%28v=vs.85%29.aspx">MSDN
      Error Codes</a>. Seems like in VS2010 they broke compatibility
    with Berkeley? The #if 0 is a bit of a lol. :)<br>
    <br>
    There used to be a workaround in NetCommon.h ln 38, however it is
    now commented out in 2012.05.17:<br>
    <tt>//#define EWOULDBLOCK WSAEWOULDBLOCK</tt><br>
    <br>
    This results in Windows builds being unable to connect.<tt></tt> As
    a temporary workaround, I've changed my NetCommon.h to read:<br>
    <tt>#undef EWOULDBLOCK<br>
      #define EWOULDBLOCK WSAEWOULDBLOCK<br>
      #undef EINPROGRESS<br>
      #define EINPROGRESS WSAEWOULDBLOCK<br>
      #undef EAGAIN<br>
      #define EAGAIN WSAEWOULDBLOCK<br>
      #undef EINTR<br>
      #define EINTR WSAEINTR</tt><br>
    <br>
    This appears to work again. Is this solution correct?<br>
    <br>
    Thanks for your help,<br>
    Scott Taylor<br>
    immersaview.com<br>
    <br>
    <br>
    <br>
    <a
href="http://lists.live555.com/pipermail/live-devel/2012-January/014432.html"></a>
  </body>
</html>