(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.
(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.
(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.
(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.
(frame-assembler in out)
Spawn a thread to recursively read from an incoming stream.
Spawn a thread to recursively read from an incoming stream.
(frame-length buffer)
Check reported frame length.
Check reported frame length.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close