You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/concepts/fundamentals/protocols.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ developer-friendly and enables [easier matching by version](#match-using-semver)
47
47
#### Handler functions
48
48
49
49
To accept connections, a libp2p application will register handler functions for protocols using their protocol id with the
50
-
[switch][definition_switch] (aka "swarm"), or a higher level interface such as [go's Host interface](https://github.com/libp2p/go-libp2p-core/blob/master/host/host.go).
50
+
[switch][definition_switch] (aka "swarm"), or a higher level interface such as [go's Host interface](https://github.com/libp2p/go-libp2p/blob/master/core/host/host.go).
51
51
52
52
The handler function will be invoked when an incoming stream is tagged with the registered protocol id.
53
53
If you register your handler with a [match function](#using-a-match-function), you can choose whether
Copy file name to clipboardExpand all lines: content/guides/getting-started/go.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -197,7 +197,7 @@ Now that we have the ability to configure and start libp2p nodes, we can start c
197
197
A node started with go-libp2p will run its own ping protocol by default, but let's disable it and
198
198
set it up manually to demonstrate the process of running protocols by registering stream handlers.
199
199
200
-
The object returned from `libp2p.New` implements the [Host interface](https://pkg.go.dev/github.com/libp2p/go-libp2p-core/host#Host),
200
+
The object returned from `libp2p.New` implements the [Host interface](https://pkg.go.dev/github.com/libp2p/go-libp2p/core/host#Host),
201
201
and we'll use the `SetStreamHandler` method to set a handler for our ping protocol.
202
202
203
203
First, let's add the `github.com/libp2p/go-libp2p/p2p/protocol/ping` package to our list of
@@ -247,15 +247,15 @@ send it ping messages.
247
247
248
248
We'll first expand the log message that we've been printing after starting the node to include
249
249
its `PeerId` value, as we'll need that to instruct other nodes to connect to it. Let's import the
250
-
`github.com/libp2p/go-libp2p-core/peer` package and use it to replace the "Listen addresses" log
250
+
`github.com/libp2p/go-libp2p/core/peer` package and use it to replace the "Listen addresses" log
251
251
message with something that prints both the listen address and the `PeerId` as a multiaddr string:
0 commit comments