diff options
author | Martin Peach <mrpeach@users.sourceforge.net> | 2010-05-05 00:50:41 +0000 |
---|---|---|
committer | Martin Peach <mrpeach@users.sourceforge.net> | 2010-05-05 00:50:41 +0000 |
commit | a51ef632f34d84663cee032864a77683503a2926 (patch) | |
tree | d02003a6cacda7ce5e8920bc3ded18a56a44ee60 /net | |
parent | 7a9d6e65ebf040aabf24c3f2cdf759837780557b (diff) |
SO_REUSEADDR fixed cut-and-paste error for _WIN32 version.
svn path=/trunk/externals/mrpeach/; revision=13494
Diffstat (limited to 'net')
-rw-r--r-- | net/tcpserver.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/tcpserver.c b/net/tcpserver.c index db7a4b1..677ba2f 100644 --- a/net/tcpserver.c +++ b/net/tcpserver.c @@ -930,11 +930,10 @@ static void *tcpserver_new(t_floatarg fportno) server.sin_addr.s_addr = INADDR_ANY; /* enable reuse of local address */ #ifdef _WIN32 - if (setsockopt(sockfd, SOL_SOCKET, SO_SNDBUF, (char*)&optVal, optLen) == SOCKET_ERROR) + if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (char*)&optVal, optLen) == SOCKET_ERROR) #else if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (char*)&optVal, optLen) == -1) #endif -// if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval)) < 0) sys_sockerror("tcpserver: setsockopt SO_REUSEADDR"); /* assign server port number */ |