Browse Source

Dependancy: Remove depricated multiaddr-net

Switch to multiaddr/net
pull/1422/head
M. Hawn 4 years ago
parent
commit
94f5bc4aa6
  1. 2
      p2p/transport/websocket/addrs.go
  2. 2
      p2p/transport/websocket/listener.go
  3. 2
      p2p/transport/websocket/websocket.go
  4. 4
      p2p/transport/websocket/websocket_browser.go
  5. 2
      p2p/transport/websocket/websocket_native.go

2
p2p/transport/websocket/addrs.go

@ -6,7 +6,7 @@ import (
"net/url" "net/url"
ma "github.com/multiformats/go-multiaddr" ma "github.com/multiformats/go-multiaddr"
manet "github.com/multiformats/go-multiaddr-net" manet "github.com/multiformats/go-multiaddr/net"
) )
// Addr is an implementation of net.Addr for WebSocket. // Addr is an implementation of net.Addr for WebSocket.

2
p2p/transport/websocket/listener.go

@ -8,7 +8,7 @@ import (
"net/http" "net/http"
ma "github.com/multiformats/go-multiaddr" ma "github.com/multiformats/go-multiaddr"
manet "github.com/multiformats/go-multiaddr-net" manet "github.com/multiformats/go-multiaddr/net"
) )
type listener struct { type listener struct {

2
p2p/transport/websocket/websocket.go

@ -9,7 +9,7 @@ import (
tptu "github.com/libp2p/go-libp2p-transport-upgrader" tptu "github.com/libp2p/go-libp2p-transport-upgrader"
ma "github.com/multiformats/go-multiaddr" ma "github.com/multiformats/go-multiaddr"
mafmt "github.com/multiformats/go-multiaddr-fmt" mafmt "github.com/multiformats/go-multiaddr-fmt"
manet "github.com/multiformats/go-multiaddr-net" manet "github.com/multiformats/go-multiaddr/net"
) )
// WsProtocol is the multiaddr protocol definition for this transport. // WsProtocol is the multiaddr protocol definition for this transport.

4
p2p/transport/websocket/websocket_browser.go

@ -9,7 +9,7 @@ import (
"github.com/libp2p/go-libp2p-core/transport" "github.com/libp2p/go-libp2p-core/transport"
ma "github.com/multiformats/go-multiaddr" ma "github.com/multiformats/go-multiaddr"
manet "github.com/multiformats/go-multiaddr-net" manet "github.com/multiformats/go-multiaddr/net"
) )
func (t *WebsocketTransport) maDial(ctx context.Context, raddr ma.Multiaddr) (manet.Conn, error) { func (t *WebsocketTransport) maDial(ctx context.Context, raddr ma.Multiaddr) (manet.Conn, error) {
@ -29,7 +29,7 @@ func (t *WebsocketTransport) maDial(ctx context.Context, raddr ma.Multiaddr) (ma
conn.Close() conn.Close()
return nil, err return nil, err
} }
return mnc, nil return mnc, nil
} }

2
p2p/transport/websocket/websocket_native.go

@ -11,7 +11,7 @@ import (
ws "github.com/gorilla/websocket" ws "github.com/gorilla/websocket"
"github.com/libp2p/go-libp2p-core/transport" "github.com/libp2p/go-libp2p-core/transport"
ma "github.com/multiformats/go-multiaddr" ma "github.com/multiformats/go-multiaddr"
manet "github.com/multiformats/go-multiaddr-net" manet "github.com/multiformats/go-multiaddr/net"
) )
// Default gorilla upgrader // Default gorilla upgrader

Loading…
Cancel
Save