API for gloss.io

by Unknown

Usage:
(ns your-namespace
  (:require gloss.io))

Overview



Public Variables and Functions



contiguous

function
Usage: (contiguous buf-seq)
Takes a sequence of ByteBuffers and returns a single contiguous ByteBuffer.


decode

function
Usage: (decode frame bytes)
Turns bytes into a single frame value.  If there are too few or too many bytes
for the frame, an exception is thrown.


decode-all

function
Usage: (decode-all frame bytes)
Turns bytes into a sequence of frame values.  If there are bytes left over at the end
of the sequence, an exception is thrown.


decode-channel

function
Usage: (decode-channel src frame)
Given a channel that emits bytes, returns a channel that emits decoded frames whenever
there are sufficient bytes.


decode-channel-headers

function
Usage: (decode-channel-headers src & frames)
Given a channel that emits bytes, returns a channel that will emit one decoded frame for
each frame passed into the function.  After those frames have been decoded, the channel will
simply emit any bytes that are passed into the source channel.


encode

function
Usage: (encode frame val)
Turns a frame value into a sequence of ByteBuffers.


encode-all

function
Usage: (encode-all frame vals)
Turns a sequence of frame values into a sequence of ByteBuffers.


encode-to-buffer

function
Usage: (encode-to-buffer frame buf vals)
Encodes a sequence of values, and writes them to a ByteBuffer.


encode-to-stream

function
Usage: (encode-to-stream frame output-stream vals)
Encodes a sequence of values, and writes them to an OutputStream.


to-buf-seq

function
Usage: (to-buf-seq x)
Converts the value to a sequence of ByteBuffers.


to-byte-buffer

function
Usage: (to-byte-buffer x)
Converts the value to a Bytebuffer.
Logo & site design by Tom Hickey.
Clojure auto-documentation system by Tom Faulhaber.