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
64a07357
Commit
64a07357
authored
Dec 08, 2017
by
Steven Allen
Browse files
gx-go unrewrite
parent
05928a94
Changes
4
Show whitespace changes
Inline
Side-by-side
examples/multipro/echo.go
View file @
64a07357
...
...
@@ -6,13 +6,13 @@ import (
"fmt"
"log"
inet
"g
x/ipfs/QmbD5yKbXahNvoMqzeuNyKQA9vAs9fUvJg2GXeWU1fVqY5
/go-libp2p-net"
inet
"g
ithub.com/libp2p
/go-libp2p-net"
p2p
"github.com/avive/go-libp2p/examples/multipro/pb"
uuid
"github.com/google/uuid"
assert
"github.com/ipfs/go-ipfs/thirdparty/assert"
"github.com/libp2p/go-libp2p-host"
protobufCodec
"github.com/multiformats/go-multicodec/protobuf"
"gx/ipfs/QmRS46AyqtpJBsf1zmQdeizSDEzo1qkWR7rdEuPFAv8237/go-libp2p-host"
)
// pattern: /protocol-name/request-or-response-message/version
...
...
examples/multipro/main.go
View file @
64a07357
...
...
@@ -6,12 +6,12 @@ import (
"log"
"math/rand"
crypto
"github.com/libp2p/go-libp2p-crypto"
peer
"github.com/libp2p/go-libp2p-peer"
ps
"github.com/libp2p/go-libp2p-peerstore"
swarm
"github.com/libp2p/go-libp2p-swarm"
bhost
"github.com/libp2p/go-libp2p/p2p/host/basic"
ps
"gx/ipfs/QmPgDWmTmuzvP7QE5zwo1TmjbJme9pmZHNujB2453jkCTr/go-libp2p-peerstore"
swarm
"gx/ipfs/QmU219N3jn7QadVCeBUqGnAkwoXoUomrCwDuVQVuL7PB5W/go-libp2p-swarm"
ma
"gx/ipfs/QmXY77cVe7rVRQXZZQRioukUM7aRW3BTcAgJe12MCtb3Ji/go-multiaddr"
peer
"gx/ipfs/QmXYjuNuxVzXKJCfWasQk1RqkhVLDM9jtUKhqc2WPQmFSB/go-libp2p-peer"
crypto
"gx/ipfs/QmaPbCnUMBohSGo3KnxEa2bHqyJVVeEEcwtqJAYxerieBo/go-libp2p-crypto"
ma
"github.com/multiformats/go-multiaddr"
)
// helper method - create a lib-p2p host to listen on a port
...
...
examples/multipro/node.go
View file @
64a07357
...
...
@@ -7,11 +7,11 @@ import (
p2p
"github.com/avive/go-libp2p/examples/multipro/pb"
"github.com/gogo/protobuf/proto"
crypto
"github.com/libp2p/go-libp2p-crypto"
host
"github.com/libp2p/go-libp2p-host"
inet
"github.com/libp2p/go-libp2p-net"
peer
"github.com/libp2p/go-libp2p-peer"
protobufCodec
"github.com/multiformats/go-multicodec/protobuf"
host
"gx/ipfs/QmRS46AyqtpJBsf1zmQdeizSDEzo1qkWR7rdEuPFAv8237/go-libp2p-host"
peer
"gx/ipfs/QmXYjuNuxVzXKJCfWasQk1RqkhVLDM9jtUKhqc2WPQmFSB/go-libp2p-peer"
crypto
"gx/ipfs/QmaPbCnUMBohSGo3KnxEa2bHqyJVVeEEcwtqJAYxerieBo/go-libp2p-crypto"
inet
"gx/ipfs/QmbD5yKbXahNvoMqzeuNyKQA9vAs9fUvJg2GXeWU1fVqY5/go-libp2p-net"
)
// node client version
...
...
examples/multipro/ping.go
View file @
64a07357
...
...
@@ -8,9 +8,9 @@ import (
p2p
"github.com/avive/go-libp2p/examples/multipro/pb"
uuid
"github.com/google/uuid"
"github.com/libp2p/go-libp2p-host"
inet
"github.com/libp2p/go-libp2p-net"
protobufCodec
"github.com/multiformats/go-multicodec/protobuf"
"gx/ipfs/QmRS46AyqtpJBsf1zmQdeizSDEzo1qkWR7rdEuPFAv8237/go-libp2p-host"
inet
"gx/ipfs/QmbD5yKbXahNvoMqzeuNyKQA9vAs9fUvJg2GXeWU1fVqY5/go-libp2p-net"
)
// pattern: /protocol-name/request-or-response-message/version
...
...
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