Hi all,
I have a bit of a problem. Essentially, the problem is that Java 1.4 is buggy, it includes winsock.h, but then proceeds to use winsock2. That wouldn't be an issue, except that my app uses multicast sockets, and for reasons known only to Redmond they decided to change the values of some of the multicast socket option constants.
Java, therefore, passes in the winsock1 values to winsock2. Windows apparently can deal with this just fine (well, the appw works), despite there being no obvious way to remap them, both IP_MULTICAST_IF and IP_HDRINCL which both == 2 in different winsock versions would be valid at once on XP/2003 for instance.
Marcus, I know you took a stab at implementing multicast support once, so if you have any tips that'd be appreciated.
If anybody knows a way you might be able to detect that a program is using the wrong headers for the winsock2 dll, please let me know.
thanks -mike
man, 2003-03-31 kl. 11:38 skrev Mike Hearn:
Hi all,
I have a bit of a problem. Essentially, the problem is that Java 1.4 is buggy, it includes winsock.h, but then proceeds to use winsock2. That wouldn't be an issue, except that my app uses multicast sockets, and for reasons known only to Redmond they decided to change the values of some of the multicast socket option constants.
Java, therefore, passes in the winsock1 values to winsock2. Windows apparently can deal with this just fine (well, the appw works), despite there being no obvious way to remap them, both IP_MULTICAST_IF and IP_HDRINCL which both == 2 in different winsock versions would be valid at once on XP/2003 for instance.
Marcus, I know you took a stab at implementing multicast support once, so if you have any tips that'd be appreciated.
If anybody knows a way you might be able to detect that a program is using the wrong headers for the winsock2 dll, please let me know.
A requested version is given to WSAStartup by the app. What is it?
A requested version is given to WSAStartup by the app. What is it?
Yeah, I found that a few minutes ago, but for some reason it seems to be called twice, the first time with version 2 requested then immediately afterwards again with version 1. Pretty strange.
I just traced it under XP and there it gives the correct value (9) for the socket option. I'm staring at the java source and trying to figure out how it can do that, considering it seems to pass in a constant from winsock.h, but it must fiddle things somewhere.....