Re: [gnet-dev] Problem sith socket on windows
- From: "David A. Helder" <dhelder gizmolabs org>
- To: "K. Haley" <haleykd users sourceforge net>
- Cc: gnet-dev lists gnetlibrary org
- Subject: Re: [gnet-dev] Problem sith socket on windows
- Date: Wed, 19 May 2004 22:19:56 -0400
Fixed. Does this sound ok?
* src/gnet-private.h: Add Win32 and Unix macros for
GNET_IS_SOCKET_VALID. 0 is an invalid socket in
Windows. -1 is invalid in Unix (I check for < 0
to be safe). Suggested by K. Haley.
* src/*.c: Use GNET_IS_SOCKET_VALID
On Wed, 2004-05-12 at 22:21, K. Haley wrote:
> Hello,
> While in trying to get the echoserver example to run I noticed that the
> gnet source code looks for socket<0 as an error. The problem is that on
> windows SOCKET is defined as an unsigned int, and the socket function
> returns 0 to indicate an error. Because of this gnet does not detect an
> error in creating sockets. I was wondering what the best way to fix
> this would be. My thought was to add a
> #define INVALID_SOCKET -1
> to the unix section gnet-private.h and test for equality. This should
> work since windows also defines INVLAID_SOCKET. Any comments?
>
>
> ______________________________________________________________________
> _______________________________________________
> gnet-dev mailing list
> gnet-dev lists gnetlibrary org
> http://lists.gnetlibrary.org/mailman/listinfo/gnet-dev
--
David Helder - dhelder gizmolabs org - http://www.gizmolabs.org/~dhelder
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]