A netstring and bencode implementation for Clojure.
A netstring and bencode implementation for Clojure.
(read-bencode input)
Read bencode token from the input stream.
Read bencode token from the input stream.
(read-netstring input)
Reads a classic netstring from input—an InputStream. Returns the contained binary data as byte array.
Reads a classic netstring from input—an InputStream. Returns the contained binary data as byte array.
(read-nrepl-message input)
Sames as read-bencode
, but ensure that the top-level value is a map as
expected by the nREPL protocol.
Sames as `read-bencode`, but ensure that the top-level value is a map as expected by the nREPL protocol.
(write-bencode output thing)
Write the given thing to the output stream. “Thing” means here a string, map, sequence or integer. Alternatively an ByteArray may be provided whose contents are written as a bytestring. Similar the contents of a given InputStream are written as a byte string. Named things (symbols or keywords) are written in the form 'namespace/name'.
Write the given thing to the output stream. “Thing” means here a string, map, sequence or integer. Alternatively an ByteArray may be provided whose contents are written as a bytestring. Similar the contents of a given InputStream are written as a byte string. Named things (symbols or keywords) are written in the form 'namespace/name'.
(write-netstring output content)
Write the given binary data to the output stream in form of a classic netstring.
Write the given binary data to the output stream in form of a classic netstring.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close