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
229807c8
Commit
229807c8
authored
Nov 30, 2009
by
Jonathan Wills
Committed by
Russ Cox
Nov 30, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a method on UDPConn so they can actually send broadcast packets.
R=rsc
https://golang.org/cl/162046
parent
a85c258e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
udpsock.go
src/pkg/net/udpsock.go
+5
-1
No files found.
src/pkg/net/udpsock.go
View file @
229807c8
...
@@ -71,7 +71,11 @@ type UDPConn struct {
...
@@ -71,7 +71,11 @@ type UDPConn struct {
fd
*
netFD
;
fd
*
netFD
;
}
}
func
newUDPConn
(
fd
*
netFD
)
*
UDPConn
{
return
&
UDPConn
{
fd
}
}
func
newUDPConn
(
fd
*
netFD
)
*
UDPConn
{
c
:=
&
UDPConn
{
fd
};
setsockoptInt
(
fd
.
fd
,
syscall
.
SOL_SOCKET
,
syscall
.
SO_BROADCAST
,
1
);
return
c
;
}
func
(
c
*
UDPConn
)
ok
()
bool
{
return
c
!=
nil
&&
c
.
fd
!=
nil
}
func
(
c
*
UDPConn
)
ok
()
bool
{
return
c
!=
nil
&&
c
.
fd
!=
nil
}
...
...
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