29 Commits

Author SHA1 Message Date
Steven Allen
a8637d432a Change QUIC multicodec to a unique number
It conflicted with CBOR.

part of multiformats/multicodec#55
2017-07-30 19:50:20 -07:00
Marten Seemann
22c78388e2
add QUIC 2017-03-17 13:26:26 +07:00
jbenet
bdf3e3a444 added unix path protocol 2016-09-19 11:06:27 +08:00
Ian Preston
e32e9cd0f0 Implemented byte decoder for onion addresses. Corrected onion bit size. 2016-08-09 19:21:28 +01:00
Jeromy
5734f44c3d go vet 2016-05-04 14:03:16 -07:00
Jeromy
ad12fa30fe respond to CR feedback 2016-05-04 13:26:50 -07:00
Jeromy
9c4a0baf6d cleanup panics and make NewFromBytes faster 2016-04-29 14:16:41 -07:00
Jeromy
ae64eb994b rewrite value for protocols and add more tests 2016-01-18 00:35:47 -08:00
Jeromy
a581da3f8f add method to lookup values in a multiaddr 2016-01-17 05:14:38 -08:00
David Stainton
24ecf94c70 Add more multiaddr tests for onions 2015-09-26 01:40:26 +02:00
David Stainton
0e7ae0d2ee Renamed tor to onion and added embedded port field 2015-08-31 03:19:47 +02:00
David Stainton
ed310561bd Add Tor .onion address support and unit test cases 2015-08-29 19:48:07 +02:00
Juan Batiz-Benet
f529ec7884 added http, https, and ipfs protocols 2015-01-17 21:12:54 -08:00
Juan Batiz-Benet
32d9d68b64 ProtocolsWithString 2015-01-09 05:51:16 -08:00
Juan Batiz-Benet
17f4666d01 Protocols now value 2015-01-09 05:37:39 -08:00
Juan Batiz-Benet
ed277d56f8 better errs, and test parsing 2015-01-09 05:30:33 -08:00
Juan Batiz-Benet
59f6cfc921 implement varints + add utp, udt 2014-11-19 13:02:06 -08:00
Juan Batiz-Benet
9d04132166 Split + Join 2014-11-05 02:20:27 -08:00
Juan Batiz-Benet
4a5dcd3a4d Split: added split method 2014-11-04 23:20:17 -08:00
Juan Batiz-Benet
2a572df05c ignore trailing slashes 2014-10-10 20:40:51 -07:00
Juan Batiz-Benet
c90ef4472f New Multiaddr interface
This commit changes the struct to a new Multiaddr interface:

```Go
type Multiaddr interface {
  Equal(Multiaddr) bool
  Bytes() []byte
  String() string
  Protocols() []*Protocol
  Encapsulate(Multiaddr) Multiaddr
  Decapsulate(Multiaddr) Multiaddr
}
```

This means a few things have changed:

- use Multiaddr interface, struct not exported
- Bytes returns a copy of the internal bytes
- Some methods no longer return errors (catch errors in NewMultiaddr)
  - String (panics if malformed)
  - Protocols (panics if malformed)
  - Decapsulate (no-op if not prefix)
- Moved net-specific functions to package
  - Multiaddr.DialArgs() -> DialArgs(Multiaddr)
  - Multiaddr.IsThinWaist() -> IsThinWaist(Multiaddr)

cc @whyrusleeping @perfmode
2014-10-06 03:27:29 -07:00
Juan Batiz-Benet
bd30912d08 Multiaddr.String no error
The error in String should not actually ocurr, as the multiaddr
should have been valid to be constructed successfully, and thus
should be encoded back to its string rep correctly.

This will be bolstered by creating an interface (to prevent messing
with the internal bytes)
2014-10-06 02:39:00 -07:00
Juan Batiz-Benet
74443fca31 Added Equal func 2014-09-16 06:08:48 -07:00
Juan Batiz-Benet
b90678896b go lint + unexporting some funcs 2014-09-11 10:47:56 -07:00
Juan Batiz-Benet
99196c0d23 dialing + consts 2014-07-07 01:25:20 -07:00
Juan Batiz-Benet
9033141fca gofmt 2014-07-04 11:21:39 -07:00
Juan Batiz-Benet
3855a29d4e en/decapsulation 2014-07-04 00:48:33 -07:00
Juan Batiz-Benet
e20c5b9d3b protocols 2014-07-04 00:12:33 -07:00
Juan Batiz-Benet
c5510ff4b8 string <> []byte 2014-07-03 23:42:24 -07:00