Liking cljdoc? Tell your friends :D

multiformats.address

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
raw docstring

Addresscljs

source

code->protocolclj/s

source

createclj/s

(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" 
sourceraw docstring

decodeclj/s

(decode data)

Decode address from byte array

Decode address from byte array
sourceraw docstring

encodeclj/s

(encode addr)

returns byte array representation of address

returns byte array representation of address
sourceraw docstring

parseclj/s

(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
sourceraw docstring

protocol->attrsclj/s

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
sourceraw docstring

protocol->codeclj/s

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close