mirror of
https://source.quilibrium.com/quilibrium/ceremonyclient.git
synced 2024-12-27 17:15:18 +00:00
27 lines
565 B
Go
27 lines
565 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"github.com/libp2p/go-libp2p"
|
||
|
"github.com/libp2p/go-libp2p/p2p/transport/tcp"
|
||
|
"github.com/libp2p/go-libp2p/p2p/transport/websocket"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
transports := libp2p.ChainOptions(
|
||
|
libp2p.Transport(tcp.NewTCPTransport),
|
||
|
libp2p.Transport(websocket.New),
|
||
|
)
|
||
|
|
||
|
// TODO: add some listen addresses with the libp2p.ListenAddrs or
|
||
|
// libp2p.ListenAddrStrings configuration options.
|
||
|
|
||
|
host, err := libp2p.New(transports)
|
||
|
if err != nil {
|
||
|
panic(err)
|
||
|
}
|
||
|
|
||
|
// TODO: with our host made, let's connect to our bootstrap peer
|
||
|
|
||
|
host.Close()
|
||
|
}
|