Liking cljdoc? Tell your friends :D

phlegyas.frames


assembleclj

(assemble frame ftype)

Takes in a frame and frame type, calculates the final size of the frame by adding 5, 4 bytes for the size and 1 byte for the type, looking up type-bytes from the phlegyas.types namespace, and adding the size and type to the sequence.

Takes in a frame and frame type, calculates the final size of the frame
by adding 5, 4 bytes for the size and 1 byte for the type, looking up `type-bytes`
from the `phlegyas.types` namespace, and adding the size and type to the sequence.
sourceraw docstring

assemble-packetclj

(assemble-packet frame)

Takes in a map representing a frame (see frame-layouts in the phlegyas.types namespace, and intro(9P) manual), and encodes it.

Takes in a map representing a frame (see `frame-layouts` in the `phlegyas.types` namespace, and
intro(9P) manual), and encodes it.
sourceraw docstring

disassemble-packetclj

(disassemble-packet packet)

Takes in a byte-array, and attempts to decode it. Produces a map, matching that of the message type found in the phlegyas.types namespace.

Takes in a byte-array, and attempts to decode it. Produces a map, matching that
of the message type found in the `phlegyas.types` namespace.
sourceraw docstring

dispatch-frameclj

(dispatch-frame packet out)

Cuts frames along their boundaries, returning any partially assembled packets back to the frame loop.

Cuts frames along their boundaries, returning any partially assembled packets back to
the frame loop.
sourceraw docstring

frame-assemblerclj

(frame-assembler in out)

Spawn a thread to recursively read from an incoming stream.

Spawn a thread to recursively read from an incoming stream.
sourceraw docstring

frame-lengthcljmacro

(frame-length buffer)

Check reported frame length.

Check reported frame length.
sourceraw docstring

frame-typecljmacro

(frame-type buffer)

Look up frame type in the reverse lookup table reverse-frame-byte, defined in the phlegyas.types namespace, and keywordizes it for us.

Look up frame type in the reverse lookup table `reverse-frame-byte`,
defined in the `phlegyas.types` namespace, and `keywordizes` it for us.
sourceraw docstring

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

× close