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.
(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.
(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.
(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-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.
(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.
(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.
(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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close