updated go-multiaddr-net (disabled utp)
Juan Batiz-Benet committed
Jan 9, 2015 at 06:10 UTC
e1a0486e155755c0c17ab47f9f284a4df91058e2
6 files changed
+22
-18
Godeps/Godeps.json
+1
-1
@@ -127,7 +127,7 @@
127
},
128
{
129
"ImportPath": "github.com/jbenet/go-multiaddr-net",
130
- "Rev": "b6265d8119558acf3912db44abb34d97c30c3220"
130
+ "Rev": "2b8f35303d2855c79f9f3f9b3584338a1ff7edbd"
131
},
132
{
133
"ImportPath": "github.com/jbenet/go-multihash",
Godeps/_workspace/src/github.com/jbenet/go-multiaddr-net/Godeps/Godeps.json
+2
-2
@@ -11,8 +11,8 @@
11
},
12
{
13
"ImportPath": "github.com/jbenet/go-multiaddr",
14
- "Comment": "0.1.2-30-g99cf3ed",
15
- "Rev": "99cf3edc711751cf7b43505fac0e3913f6b9a75c"
14
+ "Comment": "0.1.2-34-g0d7b54b",
15
+ "Rev": "0d7b54ba432fda14bac37cdad717bd6270eacc85"
16
}
17
]
18
}
Godeps/_workspace/src/github.com/jbenet/go-multiaddr-net/multiaddr/multiaddr
Binary files a/Godeps/_workspace/src/github.com/jbenet/go-multiaddr-net/multiaddr/multiaddr and b/Godeps/_workspace/src/github.com/jbenet/go-multiaddr-net/multiaddr/multiaddr differ
Godeps/_workspace/src/github.com/jbenet/go-multiaddr-net/multiaddr/multiaddr.go
+2
-2
@@ -10,8 +10,8 @@ import (
10
manet "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr-net"
11
)
12
13
-// flags
14
-var formats = []string{"string", "bytes", "hex", "slice"}
13
+var formats = []string{"string", "bytes", // flags
14
+"hex", "slice"}
15
var format string
16
var hideLoopback bool
17
Godeps/_workspace/src/github.com/jbenet/go-multiaddr-net/net.go
+15
-12
@@ -4,7 +4,7 @@ import (
4
"fmt"
5
"net"
6
7
- utp "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/h2so5/utp"
7
+ // utp "github.com/jbenet/go-multiaddr-net/Godeps/_workspace/src/github.com/h2so5/utp"
8
ma "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
9
)
10
@@ -112,16 +112,18 @@ func (d *Dialer) Dial(remote ma.Multiaddr) (Conn, error) {
112
return nil, err
113
}
114
case "utp":
115
- // construct utp dialer, with options on our net.Dialer
116
- utpd := utp.Dialer{
117
- Timeout: d.Dialer.Timeout,
118
- LocalAddr: d.Dialer.LocalAddr,
119
- }
120
-
121
- nconn, err = utpd.Dial(rnet, rnaddr)
122
- if err != nil {
123
- return nil, err
124
- }
115
+ return nil, fmt.Errorf("utp is currently broken")
116
+
117
+ // // construct utp dialer, with options on our net.Dialer
118
+ // utpd := utp.Dialer{
119
+ // Timeout: d.Dialer.Timeout,
120
+ // LocalAddr: d.Dialer.LocalAddr,
121
+ // }
122
+ //
123
+ // nconn, err = utpd.Dial(rnet, rnaddr)
124
+ // if err != nil {
125
+ // return nil, err
126
+ // }
127
}
128
129
// get local address (pre-specified or assigned within net.Conn)
@@ -225,7 +227,8 @@ func Listen(laddr ma.Multiaddr) (Listener, error) {
227
var nl net.Listener
228
switch lnet {
229
case "utp":
228
- nl, err = utp.Listen(lnet, lnaddr)
230
+ // nl, err = utp.Listen(lnet, lnaddr)
231
+ return nil, fmt.Errorf("utp is currently broken")
232
default:
233
nl, err = net.Listen(lnet, lnaddr)
234
}
Godeps/_workspace/src/github.com/jbenet/go-multiaddr-net/net_test.go
+2
-1
@@ -165,7 +165,7 @@ func TestListenAddrs(t *testing.T) {
165
test("/ip4/127.0.0.1/tcp/4324", true)
166
test("/ip4/127.0.0.1/udp/4325", false)
167
test("/ip4/127.0.0.1/udp/4326/udt", false)
168
- test("/ip4/127.0.0.1/udp/4326/utp", true)
168
+ // test("/ip4/127.0.0.1/udp/4326/utp", true)
169
}
170
171
func TestListenAndDial(t *testing.T) {
@@ -230,6 +230,7 @@ func TestListenAndDial(t *testing.T) {
230
}
231
232
func TestListenAndDialUTP(t *testing.T) {
233
+ t.Skip("utp is broken")
234
235
maddr := newMultiaddr(t, "/ip4/127.0.0.1/udp/4323/utp")
236
listener, err := Listen(maddr)