Liking cljdoc? Tell your friends :D

net.transform.split

A generic splitting transducer for collections of ByteBuf instances To help the splitting process, and to allow other types of splitting to occur, two protocols are provided.

A generic splitting transducer for collections of ByteBuf instances
To help the splitting process, and to allow other types of splitting
to occur, two protocols are provided.
raw docstring

bytes-neededclj

(bytes-needed parser kept buf)

Figure out how many bytes need to be read to finish this split.

Figure out how many bytes need to be read to finish this split.
sourceraw docstring

ContentSplittercljprotocol

offerclj

(offer this buf)

Augment a splitter instance with a new buffer, yielding a vector of the updated splitter and a new buffer if one was found.

Augment a splitter instance with a new buffer,
yielding a vector of the updated splitter and
a new buffer if one was found.
source

HeaderParsercljprotocol

header-lengthclj

(header-length this buf)

Yield length of header needed to compute the length of the split, if possible.

Yield length of header needed to compute the length
of the split, if possible.

payload-lengthclj

(payload-length this mark kept buf)

Yield the length of the full split payload, this assumes header-length was called and returned.

Yield the length of the full split payload, this
assumes header-length was called and returned.
source

Initializercljprotocol

initialize!clj

(initialize! this)

Initialize a splitter, called everytime a new buffer is output to reset internal state.

Initialize a splitter, called everytime a new buffer is output
to reset internal state.
source

parse-splitclj

(parse-split stored buf)

With a new buffer, augment a splitter by consuming all data from the buffer. Yields a vector of the augmented splitter and a sequence of new buffers to output, if any.

With a new buffer, augment a splitter by consuming all data from the
buffer. Yields a vector of the augmented splitter and a sequence of
new buffers to output, if any.
sourceraw docstring

raw-splitclj

(raw-split splitter)

A transducer that yields collections of ByteBuf instances, from a collection of ByteBuf instances, splitting with the help of a ContentSplitter implementation.

A transducer that yields collections of ByteBuf instances, from
a collection of ByteBuf instances, splitting with the help of
a ContentSplitter implementation.
sourceraw docstring

splitclj

(split splitter)

Facility function to create a splitter which yields a single collection of ByteBuf instances.

Facility function to create a splitter which yields a single
collection of ByteBuf instances.
sourceraw docstring

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

× close