Am Sam, 2002-12-07 um 00.19 schrieb Alexandre Julliard:
Christoph Frick frick@SC-Networks.de Force (WS_)SO_REUSEADDR before binding to a socket;
Sorry, this is definitely wrong. Windows, just as Unix, returns WSAEADDRINUSE if SO_REUSEADDR isn't set (just tried it on W2k). There must be some special circumstances involved in those games the patch is supposed to fix. Perhaps they assume a certain Winsock implementation or Windows version.
I'd like to know what remote addresses exactly the apps call bind() for, and in what order. Perhaps there are subtle differences in the way EADDRINUSE and SO_REUSEADDR are handled.
ignore (WS_)SO_DONTROUTE; Network games in Grand Prix Legends and Nascar 2002 are possible now.
Footnote (i) in http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/win... says that this is - in principle - legal: "A service provider may silently ignore this option on WSPSetSockOpt and return a constant value for WSPGetSockOpt, or it may accept a value for WSPSetSockOpt and return the corresponding value in WSPGetSockOpt without using the value in any way."
However the patch implements the first behavior (ignore) whereas the Windows TCP/IP transport behaves as the second (later calls to getsockopt() refelect the SO_DONTROUTE settings, which seems to have no further effect).
Alexandre, please back this patch out for now, at least the SO_REUSEADDR part which is plain wrong.
Please don't get me wrong: These issues need to be fixed, but please, not by applying hackish patches for special applications such as this one.
Christoph: sorry I missed out on your previous mails to wine-devel. Next time, say something about sockets in the subject line and chances are I won't miss them again.
Martin