The chunga Reference Manual

This is the chunga Reference Manual, version 1.1.8, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 14:54:35 2024 GMT+0.

Table of Contents


1 Systems

The main system appears first, followed by any subsystem dependency.


1.1 chunga

License

BSD

Version

1.1.8

Dependency

trivial-gray-streams (system).

Source

chunga.asd.

Child Components

2 Files

Files are sorted by type and then listed depth-first from the systems components trees.


2.1 Lisp


2.1.1 chunga/chunga.asd

Source

chunga.asd.

Parent Component

chunga (system).

ASDF Systems

chunga.


2.1.2 chunga/packages.lisp

Source

chunga.asd.

Parent Component

chunga (system).

Packages

chunga.


2.1.3 chunga/specials.lisp

Dependency

packages.lisp (file).

Source

chunga.asd.

Parent Component

chunga (system).

Public Interface
Internals

2.1.4 chunga/util.lisp

Dependency

specials.lisp (file).

Source

chunga.asd.

Parent Component

chunga (system).

Public Interface
Internals

2.1.5 chunga/known-words.lisp

Dependency

util.lisp (file).

Source

chunga.asd.

Parent Component

chunga (system).

Public Interface
Internals

2.1.6 chunga/conditions.lisp

Dependency

known-words.lisp (file).

Source

chunga.asd.

Parent Component

chunga (system).

Public Interface
Internals

2.1.7 chunga/read.lisp

Dependency

conditions.lisp (file).

Source

chunga.asd.

Parent Component

chunga (system).

Public Interface
Internals

2.1.8 chunga/streams.lisp

Dependency

read.lisp (file).

Source

chunga.asd.

Parent Component

chunga (system).

Public Interface
Internals

2.1.9 chunga/input.lisp

Dependency

streams.lisp (file).

Source

chunga.asd.

Parent Component

chunga (system).

Public Interface
Internals

2.1.10 chunga/output.lisp

Dependency

input.lisp (file).

Source

chunga.asd.

Parent Component

chunga (system).

Public Interface
Internals

3 Packages

Packages are listed by definition order.


3.1 chunga

Source

packages.lisp.

Use List
  • common-lisp.
  • trivial-gray-streams.
Public Interface
Internals

4 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


4.1 Public Interface


4.1.1 Special variables

Special Variable: *accept-bogus-eols*

Some web servers do not respond with a correct CRLF line ending for HTTP headers but with a lone linefeed or carriage return instead. If this variable is bound to a true value, READ-LINE* will treat a lone LF or CR character as an acceptable end of line. The initial value is NIL.

Package

chunga.

Source

specials.lisp.

Special Variable: *current-error-message*

Used by the parsing functions in ‘read.lisp’ as an introduction to a standardized error message about unexpected characters unless it is NIL.

Package

chunga.

Source

specials.lisp.

Special Variable: *treat-semicolon-as-continuation*

According to John Foderaro, Netscape v3 web servers bogusly split Set-Cookie headers over multiple lines which means that we’d have to treat Set-Cookie headers ending with a semicolon as incomplete and combine them with the next header. This will only be done if this variable has a true value, though.

Package

chunga.

Source

specials.lisp.


4.1.2 Macros

Macro: with-character-stream-semantics (&body body)

Binds *CHAR-BUFFER* around BODY so that within BODY we can use READ-CHAR* and friends (see above) to simulate a character stream although we’re reading from a binary stream.

Package

chunga.

Source

util.lisp.


4.1.3 Ordinary functions

Function: as-capitalized-string (keyword)

Kind of the inverse of AS-KEYWORD. Has essentially the same effect as STRING-CAPITALIZE but is optimized for "known" keywords like :CONTENT-LENGTH or :GET.

Package

chunga.

Source

known-words.lisp.

Function: as-keyword (string &key destructivep)

Converts the string STRING to a keyword where all characters are uppercase or lowercase, taking into account the current readtable case. Might destructively modify STRING if DESTRUCTIVEP is true which is the default. "Knows" several HTTP header names and methods and is optimized to not call INTERN for these.

Package

chunga.

Source

known-words.lisp.

Function: assert-char (stream expected-char)

Reads the next character from STREAM and checks if it is the character EXPECTED-CHAR. Signals an error otherwise.

Package

chunga.

Source

read.lisp.

Function: make-chunked-stream (stream)

Creates and returns a chunked stream (a stream of type CHUNKED-STREAM) which wraps STREAM. STREAM must be an open binary stream.

Package

chunga.

Source

streams.lisp.

Function: peek-char* (stream &optional eof-error-p eof-value)

We’re simulating PEEK-CHAR by reading a character and putting it into *CHAR-BUFFER*.

Package

chunga.

Source

util.lisp.

Function: read-char* (stream &optional eof-error-p eof-value)

The streams we’re dealing with are all binary with element type (UNSIGNED-BYTE 8) and we’re only interested in ISO-8859-1, so we use this to ‘simulate’ READ-CHAR.

Package

chunga.

Source

util.lisp.

Function: read-http-headers (stream &optional log-stream)

Reads HTTP header lines from STREAM (except for the initial status line which is supposed to be read already) and returns a corresponding alist of names and values where the names are keywords and the values are strings. Multiple lines with the same name are combined into one value, the individual values separated by commas. Header lines which are spread across multiple lines are recognized and treated correctly. Additonally logs the header lines to LOG-STREAM if it is not NIL.

Package

chunga.

Source

read.lisp.

Function: read-line* (stream &optional log-stream)

Reads and assembles characters from the binary stream STREAM until a carriage return is read. Makes sure that the following character is a linefeed. If *ACCEPT-BOGUS-EOLS* is not NIL, then the function will also accept a lone carriage return or linefeed as an acceptable line break. Returns the string of characters read excluding the line break. Returns NIL if input ends before one character was read. Additionally logs this string to LOG-STREAM if it is not NIL.

Package

chunga.

Source

read.lisp.

Function: read-name-value-pair (stream &key value-required-p cookie-syntax)

Reads a typical (in RFC 2616) name/value or attribute/value combination from STREAM - a token followed by a #\= character and another token or a quoted string. Returns a cons of name and value, both as strings. If VALUE-REQUIRED-P is NIL, the #\= sign and the value are optional. If COOKIE-SYNTAX is true, uses READ-COOKIE-VALUE internally.

Package

chunga.

Source

read.lisp.

Function: read-name-value-pairs (stream &key value-required-p cookie-syntax)

Uses READ-NAME-VALUE-PAIR to read and return an alist of name/value pairs from STREAM. It is assumed that the pairs are separated by semicolons and that the first char read (except for whitespace) will be a semicolon. The parameters are used as in READ-NAME-VALUE-PAIR. Stops reading in case of END-OF-FILE (instead of signaling an error).

Package

chunga.

Source

read.lisp.

Function: read-token (stream)

Read characters from STREAM while they are token constituents (according to RFC 2616). It is assumed that there’s a token character at the current position. The token read is returned as a string. Doesn’t signal an error (but simply stops reading) if END-OF-FILE is encountered after the first character.

Package

chunga.

Source

read.lisp.

Function: skip-whitespace (stream)

Consume characters from STREAM until an END-OF-FILE is encountered or a non-whitespace (according to RFC 2616) characters is seen. This character is returned (or NIL in case of END-OF-FILE).

Package

chunga.

Source

read.lisp.

Function: token-char-p (char)

Returns true if the Lisp character CHAR is a token constituent according to RFC 2616.

Package

chunga.

Source

read.lisp.

Function: trim-whitespace (string &key start end)

Returns a version of the string STRING (between START and END) where spaces and tab characters are trimmed from the start and the end. Might return STRING.

Package

chunga.

Source

read.lisp.


4.1.4 Generic functions

Generic Reader: chunked-input-stream-eof-after-last-chunk (object)
Generic Writer: (setf chunked-input-stream-eof-after-last-chunk) (object)
Package

chunga.

Methods
Reader Method: chunked-input-stream-eof-after-last-chunk ((chunked-input-stream chunked-input-stream))
Writer Method: (setf chunked-input-stream-eof-after-last-chunk) ((chunked-input-stream chunked-input-stream))

Return EOF after the last chunk instead of simply switching chunking off.

Source

streams.lisp.

Target Slot

signal-eof.

Generic Function: chunked-input-stream-extensions (object)
Package

chunga.

Methods
Method: chunked-input-stream-extensions (object)

The default method which always returns the empty list.

Source

input.lisp.

Reader Method: chunked-input-stream-extensions ((chunked-input-stream chunked-input-stream))

An alist of attribute/value
pairs corresponding to the optional ‘chunk extensions’ which might be encountered when reading from a chunked stream.

Source

streams.lisp.

Target Slot

chunk-extensions.

Generic Function: chunked-input-stream-trailers (object)
Package

chunga.

Methods
Method: chunked-input-stream-trailers (object)

The default method which always returns the empty list.

Source

input.lisp.

Reader Method: chunked-input-stream-trailers ((chunked-input-stream chunked-input-stream))

An alist of attribute/value
pairs corresponding to the optional ‘trailer’ HTTP headers which might be encountered at the end of a chunked stream.

Source

streams.lisp.

Target Slot

chunk-trailers.

Generic Function: chunked-stream-input-chunking-p (object)
Package

chunga.

Methods
Method: chunked-stream-input-chunking-p (object)

The default method for all objects which are not of type CHUNKED-INPUT-STREAM.

Source

input.lisp.

Reader Method: chunked-stream-input-chunking-p ((chunked-input-stream chunked-input-stream))

Whether input chunking is currently enabled.

Source

streams.lisp.

Target Slot

input-chunking-p.

Generic Function: (setf chunked-stream-input-chunking-p) (stream)
Package

chunga.

Methods
Method: (setf chunked-stream-input-chunking-p) ((stream chunked-input-stream))

Switches input chunking for STREAM on or off.

Source

input.lisp.

Generic Function: chunked-stream-output-chunking-p (object)
Package

chunga.

Methods
Method: chunked-stream-output-chunking-p (object)

The default method for all objects which are not of type CHUNKED-OUTPUT-STREAM.

Source

output.lisp.

Reader Method: chunked-stream-output-chunking-p ((chunked-output-stream chunked-output-stream))

Whether output chunking is currently enabled.

Source

streams.lisp.

Target Slot

output-chunking-p.

Generic Function: (setf chunked-stream-output-chunking-p) (stream)
Package

chunga.

Methods
Method: (setf chunked-stream-output-chunking-p) ((stream chunked-output-stream))

Switches output chunking for STREAM on or off.

Source

output.lisp.

Generic Reader: chunked-stream-stream (object)
Package

chunga.

Methods
Reader Method: chunked-stream-stream ((chunked-stream chunked-stream))

The actual stream that’s used for input and/or output.

Source

streams.lisp.

Target Slot

real-stream.


4.1.5 Standalone methods

Method: close ((stream chunked-stream) &key abort)

If a chunked stream is closed, we close the underlying stream as well.

Source

streams.lisp.

Method: close ((stream chunked-output-stream) &key abort)

When a stream is closed and ABORT isn’t true we have to make sure to send the last chunk.

Source

output.lisp.

Method: open-stream-p ((stream chunked-stream))

A chunked stream is open if its underlying stream is open.

Source

streams.lisp.

Method: stream-clear-input ((stream chunked-input-stream))

Implements CLEAR-INPUT by resetting the internal chunk buffer.

Package

sb-gray.

Source

input.lisp.

Method: stream-clear-output ((stream chunked-output-stream))

We clear output by resetting the output buffer and clearing the underlying stream.

Package

sb-gray.

Source

output.lisp.

Method: stream-element-type ((stream chunked-stream))

Chunked streams are always binary streams. Wrap them with flexi streams if you need a character stream.

Source

streams.lisp.

Method: stream-finish-output ((stream chunked-output-stream))

Flush the output buffer if output chunking is on, then operate on the underlying stream.

Package

sb-gray.

Source

output.lisp.

Method: stream-force-output ((stream chunked-output-stream))

Flush the output buffer if output chunking is on, then operate on the underlying stream.

Package

sb-gray.

Source

output.lisp.

Method: stream-listen ((stream chunked-input-stream))

We first check if input chunking is enabled and if there’s something in the buffer. Otherwise we poll the underlying stream.

Package

sb-gray.

Source

input.lisp.

Method: stream-read-byte ((stream chunked-input-stream))

Reads one byte from STREAM. Checks the chunk buffer first, if input chunking is enabled. Re-fills buffer is necessary.

Package

sb-gray.

Source

input.lisp.

Method: stream-read-sequence ((stream chunked-input-stream) sequence start end &key)

Fills SEQUENCE by adding data from the chunk buffer and re-filling it until enough data was read. Works directly on the underlying stream if input chunking is off.

Package

trivial-gray-streams.

Source

input.lisp.

Method: stream-write-byte ((stream chunked-output-stream) byte)

Writes one byte by simply adding it to the end of the output buffer (if output chunking is enabled). The buffer is flushed if necessary.

Package

sb-gray.

Source

output.lisp.

Method: stream-write-sequence ((stream chunked-output-stream) sequence start end &key)

Outputs SEQUENCE by appending it to the output buffer if it’s small enough. Large sequences are written directly using WRITE-CHUNK.

Package

trivial-gray-streams.

Source

output.lisp.


4.1.6 Conditions

Condition: chunga-error

Superclass for all errors related to Chunga. This
is a subtype of STREAM-ERROR, so STREAM-ERROR-STREAM can be used to access the offending stream.

Package

chunga.

Source

conditions.lisp.

Direct superclasses
Direct subclasses
Condition: chunga-warning

Superclass for all warnings related to Chunga.

Package

chunga.

Source

conditions.lisp.

Direct superclasses
Direct subclasses

chunga-simple-warning.

Condition: input-chunking-body-corrupted

A condition of this type is signaled if an
unexpected character (octet) is read while reading from a chunked stream with input chunking enabled.

Package

chunga.

Source

conditions.lisp.

Direct superclasses

chunga-error.

Direct slots
Slot: last-char

The (unexpected) character which was read.

Initargs

:last-char

Slot: expected-chars

The characters which were expected.
A list of characters or one single character.

Initargs

:expected-chars

Condition: input-chunking-unexpected-end-of-file

A condition of this type is signaled if we reach an unexpected EOF on a chunked stream with input chunking enabled.

Package

chunga.

Source

conditions.lisp.

Direct superclasses

chunga-error.

Condition: syntax-error

Signalled if Chunga encounters wrong or unknown syntax when reading data.

Package

chunga.

Source

conditions.lisp.

Direct superclasses

chunga-simple-error.


4.1.7 Classes

Class: chunked-input-stream

A chunked stream is of this type if its
underlying stream is an input stream. This is a subtype of CHUNKED-STREAM.

Package

chunga.

Source

streams.lisp.

Direct superclasses
Direct subclasses

chunked-io-stream.

Direct methods
Direct slots
Slot: input-chunking-p

Whether input chunking is currently enabled.

Readers

chunked-stream-input-chunking-p.

Writers

This slot is read-only.

Slot: input-buffer

A vector containing the binary
data from the most recent chunk that was read.

Slot: input-index

The current position within INPUT-BUFFER.

Initform

0

Readers

chunked-stream-input-index.

Writers

(setf chunked-stream-input-index).

Slot: input-limit

Only the content in INPUT-BUFFER
up to INPUT-LIMIT belongs to the current chunk.

Initform

0

Readers

chunked-stream-input-limit.

Writers

(setf chunked-stream-input-limit).

Slot: chunk-extensions

An alist of attribute/value
pairs corresponding to the optional ‘chunk extensions’ which might be encountered when reading from a chunked stream.

Readers

chunked-input-stream-extensions.

Writers

This slot is read-only.

Slot: chunk-trailers

An alist of attribute/value
pairs corresponding to the optional ‘trailer’ HTTP headers which might be encountered at the end of a chunked stream.

Readers

chunked-input-stream-trailers.

Writers

This slot is read-only.

Slot: expecting-crlf-p

Whether we expect to see
CRLF before we can read the next chunk-size header part from the stream. (This will actually be the CRLF from the end of the last chunk-data part.)

Readers

expecting-crlf-p.

Writers

(setf expecting-crlf-p).

Slot: signal-eof

Return EOF after the last chunk instead of simply switching chunking off.

Readers

chunked-input-stream-eof-after-last-chunk.

Writers

(setf chunked-input-stream-eof-after-last-chunk).

Class: chunked-io-stream

A chunked stream is of this type if it is both
a CHUNKED-INPUT-STREAM as well as a CHUNKED-OUTPUT-STREAM.

Package

chunga.

Source

streams.lisp.

Direct superclasses
Class: chunked-output-stream

A chunked stream is of this type if its
underlying stream is an output stream. This is a subtype of CHUNKED-STREAM.

Package

chunga.

Source

streams.lisp.

Direct superclasses
Direct subclasses

chunked-io-stream.

Direct methods
Direct slots
Slot: output-chunking-p

Whether output chunking is currently enabled.

Readers

chunked-stream-output-chunking-p.

Writers

This slot is read-only.

Slot: output-buffer

A vector used to temporarily
store data which will output in one chunk.

Initform

(make-array chunga::+output-buffer-size+ :element-type (quote (unsigned-byte 8)))

Readers

output-buffer.

Writers

(setf output-buffer).

Slot: output-index

The current end of OUTPUT-BUFFER.

Initform

0

Readers

output-index.

Writers

(setf output-index).

Class: chunked-stream

Every chunked stream returned by
MAKE-CHUNKED-STREAM is of this type which is a subtype of STREAM.

Package

chunga.

Source

streams.lisp.

Direct superclasses

trivial-gray-stream-mixin.

Direct subclasses
Direct methods
Direct slots
Slot: real-stream

The actual stream that’s used for input and/or output.

Initargs

:real-stream

Readers

chunked-stream-stream.

Writers

This slot is read-only.


4.2 Internals


4.2.1 Constants

Constant: +crlf+

A 2-element array consisting of the character codes for a CRLF sequence.

Package

chunga.

Source

specials.lisp.

Constant: +hex-digits+

The hexadecimal digits.

Package

chunga.

Source

specials.lisp.

Constant: +keyword-to-string-hash+

A hash table which maps keywords derived from +KNOWN-WORDS+ to capitalized strings.

Package

chunga.

Source

known-words.lisp.

Constant: +known-words+

A list of words (headers, methods, protocols, character sets) that are typically seen in HTTP communication. Mostly from RFC 2616, but includes WebDAV stuff and other things as well.

Package

chunga.

Source

known-words.lisp.

Constant: +output-buffer-size+

Size of the initial output buffer for chunked output.

Package

chunga.

Source

specials.lisp.

Constant: +string-to-keyword-hash+

A hash table which case-insensitively maps the strings from +KNOWN-WORDS+ to keywords.

Package

chunga.

Source

known-words.lisp.


4.2.2 Special variables

Special Variable: *char-buffer*

A ‘buffer’ for one character. Used by PEEK-CHAR* and UNREAD-CHAR*.

Package

chunga.

Source

specials.lisp.

Special Variable: *current-error-function*

Used by the functions in ‘read.lisp’ as a function to signal errors about unexpected characters when *CURRENT-ERROR-MESSAGE* is NIL.

Package

chunga.

Source

specials.lisp.

Special Variable: *hyperdoc-base-uri*
Package

chunga.

Source

specials.lisp.


4.2.3 Macros

Macro: define-constant (name value &optional doc)

A version of DEFCONSTANT for, cough, /strict/ CL implementations.

Package

chunga.

Source

specials.lisp.

Macro: when-let ((var expr) &body body)

Evaluates EXPR, binds it to VAR, and executes BODY if VAR has a true value.

Package

chunga.

Source

util.lisp.


4.2.4 Ordinary functions

Function: assert-crlf (stream)

Reads the next two characters from STREAM and checks if these are a carriage return and a linefeed. Signals an error otherwise.

Package

chunga.

Source

read.lisp.

Function: charp (char)

Returns true if the Lisp character CHAR is a CHAR according to RFC 2616.

Package

chunga.

Source

read.lisp.

Function: controlp (char)

Returns true if the Lisp character CHAR is a CTL according to RFC 2616.

Package

chunga.

Source

read.lisp.

Function: ends-with-p (seq suffix &key test)

Returns true if the sequence SEQ ends with the sequence SUFFIX. Individual elements are compared with TEST.

Package

chunga.

Source

util.lisp.

Function: hyperdoc-lookup (symbol type)
Package

chunga.

Source

specials.lisp.

Function: make-keyword (string destructivep)

Converts the string STRING to a keyword where all characters are uppercase or lowercase, taking into account the current readtable case. Destructively modifies STRING if DESTRUCTIVEP is true.

Package

chunga.

Source

util.lisp.

Function: read-cookie-value (stream &key separators)

Reads a cookie parameter value from STREAM which is returned as a string. Simply reads until a semicolon is seen (or an element of SEPARATORS). Also reads quoted strings if the first non-whitespace character is a quotation mark (as in RFC 2109).

Package

chunga.

Source

read.lisp.

Function: read-quoted-string (stream)

Reads a quoted string (according to RFC 2616). It is assumed that the character at the current position is the opening quote character. Returns the string read without quotes and escape characters.

Package

chunga.

Source

read.lisp.

Function: separatorp (char)

Returns true if the Lisp character CHAR is a separator according to RFC 2616.

Package

chunga.

Source

read.lisp.

Function: signal-unexpected-chars (stream last-char expected-chars)

Signals an error that LAST-CHAR was read although one of EXPECTED-CHARS was expected. (Note that EXPECTED-CHARS, despite its name, can also be a single character instead of a list). Calls *CURRENT-ERROR-FUNCTION* if it’s not NIL, or uses *CURRENT-ERROR-MESSAGE* otherwise.

Package

chunga.

Source

read.lisp.

Function: unread-char* (char)

Were simulating UNREAD-CHAR by putting the character into *CHAR-BUFFER*.

Package

chunga.

Source

util.lisp.

Function: whitespacep (char)

Returns true if the Lisp character CHAR is whitespace according to RFC 2616.

Package

chunga.

Source

read.lisp.


4.2.5 Generic functions

Generic Function: chunked-input-available-p (stream)
Package

chunga.

Methods
Method: chunked-input-available-p ((stream chunked-input-stream))

Whether there’s unread input waiting in the chunk buffer.

Source

input.lisp.

Generic Reader: chunked-stream-input-index (object)
Generic Writer: (setf chunked-stream-input-index) (object)
Package

chunga.

Methods
Reader Method: chunked-stream-input-index ((chunked-input-stream chunked-input-stream))
Writer Method: (setf chunked-stream-input-index) ((chunked-input-stream chunked-input-stream))

The current position within INPUT-BUFFER.

Source

streams.lisp.

Target Slot

input-index.

Generic Reader: chunked-stream-input-limit (object)
Generic Writer: (setf chunked-stream-input-limit) (object)
Package

chunga.

Methods
Reader Method: chunked-stream-input-limit ((chunked-input-stream chunked-input-stream))
Writer Method: (setf chunked-stream-input-limit) ((chunked-input-stream chunked-input-stream))

Only the content in INPUT-BUFFER
up to INPUT-LIMIT belongs to the current chunk.

Source

streams.lisp.

Target Slot

input-limit.

Generic Reader: expecting-crlf-p (object)
Generic Writer: (setf expecting-crlf-p) (object)
Package

chunga.

Methods
Reader Method: expecting-crlf-p ((chunked-input-stream chunked-input-stream))
Writer Method: (setf expecting-crlf-p) ((chunked-input-stream chunked-input-stream))

Whether we expect to see
CRLF before we can read the next chunk-size header part from the stream. (This will actually be the CRLF from the end of the last chunk-data part.)

Source

streams.lisp.

Target Slot

expecting-crlf-p.

Generic Function: fill-buffer (stream)
Package

chunga.

Methods
Method: fill-buffer ((stream chunked-input-stream))

Re-fills the chunk buffer. Returns NIL if chunking has ended.

Source

input.lisp.

Generic Function: flush-buffer (stream)
Package

chunga.

Methods
Method: flush-buffer ((stream chunked-output-stream))

Uses WRITE-CHUNK to empty the output buffer unless it is already empty.

Source

output.lisp.

Generic Reader: output-buffer (object)
Generic Writer: (setf output-buffer) (object)
Package

chunga.

Methods
Reader Method: output-buffer ((chunked-output-stream chunked-output-stream))
Writer Method: (setf output-buffer) ((chunked-output-stream chunked-output-stream))

A vector used to temporarily
store data which will output in one chunk.

Source

streams.lisp.

Target Slot

output-buffer.

Generic Reader: output-index (object)
Generic Writer: (setf output-index) (object)
Package

chunga.

Methods
Reader Method: output-index ((chunked-output-stream chunked-output-stream))
Writer Method: (setf output-index) ((chunked-output-stream chunked-output-stream))

The current end of OUTPUT-BUFFER.

Source

streams.lisp.

Target Slot

output-index.

Generic Function: write-chunk (stream sequence &key start end)
Package

chunga.

Methods
Method: write-chunk ((stream chunked-output-stream) sequence &key start end)

Writes the contents of SEQUENCE from START to END to the underlying stream of STREAM as one chunk.

Source

output.lisp.


4.2.6 Conditions

Condition: chunga-condition

Superclass for all conditions related to Chunga.

Package

chunga.

Source

conditions.lisp.

Direct superclasses

condition.

Direct subclasses
Condition: chunga-simple-error

Like CHUNGA-ERROR but with formatting capabilities.

Package

chunga.

Source

conditions.lisp.

Direct superclasses
Direct subclasses
Condition: chunga-simple-warning

Like CHUNGA-WARNING but with formatting capabilities.

Package

chunga.

Source

conditions.lisp.

Direct superclasses
Condition: parameter-error

Signalled if a function was called with inconsistent or illegal parameters.

Package

chunga.

Source

conditions.lisp.

Direct superclasses

chunga-simple-error.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   C   D   E   F   G   H   M   O   P   R   S   T   U   W  
Index Entry  Section

(
(setf chunked-input-stream-eof-after-last-chunk): Public generic functions
(setf chunked-input-stream-eof-after-last-chunk): Public generic functions
(setf chunked-stream-input-chunking-p): Public generic functions
(setf chunked-stream-input-chunking-p): Public generic functions
(setf chunked-stream-input-index): Private generic functions
(setf chunked-stream-input-index): Private generic functions
(setf chunked-stream-input-limit): Private generic functions
(setf chunked-stream-input-limit): Private generic functions
(setf chunked-stream-output-chunking-p): Public generic functions
(setf chunked-stream-output-chunking-p): Public generic functions
(setf expecting-crlf-p): Private generic functions
(setf expecting-crlf-p): Private generic functions
(setf output-buffer): Private generic functions
(setf output-buffer): Private generic functions
(setf output-index): Private generic functions
(setf output-index): Private generic functions

A
as-capitalized-string: Public ordinary functions
as-keyword: Public ordinary functions
assert-char: Public ordinary functions
assert-crlf: Private ordinary functions

C
charp: Private ordinary functions
chunked-input-available-p: Private generic functions
chunked-input-available-p: Private generic functions
chunked-input-stream-eof-after-last-chunk: Public generic functions
chunked-input-stream-eof-after-last-chunk: Public generic functions
chunked-input-stream-extensions: Public generic functions
chunked-input-stream-extensions: Public generic functions
chunked-input-stream-extensions: Public generic functions
chunked-input-stream-trailers: Public generic functions
chunked-input-stream-trailers: Public generic functions
chunked-input-stream-trailers: Public generic functions
chunked-stream-input-chunking-p: Public generic functions
chunked-stream-input-chunking-p: Public generic functions
chunked-stream-input-chunking-p: Public generic functions
chunked-stream-input-index: Private generic functions
chunked-stream-input-index: Private generic functions
chunked-stream-input-limit: Private generic functions
chunked-stream-input-limit: Private generic functions
chunked-stream-output-chunking-p: Public generic functions
chunked-stream-output-chunking-p: Public generic functions
chunked-stream-output-chunking-p: Public generic functions
chunked-stream-stream: Public generic functions
chunked-stream-stream: Public generic functions
close: Public standalone methods
close: Public standalone methods
controlp: Private ordinary functions

D
define-constant: Private macros

E
ends-with-p: Private ordinary functions
expecting-crlf-p: Private generic functions
expecting-crlf-p: Private generic functions

F
fill-buffer: Private generic functions
fill-buffer: Private generic functions
flush-buffer: Private generic functions
flush-buffer: Private generic functions
Function, as-capitalized-string: Public ordinary functions
Function, as-keyword: Public ordinary functions
Function, assert-char: Public ordinary functions
Function, assert-crlf: Private ordinary functions
Function, charp: Private ordinary functions
Function, controlp: Private ordinary functions
Function, ends-with-p: Private ordinary functions
Function, hyperdoc-lookup: Private ordinary functions
Function, make-chunked-stream: Public ordinary functions
Function, make-keyword: Private ordinary functions
Function, peek-char*: Public ordinary functions
Function, read-char*: Public ordinary functions
Function, read-cookie-value: Private ordinary functions
Function, read-http-headers: Public ordinary functions
Function, read-line*: Public ordinary functions
Function, read-name-value-pair: Public ordinary functions
Function, read-name-value-pairs: Public ordinary functions
Function, read-quoted-string: Private ordinary functions
Function, read-token: Public ordinary functions
Function, separatorp: Private ordinary functions
Function, signal-unexpected-chars: Private ordinary functions
Function, skip-whitespace: Public ordinary functions
Function, token-char-p: Public ordinary functions
Function, trim-whitespace: Public ordinary functions
Function, unread-char*: Private ordinary functions
Function, whitespacep: Private ordinary functions

G
Generic Function, (setf chunked-input-stream-eof-after-last-chunk): Public generic functions
Generic Function, (setf chunked-stream-input-chunking-p): Public generic functions
Generic Function, (setf chunked-stream-input-index): Private generic functions
Generic Function, (setf chunked-stream-input-limit): Private generic functions
Generic Function, (setf chunked-stream-output-chunking-p): Public generic functions
Generic Function, (setf expecting-crlf-p): Private generic functions
Generic Function, (setf output-buffer): Private generic functions
Generic Function, (setf output-index): Private generic functions
Generic Function, chunked-input-available-p: Private generic functions
Generic Function, chunked-input-stream-eof-after-last-chunk: Public generic functions
Generic Function, chunked-input-stream-extensions: Public generic functions
Generic Function, chunked-input-stream-trailers: Public generic functions
Generic Function, chunked-stream-input-chunking-p: Public generic functions
Generic Function, chunked-stream-input-index: Private generic functions
Generic Function, chunked-stream-input-limit: Private generic functions
Generic Function, chunked-stream-output-chunking-p: Public generic functions
Generic Function, chunked-stream-stream: Public generic functions
Generic Function, expecting-crlf-p: Private generic functions
Generic Function, fill-buffer: Private generic functions
Generic Function, flush-buffer: Private generic functions
Generic Function, output-buffer: Private generic functions
Generic Function, output-index: Private generic functions
Generic Function, write-chunk: Private generic functions

H
hyperdoc-lookup: Private ordinary functions

M
Macro, define-constant: Private macros
Macro, when-let: Private macros
Macro, with-character-stream-semantics: Public macros
make-chunked-stream: Public ordinary functions
make-keyword: Private ordinary functions
Method, (setf chunked-input-stream-eof-after-last-chunk): Public generic functions
Method, (setf chunked-stream-input-chunking-p): Public generic functions
Method, (setf chunked-stream-input-index): Private generic functions
Method, (setf chunked-stream-input-limit): Private generic functions
Method, (setf chunked-stream-output-chunking-p): Public generic functions
Method, (setf expecting-crlf-p): Private generic functions
Method, (setf output-buffer): Private generic functions
Method, (setf output-index): Private generic functions
Method, chunked-input-available-p: Private generic functions
Method, chunked-input-stream-eof-after-last-chunk: Public generic functions
Method, chunked-input-stream-extensions: Public generic functions
Method, chunked-input-stream-extensions: Public generic functions
Method, chunked-input-stream-trailers: Public generic functions
Method, chunked-input-stream-trailers: Public generic functions
Method, chunked-stream-input-chunking-p: Public generic functions
Method, chunked-stream-input-chunking-p: Public generic functions
Method, chunked-stream-input-index: Private generic functions
Method, chunked-stream-input-limit: Private generic functions
Method, chunked-stream-output-chunking-p: Public generic functions
Method, chunked-stream-output-chunking-p: Public generic functions
Method, chunked-stream-stream: Public generic functions
Method, close: Public standalone methods
Method, close: Public standalone methods
Method, expecting-crlf-p: Private generic functions
Method, fill-buffer: Private generic functions
Method, flush-buffer: Private generic functions
Method, open-stream-p: Public standalone methods
Method, output-buffer: Private generic functions
Method, output-index: Private generic functions
Method, stream-clear-input: Public standalone methods
Method, stream-clear-output: Public standalone methods
Method, stream-element-type: Public standalone methods
Method, stream-finish-output: Public standalone methods
Method, stream-force-output: Public standalone methods
Method, stream-listen: Public standalone methods
Method, stream-read-byte: Public standalone methods
Method, stream-read-sequence: Public standalone methods
Method, stream-write-byte: Public standalone methods
Method, stream-write-sequence: Public standalone methods
Method, write-chunk: Private generic functions

O
open-stream-p: Public standalone methods
output-buffer: Private generic functions
output-buffer: Private generic functions
output-index: Private generic functions
output-index: Private generic functions

P
peek-char*: Public ordinary functions

R
read-char*: Public ordinary functions
read-cookie-value: Private ordinary functions
read-http-headers: Public ordinary functions
read-line*: Public ordinary functions
read-name-value-pair: Public ordinary functions
read-name-value-pairs: Public ordinary functions
read-quoted-string: Private ordinary functions
read-token: Public ordinary functions

S
separatorp: Private ordinary functions
signal-unexpected-chars: Private ordinary functions
skip-whitespace: Public ordinary functions
stream-clear-input: Public standalone methods
stream-clear-output: Public standalone methods
stream-element-type: Public standalone methods
stream-finish-output: Public standalone methods
stream-force-output: Public standalone methods
stream-listen: Public standalone methods
stream-read-byte: Public standalone methods
stream-read-sequence: Public standalone methods
stream-write-byte: Public standalone methods
stream-write-sequence: Public standalone methods

T
token-char-p: Public ordinary functions
trim-whitespace: Public ordinary functions

U
unread-char*: Private ordinary functions

W
when-let: Private macros
whitespacep: Private ordinary functions
with-character-stream-semantics: Public macros
write-chunk: Private generic functions
write-chunk: Private generic functions


A.3 Variables

Jump to:   *   +  
C   E   I   L   O   R   S  
Index Entry  Section

*
*accept-bogus-eols*: Public special variables
*char-buffer*: Private special variables
*current-error-function*: Private special variables
*current-error-message*: Public special variables
*hyperdoc-base-uri*: Private special variables
*treat-semicolon-as-continuation*: Public special variables

+
+crlf+: Private constants
+hex-digits+: Private constants
+keyword-to-string-hash+: Private constants
+known-words+: Private constants
+output-buffer-size+: Private constants
+string-to-keyword-hash+: Private constants

C
chunk-extensions: Public classes
chunk-trailers: Public classes
Constant, +crlf+: Private constants
Constant, +hex-digits+: Private constants
Constant, +keyword-to-string-hash+: Private constants
Constant, +known-words+: Private constants
Constant, +output-buffer-size+: Private constants
Constant, +string-to-keyword-hash+: Private constants

E
expected-chars: Public conditions
expecting-crlf-p: Public classes

I
input-buffer: Public classes
input-chunking-p: Public classes
input-index: Public classes
input-limit: Public classes

L
last-char: Public conditions

O
output-buffer: Public classes
output-chunking-p: Public classes
output-index: Public classes

R
real-stream: Public classes

S
signal-eof: Public classes
Slot, chunk-extensions: Public classes
Slot, chunk-trailers: Public classes
Slot, expected-chars: Public conditions
Slot, expecting-crlf-p: Public classes
Slot, input-buffer: Public classes
Slot, input-chunking-p: Public classes
Slot, input-index: Public classes
Slot, input-limit: Public classes
Slot, last-char: Public conditions
Slot, output-buffer: Public classes
Slot, output-chunking-p: Public classes
Slot, output-index: Public classes
Slot, real-stream: Public classes
Slot, signal-eof: Public classes
Special Variable, *accept-bogus-eols*: Public special variables
Special Variable, *char-buffer*: Private special variables
Special Variable, *current-error-function*: Private special variables
Special Variable, *current-error-message*: Public special variables
Special Variable, *hyperdoc-base-uri*: Private special variables
Special Variable, *treat-semicolon-as-continuation*: Public special variables


A.4 Data types

Jump to:   C   F   I   K   O   P   R   S   U  
Index Entry  Section

C
chunga: The chunga system
chunga: The chunga package
chunga-condition: Private conditions
chunga-error: Public conditions
chunga-simple-error: Private conditions
chunga-simple-warning: Private conditions
chunga-warning: Public conditions
chunga.asd: The chunga/chunga․asd file
chunked-input-stream: Public classes
chunked-io-stream: Public classes
chunked-output-stream: Public classes
chunked-stream: Public classes
Class, chunked-input-stream: Public classes
Class, chunked-io-stream: Public classes
Class, chunked-output-stream: Public classes
Class, chunked-stream: Public classes
Condition, chunga-condition: Private conditions
Condition, chunga-error: Public conditions
Condition, chunga-simple-error: Private conditions
Condition, chunga-simple-warning: Private conditions
Condition, chunga-warning: Public conditions
Condition, input-chunking-body-corrupted: Public conditions
Condition, input-chunking-unexpected-end-of-file: Public conditions
Condition, parameter-error: Private conditions
Condition, syntax-error: Public conditions
conditions.lisp: The chunga/conditions․lisp file

F
File, chunga.asd: The chunga/chunga․asd file
File, conditions.lisp: The chunga/conditions․lisp file
File, input.lisp: The chunga/input․lisp file
File, known-words.lisp: The chunga/known-words․lisp file
File, output.lisp: The chunga/output․lisp file
File, packages.lisp: The chunga/packages․lisp file
File, read.lisp: The chunga/read․lisp file
File, specials.lisp: The chunga/specials․lisp file
File, streams.lisp: The chunga/streams․lisp file
File, util.lisp: The chunga/util․lisp file

I
input-chunking-body-corrupted: Public conditions
input-chunking-unexpected-end-of-file: Public conditions
input.lisp: The chunga/input․lisp file

K
known-words.lisp: The chunga/known-words․lisp file

O
output.lisp: The chunga/output․lisp file

P
Package, chunga: The chunga package
packages.lisp: The chunga/packages․lisp file
parameter-error: Private conditions

R
read.lisp: The chunga/read․lisp file

S
specials.lisp: The chunga/specials․lisp file
streams.lisp: The chunga/streams․lisp file
syntax-error: Public conditions
System, chunga: The chunga system

U
util.lisp: The chunga/util․lisp file