diff --git a/examples/multipro/main.go b/examples/multipro/main.go index d3ded936304ab42be9531180ea79d12691f94f82..53efce6cbf674720d037106f7e228edab6e66628 100644 --- a/examples/multipro/main.go +++ b/examples/multipro/main.go @@ -46,6 +46,7 @@ func main() { log.Printf("This is a conversation between %s and %s\n", h1.host.ID(), h2.host.ID()) + // send messages using the protocols h1.pingProtocol.Ping(h2) h2.pingProtocol.Ping(h1) h1.echoProtocol.Echo(h2) diff --git a/examples/multipro/node.go b/examples/multipro/node.go index c35e30d6234682dfbd8edca6b971efe898fc9b6c..7892bfbb8b88061d8efd0bcd67c8fe295a081f5c 100644 --- a/examples/multipro/node.go +++ b/examples/multipro/node.go @@ -46,7 +46,7 @@ func NewMessageData(nodeId string, messageId string, gossip bool) *p2p.MessageDa type Node struct { host host.Host // lib-p2p host pingProtocol *PingProtocol // ping protocol impl - echoProtocol *EchoProtocol // echp protocl imp + echoProtocol *EchoProtocol // echo protocol impl } // create a new node with its implemented protocols