RE: [gnet] gnet 2.0.5 on windows with mingw/msys



 
Cool!

I could never get the 'echoserver' running on my box either, and I never
bothered to check why.  I was only after 'Pan', and once I got that, I
stopped looking.  My bad.

Thanks.

Stephane

> -----Original Message-----
> From: David Ergo [mailto:david ergo alterface com] 
> Sent: September 8, 2004 10:19
> To: gnet lists gnetlibrary org
> Cc: hroly kfb gmail com; srouleau innobec com
> Subject: Re: [gnet] gnet 2.0.5 on windows with mingw/msys
> 
> I also had the same problem :
> $ ./echoserver 1234
> ** (process:1528): WARNING **: Can't set reuse on tcp socket 
> Could not create server on port 1234
> 
> The patch of Stephane Rouleau did not help.
> 
> I resolved it by patching the code at 2 places :
> - firstly, SOCKET is defined as an unsigned int under MINGW, 
> so the test "if (sockfd < 0)", at line 947 of tcp.c, is never 
> true, I replaced it by "if ((int)sockfd < 0)" (in my case 
> sockfd was -1)
>   Maybe more corrections of the same type should be done or 
> maybe the SOCKET type should be corrected in MINGW ?
> - secondly, the implementation of 
> gnet_private_create_listen_socken() in gnet-private.c doesn't 
> work if HAVE_IPV6 is not defined but policy is
> GIPV6_POLICY_IPV4_THEN_IPV6 (this case is not handled), so I 
> changed the policy setting in gnet_init() in gnet.c : on 
> windows, if HAVE_IPV6 is not defined then set policy to 
> GIPV6_POLICY_IPV4_ONLY.
> 
> Patches are in attachment.
> Can a gnet developper apply theses patches to the sources, please ?
> 
> David Ergo
> Alterface s.a.
> 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]