Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
getty
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wei.xuan
getty
Commits
4709210b
Commit
4709210b
authored
Mar 02, 2020
by
alexstocks
Committed by
watermelo
Jul 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rem: setUDPSocketOptions
parent
9833768d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
14 deletions
+0
-14
connection.go
connection.go
+0
-11
server.go
server.go
+0
-3
No files found.
connection.go
View file @
4709210b
...
...
@@ -328,17 +328,6 @@ type gettyUDPConn struct {
conn
*
net
.
UDPConn
// for server
}
func
setUDPSocketOptions
(
conn
*
net
.
UDPConn
)
error
{
// Try setting the flags for both families and ignore the errors unless they
// both error.
err6
:=
ipv6
.
NewPacketConn
(
conn
)
.
SetControlMessage
(
ipv6
.
FlagDst
|
ipv6
.
FlagInterface
,
true
)
err4
:=
ipv4
.
NewPacketConn
(
conn
)
.
SetControlMessage
(
ipv4
.
FlagDst
|
ipv4
.
FlagInterface
,
true
)
if
err6
!=
nil
&&
err4
!=
nil
{
return
perrors
.
WithStack
(
err4
)
}
return
nil
}
// create gettyUDPConn
func
newGettyUDPConn
(
conn
*
net
.
UDPConn
)
*
gettyUDPConn
{
if
conn
==
nil
{
...
...
server.go
View file @
4709210b
...
...
@@ -188,9 +188,6 @@ func (s *server) listenUDP() error {
if
err
!=
nil
{
return
perrors
.
Wrapf
(
err
,
"net.ListenUDP((udp, localAddr:%#v)"
,
localAddr
)
}
// if err = setUDPSocketOptions(pktListener); err != nil {
// return perrors.Wrapf(err, "setUDPSocketOptions(pktListener:%#v)", pktListener)
// }
s
.
pktListener
=
pktListener
...
...
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