Multiaddr aims to make network addresses future-proof, composable, and efficient.
Address behaves like a collection of [protocol-key value] pairs, which you
can seq through or conj on new [key value] pairs.
This isn't an associative structure on protocol-keys since you can have duplicate pairs and the order of the (key, val) pairs matters (e.g, for cases like tunneling).
See https://github.com/multiformats/multiaddr for more info on format
Multiaddr aims to make network addresses future-proof, composable, and efficient. `Address` behaves like a collection of [protocol-key value] pairs, which you can `seq` through or `conj` on new [key value] pairs. This isn't an associative structure on protocol-keys since you can have duplicate pairs and the order of the (key, val) pairs matters (e.g, for cases like tunneling). See https://github.com/multiformats/multiaddr for more info on format
(create & entries)create address from entries (possibly empty) you can build on
(str (create [[:ip4 "127.0.0.1"][:tcp "80"]]))
"/ip4/127.0.0.1/tcp/80"
create address from entries (possibly empty) you can build on (str (create [[:ip4 "127.0.0.1"][:tcp "80"]])) >> "/ip4/127.0.0.1/tcp/80"
(encode addr)returns byte array representation of address
returns byte array representation of address
(parse address-str)parse a human-readable multiaddr string; the data that backs the result is a packed representation.
The Address result can be treated as a collection over
the [protocol-key value] pairs that you can seq over
or directly (conj addr [key val]) pairs unto
parse a human-readable multiaddr string; the data that backs the result is a packed representation. The `Address` result can be treated as a collection over the [protocol-key value] pairs that you can seq over or directly `(conj addr [key val])` pairs unto
Map from address protocols to attributes used in encoding/decoding
https://github.com/multiformats/multiaddr/blob/master/protocols.csv
Map from address protocols to attributes used in encoding/decoding https://github.com/multiformats/multiaddr/blob/master/protocols.csv
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |