Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
c3733b29
Commit
c3733b29
authored
Oct 26, 2011
by
Alex Brainman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net: document why we do not use SO_REUSEADDR on windows
R=rsc, adg CC=golang-dev
https://golang.org/cl/5302058
parent
704bf779
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
sock_windows.go
src/pkg/net/sock_windows.go
+7
-0
No files found.
src/pkg/net/sock_windows.go
View file @
c3733b29
...
@@ -11,6 +11,13 @@ import (
...
@@ -11,6 +11,13 @@ import (
)
)
func
setKernelSpecificSockopt
(
s
syscall
.
Handle
,
f
int
)
{
func
setKernelSpecificSockopt
(
s
syscall
.
Handle
,
f
int
)
{
// Windows will reuse recently-used addresses by default.
// SO_REUSEADDR should not be used here, as it allows
// a socket to forcibly bind to a port in use by another socket.
// This could lead to a non-deterministic behavior, where
// connection requests over the port cannot be guaranteed
// to be handled by the correct socket.
// Allow broadcast.
// Allow broadcast.
syscall
.
SetsockoptInt
(
s
,
syscall
.
SOL_SOCKET
,
syscall
.
SO_BROADCAST
,
1
)
syscall
.
SetsockoptInt
(
s
,
syscall
.
SOL_SOCKET
,
syscall
.
SO_BROADCAST
,
1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment