439 Commits

Author SHA1 Message Date
Juan Batiz-Benet
fb33680d08 net: added InterfaceMultiaddrs 2014-11-05 00:38:21 -08:00
Juan Batiz-Benet
4489dfa8c5 net: added InterfaceMultiaddrs 2014-11-05 00:38:21 -08:00
Juan Batiz-Benet
5d64ba1250 Cast and Loopback 2014-11-05 00:04:30 -08:00
Juan Batiz-Benet
bb34b84e84 Cast and Loopback 2014-11-05 00:04:30 -08:00
Juan Batiz-Benet
76ea093a04 multiaddr conversion tool 2014-11-04 23:51:11 -08:00
Juan Batiz-Benet
5f35e6d949 multiaddr conversion tool 2014-11-04 23:51:11 -08:00
Juan Batiz-Benet
4a5dcd3a4d Split: added split method 2014-11-04 23:20:17 -08:00
Juan Batiz-Benet
d43f6afdd9 removed url from readme 2014-10-11 03:30:15 -07:00
Juan Batiz-Benet
68a20675cb Merge pull request #10 from jbenet/net
net subpackage
2014-10-11 03:01:36 -07:00
Juan Batiz-Benet
a104069971 added travis.yml 2014-10-11 02:30:03 -07:00
Juan Batiz-Benet
e94d248a76 tests: Dial + Listen 2014-10-11 02:28:34 -07:00
Juan Batiz-Benet
d169b2f21d tests: Dial + Listen 2014-10-11 02:28:34 -07:00
Juan Batiz-Benet
a991297e5e basic net package (no tests yet)
Implements:
- Conn
- Dial, Dialer
- Listen, Listener
2014-10-11 01:23:55 -07:00
Juan Batiz-Benet
83543fff5d basic net package (no tests yet)
Implements:
- Conn
- Dial, Dialer
- Listen, Listener
2014-10-11 01:23:55 -07:00
Juan Batiz-Benet
81b6210ce5 documentation 2014-10-11 01:23:37 -07:00
Juan Batiz-Benet
7d1a12d59b documentation 2014-10-11 01:23:37 -07:00
Juan Batiz-Benet
dc978d4bc3 moved net stuff into subpkg 2014-10-11 00:50:55 -07:00
Juan Batiz-Benet
01c7b7934d moved net stuff into subpkg 2014-10-11 00:50:55 -07:00
Juan Batiz-Benet
2a572df05c ignore trailing slashes 2014-10-10 20:40:51 -07:00
Juan Batiz-Benet
351b5d0f14 ToNetAddr + tests. 2014-10-10 20:31:19 -07:00
Juan Batiz-Benet
1ec9436b1d docs 2014-10-06 04:05:20 -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
cca60aba88 Merge pull request #9 from ehmry/master
ipv6 support for DialArgs
2014-09-28 16:48:54 -07:00
Emery Hemingway
81e75c7145 ipv6 support for DialArgs 2014-09-28 19:23:34 -04:00
Juan Batiz-Benet
baeeb60a74 MIT license 2014-09-28 15:21:18 -07:00
Juan Batiz-Benet
74443fca31 Added Equal func 2014-09-16 06:08:48 -07:00
Juan Batiz-Benet
0624ab3bf7 net.Addr -> Multiaddr 2014-09-13 04:51:39 -07:00
Juan Batiz-Benet
a4b7753f74 use constants, fix ipv6 bug 2014-09-13 04:47:37 -07:00
Juan Batiz-Benet
b90678896b go lint + unexporting some funcs 2014-09-11 10:47:56 -07:00
Juan Batiz-Benet
6ee313e6db do not accept invalid-start multiaddrs 2014-09-11 10:45:20 -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
3f5984c93d panic handler + construct 2014-07-03 23:52:58 -07:00
Juan Batiz-Benet
47a6842e35 rm convert 2014-07-03 23:44:09 -07:00
Juan Batiz-Benet
c5510ff4b8 string <> []byte 2014-07-03 23:42:24 -07:00
Juan Batiz-Benet
ddfe13152f Big things have small beginnings. 2014-07-03 21:18:09 -07:00