Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-unixfs
Commits
eb50900f
Commit
eb50900f
authored
Jan 19, 2015
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated multiaddr-net for WrapNetListener
parent
7a322c95
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
Godeps/Godeps.json
Godeps/Godeps.json
+1
-1
Godeps/_workspace/src/github.com/jbenet/go-multiaddr-net/net.go
.../_workspace/src/github.com/jbenet/go-multiaddr-net/net.go
+8
-4
No files found.
Godeps/Godeps.json
View file @
eb50900f
...
...
@@ -143,7 +143,7 @@
},
{
"ImportPath"
:
"github.com/jbenet/go-multiaddr-net"
,
"Rev"
:
"
04044c2289504304472715d827a8f564fa3759a8
"
"Rev"
:
"
eae26b653a87d02193bb261ae5c5e1f39cc033d6
"
},
{
"ImportPath"
:
"github.com/jbenet/go-multihash"
,
...
...
Godeps/_workspace/src/github.com/jbenet/go-multiaddr-net/net.go
View file @
eb50900f
...
...
@@ -236,13 +236,17 @@ func Listen(laddr ma.Multiaddr) (Listener, error) {
return
nil
,
err
}
// we need to fetch the new multiaddr from the listener, as it
// may have resolved to some other value.
nladdr
,
err
:=
FromNetAddr
(
nl
.
Addr
())
// we want to fetch the new multiaddr from the listener, as it may
// have resolved to some other value. WrapNetListener does it for us.
return
WrapNetListener
(
nl
)
}
// WrapNetListener wraps a net.Listener with a manet.Listener.
func
WrapNetListener
(
nl
net
.
Listener
)
(
Listener
,
error
)
{
laddr
,
err
:=
FromNetAddr
(
nl
.
Addr
())
if
err
!=
nil
{
return
nil
,
err
}
laddr
=
nladdr
return
&
maListener
{
Listener
:
nl
,
...
...
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