Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-libp2p
Commits
906944b2
Commit
906944b2
authored
Apr 22, 2015
by
Jeromy
Browse files
cleanup changes from PR
parent
4493535d
Changes
1
Show whitespace changes
Inline
Side-by-side
discovery/mdns.go
View file @
906944b2
...
@@ -2,13 +2,10 @@ package discovery
...
@@ -2,13 +2,10 @@ package discovery
import
(
import
(
"errors"
"errors"
"fmt"
"io"
"io"
"io/ioutil"
"io/ioutil"
golog
"log"
golog
"log"
"net"
"net"
//"strconv"
//"strings"
"sync"
"sync"
"time"
"time"
...
@@ -75,8 +72,6 @@ func NewMdnsService(peerhost host.Host, interval time.Duration) (Service, error)
...
@@ -75,8 +72,6 @@ func NewMdnsService(peerhost host.Host, interval time.Duration) (Service, error)
port
=
addr
.
Port
port
=
addr
.
Port
}
}
fmt
.
Println
(
"using port: "
,
port
)
myid
:=
peerhost
.
ID
()
.
Pretty
()
myid
:=
peerhost
.
ID
()
.
Pretty
()
info
:=
[]
string
{
myid
}
info
:=
[]
string
{
myid
}
...
@@ -135,7 +130,6 @@ func (m *mdnsService) pollForEntries() {
...
@@ -135,7 +130,6 @@ func (m *mdnsService) pollForEntries() {
}
}
func
(
m
*
mdnsService
)
handleEntry
(
e
*
mdns
.
ServiceEntry
)
{
func
(
m
*
mdnsService
)
handleEntry
(
e
*
mdns
.
ServiceEntry
)
{
fmt
.
Println
(
"handling entry!"
)
mpeer
,
err
:=
peer
.
IDB58Decode
(
e
.
Info
)
mpeer
,
err
:=
peer
.
IDB58Decode
(
e
.
Info
)
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Warning
(
"Error parsing peer ID from mdns entry: "
,
err
)
log
.
Warning
(
"Error parsing peer ID from mdns entry: "
,
err
)
...
...
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