On Thu, 30 Aug 2001, Robert Lunnon wrote:
Attempt 2 :-)
I am trying to get winsock to work under Solaris and need a little help.
When connecting, the call to connect doesn't generate a syn packet as expected, The problem appears to be WSOCK32_socket, where the type of socket is passed as type 1 for a tcp service, as it turns out the Solaris header file defines SOCK_STREAM as 2 and SOCK_DGRAM as 1 which makes the subsequent call to connect succeed without establishing a connection because a UDP endpoint was created instead of a tcp one.
Now to find out where SOCK_STREAM is getting defined as 1 :-/
I believe that the problem is that SOCK_STREAM==1 SOCK_DGRAM==2 on windows and linux. So WSOCK32_socket assumed that the type parameter does not need any conversion, which seems to be wrong on Solaris. Try the attached patch.
-- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ Demander si un ordinateur peut penser revient à demander si un sous-marin peut nager.