-
Notifications
You must be signed in to change notification settings - Fork 18
WIP: Add support for new Protocol and Multiaddr format #26
base: webrtc-signal-protocol
Are you sure you want to change the base?
WIP: Add support for new Protocol and Multiaddr format #26
Conversation
@@ -55,7 +55,7 @@ github.com/huin/goupnp v0.0.0-20180415215157-1395d1447324 h1:PV190X5/DzQ/tbFFG5Y | |||
github.com/huin/goupnp v0.0.0-20180415215157-1395d1447324/go.mod h1:MZ2ZmwcBpvOoJ22IJsc7va19ZwoheaBk43rKg12SKag= | |||
github.com/ipfs/go-cid v0.0.1 h1:GBjWPktLnNyX0JiQCNFpUuUSoMw5KMyqrsejHYlILBE= | |||
github.com/ipfs/go-cid v0.0.1/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= | |||
github.com/ipfs/go-datastore v0.0.1/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= | |||
github.com/ipfs/go-datastore v0.0.1/go.mod h1:bYmHO9fuKO1Ca7dpdDBWQl0mndy5b0HFqSJjGlNYtzs= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was seeing some errors about a checksum mismatch. Manually changing this line fixed them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this can be fixed (dependency removed entirely) by dropping the examples.
var _ transport.Transport = &Transport{} | ||
|
||
// Fmt is the Multiaddress format for WebRTC | ||
var Fmt = mafmt.And(mafmt.HTTP, mafmt.Base(Protocol.Code)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, we're only supporting signaling over HTTP. In the future it should be possible to support many different transports. Hopefully we can rely on existing code in libp2p to set up a connection (likely a Stream
) using an arbitrary transport.
@@ -9,7 +9,6 @@ import ( | |||
|
|||
var log = logging.Logger("webrtcdirect-tpt") | |||
|
|||
var webrtcma, _ = ma.NewMultiaddr("/p2p-webrtc-direct") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the new Multiaddress format requires a peer id after p2p-webrtc
, we can't create it statically anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
This is a stepping stone toward implementing the generic WebRTC Signal Protocol described in libp2p/specs#159.
This PR doesn't change the behavior of the transport. It still only supports browser-server and server-server connections and doesn't use any third-parties for signaling. Rather, this PR lays the groundwork for implementing new features in the future.