Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the cl-netstring+ Reference Manual, generated automatically by Declt version 3.0 "Montgomery Scott" on Mon Apr 19 15:05:53 2021 GMT+0.
• Introduction | What cl-netstring+ is all about | |
• Systems | The systems documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
* About CL-NETSTRING+ is a library for working with a modified form of [[http://cr.yp.to/proto/netstrings.txt][netstrings]]. * Netstring+ Format The Netstring+ format is identical to the [[http://cr.yp.to/proto/netstrings.txt][netstring]] format except for two details: 1. The header is written in (printed) hexadecimal instead of decimal, and UTF-8 encoding is specified for non-data portions. 2. The terminating character is =\n= (linefeed) instead of a comma. These two changes were made for readability and portability reasons. Separating messages with a linefeed is easier to read with long messages than a comma (particularly if commas may appear in the message). A hexadecimal header aligns well when the size of messages must be stored in a fixed-size type: determining whether a message length is too long is a matter of counting digits, rather than converting bases. * API : (defun write-netstring-bytes (stream data)) Netstring+-encode a byte-vector =data= and write it to =stream=. =stream= must be a byte-stream. : (defun read-netstring-data (stream)) Return a byte-vector of Netstring+-decoded data from =stream=. =stream= must be a byte-stream. : (defun netstring-bytes (data)) Return a byte-vector of the Netstring+-encoded =data=. : (defun netstring-data (bytes)) Return the byte-vector encoded in the Netstring+ =bytes=. : (defmacro data (sequence)) This macro is used to precompute static Netstring+ data at macroexpansion-time. =sequence= is a byte-vector of data to be encoded. : (defmacro str (string)) Like =data=, this macro precomputes a static Netstring+ at macroexpansion-time, except that =string= will be UTF-8 encoded before the Netstring+ is produced. * Future TODOs - Document conditions that may be signalled. - Consider using fast-io for some of the byte-vector stuff. - Add a resynchronizing restart when there is a read error.
Next: Files, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The cl-netstring+ system |
Matthew Stickney <mtstickney@gmail.com>
MIT
A simple library for sending and receiving messages with a netstring-like encoding.
cl-netstring+.asd (file)
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
• The cl-netstring+.asd file | ||
• The cl-netstring+/package.lisp file | ||
• The cl-netstring+/netstring-plus.lisp file |
Next: The cl-netstring+/package․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
cl-netstring+.asd
cl-netstring+ (system)
Next: The cl-netstring+/netstring-plus․lisp file, Previous: The cl-netstring+․asd file, Up: Lisp files [Contents][Index]
cl-netstring+ (system)
package.lisp
Previous: The cl-netstring+/package․lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
cl-netstring+ (system)
netstring-plus.lisp
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The cl-netstring+ package |
package.lisp (file)
nsp
common-lisp
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported macros | ||
• Exported functions |
Next: Exported functions, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
netstring-plus.lisp (file)
netstring-plus.lisp (file)
Previous: Exported macros, Up: Exported definitions [Contents][Index]
netstring-plus.lisp (file)
netstring-plus.lisp (file)
Return a netstring encoding for the concatenation of DATAE.
netstring-plus.lisp (file)
netstring-plus.lisp (file)
Return the size of the next chunk of data that STATE expects as an efficiency hint.
netstring-plus.lisp (file)
netstring-plus.lisp (file)
netstring-plus.lisp (file)
netstring-plus.lisp (file)
netstring-plus.lisp (file)
netstring-plus.lisp (file)
netstring-plus.lisp (file)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal functions | ||
• Internal generic functions | ||
• Internal conditions | ||
• Internal classes |
Next: Internal generic functions, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
netstring-plus.lisp (file)
netstring-plus.lisp (file)
Return T if CODE is the ASCII value for a hexadecimal digit, NIL otherwise.
netstring-plus.lisp (file)
netstring-plus.lisp (file)
Next: Internal conditions, Previous: Internal functions, Up: Internal definitions [Contents][Index]
netstring-plus.lisp (file)
netstring-plus.lisp (file)
netstring-plus.lisp (file)
automatically generated reader method
netstring-plus.lisp (file)
automatically generated writer method
netstring-plus.lisp (file)
automatically generated reader method
netstring-plus.lisp (file)
automatically generated writer method
netstring-plus.lisp (file)
automatically generated reader method
netstring-plus.lisp (file)
automatically generated writer method
netstring-plus.lisp (file)
Next: Internal classes, Previous: Internal generic functions, Up: Internal definitions [Contents][Index]
Condition representing a netstring header with no size digits.
netstring-plus.lisp (file)
netstring-parse-error (condition)
Condition representing an invalid character in a netstring header.
netstring-plus.lisp (file)
netstring-parse-error (condition)
invalid-char (method)
:char
invalid-char (generic function)
Generic condition representing all netstring parse errors.
netstring-plus.lisp (file)
error (condition)
Condition representing a missing terminator after the data bytes.
netstring-plus.lisp (file)
netstring-parse-error (condition)
:expected-size
expected-size (generic function)
:found
found-char (generic function)
Previous: Internal conditions, Up: Internal definitions [Contents][Index]
netstring-plus.lisp (file)
standard-object (class)
:state
state (generic function)
(setf state) (generic function)
:size
size (generic function)
(setf size) (generic function)
:data
msg-data (generic function)
(setf msg-data) (generic function)
Initarg | Value |
---|---|
:state | :initial |
:size | 0 |
:data | nil |
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | C F L |
---|
Jump to: | C F L |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | (
A D E F G I M N P R S T W |
---|
Jump to: | (
A D E F G I M N P R S T W |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | D E F I M S |
---|
Jump to: | D E F I M S |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | C D E I N P S T |
---|
Jump to: | C D E I N P S T |
---|