This is the fast-websocket Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Tue Jul 15 05:05:30 2025 GMT+0.
fast-websocket/fast-websocket.asdfast-websocket/src/fast-websocket.lispfast-websocket/src/ws.lispfast-websocket/src/parser.lispfast-websocket/src/compose.lispfast-websocket/src/payload.lispfast-websocket/src/constants.lispfast-websocket/src/error.lispThe main system appears first, followed by any subsystem dependency.
fast-websocketOptimized WebSocket protocol parser
Eitaro Fukamachi
BSD 2-Clause
# fast-websocket
[](https://travis-ci.org/fukamachi/fast-websocket)
[](https://coveralls.io/r/fukamachi/fast-websocket)
[](http://quickdocs.org/fast-websocket/)
Optimized low-level WebSocket protocol parser/composer.
## Warning
This software is still BETA quality. The APIs will be likely to change.
## Usage
“‘common-lisp
(use-package :fast-websocket)
(let* ((ws (make-ws))
(body (make-string-output-stream))
(parser (make-parser ws
:require-masking t
:message-callback
(lambda (message)
(princ message body))
:close-callback
(lambda (payload &key code)
(format t "Client closed a connection: ~A (Code: ~D)~%" payload code)))))
(funcall parser (make-array 11 :element-type ’(unsigned-byte 8)
:initial-contents (list 129 133 225 106 10 29 169 15 102 113 142)))
(princ (opcode-name (ws-opcode ws)))
;-> :TEXT
(princ (get-output-stream-string body))
;-> Hello
t)
(compose-frame "bye" :type :close :code (error-code :protocol-error))
;=> #(136 5 3 234 98 121 101)
“‘
## Installation
“‘
cd ~/common-lisp
git clone https://github.com/fukamachi/fast-websocket
“‘
“‘
(ql:quickload :fast-websocket)
“‘
## See Also
* [RFC 6455](https://tools.ietf.org/html/rfc6455)
* [websocket-driver](https://github.com/fukamachi/websocket-driver)
## Author
* Eitaro Fukamachi (e.arrows@gmail.com)
## Copyright
Copyright (c) 2015 Eitaro Fukamachi (e.arrows@gmail.com)
## License
Licensed under the BSD 2-Clause License.
0.1
fast-io (system).
babel (system).
alexandria (system).
src (module).
Modules are listed depth-first from the system components tree.
fast-websocket/srcfast-websocket (system).
fast-websocket.lisp (file).
ws.lisp (file).
parser.lisp (file).
compose.lisp (file).
payload.lisp (file).
constants.lisp (file).
error.lisp (file).
Files are sorted by type and then listed depth-first from the systems components trees.
fast-websocket/fast-websocket.asdfast-websocket/src/fast-websocket.lispfast-websocket/src/ws.lispfast-websocket/src/parser.lispfast-websocket/src/compose.lispfast-websocket/src/payload.lispfast-websocket/src/constants.lispfast-websocket/src/error.lispfast-websocket/fast-websocket.asdfast-websocket (system).
fast-websocket/src/fast-websocket.lispws.lisp (file).
parser.lisp (file).
compose.lisp (file).
payload.lisp (file).
constants.lisp (file).
error.lisp (file).
src (module).
make-parser (function).
make-payload-callback (function).
fast-websocket/src/ws.lispsrc (module).
make-ws (function).
ws (structure).
ws-fin (reader).
(setf ws-fin) (writer).
ws-length (reader).
(setf ws-length) (writer).
ws-length-size (reader).
(setf ws-length-size) (writer).
ws-mask (reader).
(setf ws-mask) (writer).
ws-masking-key (reader).
(setf ws-masking-key) (writer).
ws-mode (reader).
(setf ws-mode) (writer).
ws-opcode (reader).
(setf ws-opcode) (writer).
ws-stage (reader).
(setf ws-stage) (writer).
fast-websocket/src/parser.lispws.lisp (file).
constants.lisp (file).
error.lisp (file).
src (module).
make-ll-parser (function).
fast-websocket/src/compose.lispconstants.lisp (file).
payload.lisp (file).
src (module).
compose-frame (function).
*mask-random-state* (special variable).
random-mask-keys (function).
fast-websocket/src/payload.lispsrc (module).
fast-write-masked-sequence (function).
mask-message (function).
*mask-key-indices* (special variable).
mask-byte (function).
with-masking (macro).
fast-websocket/src/constants.lispsrc (module).
+byte+ (constant).
+fin+ (constant).
+length+ (constant).
+mask+ (constant).
+opcode+ (constant).
+rsv1+ (constant).
+rsv2+ (constant).
+rsv3+ (constant).
fragmented-opcode-p (function).
opcode (function).
opcode-name (function).
opening-opcode-p (function).
valid-opcode-p (function).
*fragmented-opcodes* (special variable).
*opcode-valid-array* (special variable).
*opcodes-map* (special variable).
*opcodes-name-map* (special variable).
*opening-opcodes* (special variable).
fast-websocket/src/error.lispsrc (module).
acceptable-error-code-p (function).
encoding-error (condition).
error-code (function).
error-code-name (function).
protocol-error (condition).
too-large (condition).
unacceptable (condition).
valid-error-code-p (function).
websocket-error (condition).
websocket-parse-error (condition).
*error-codes* (special variable).
*error-codes-map* (special variable).
*error-codes-name-map* (special variable).
+max-reserved-error+ (constant).
+min-reserved-error+ (constant).
Packages are listed by definition order.
fast-websocketfast-websocket.constantsfast-websocket.parserfast-websocket.composefast-websocket.payloadfast-websocket-asdfast-websocket.wsfast-websocket.errorfast-websocketcommon-lisp.
fast-websocket.constants.
fast-websocket.ws.
make-parser (function).
make-payload-callback (function).
fast-websocket.constantscommon-lisp.
+byte+ (constant).
+fin+ (constant).
+length+ (constant).
+mask+ (constant).
+opcode+ (constant).
+rsv1+ (constant).
+rsv2+ (constant).
+rsv3+ (constant).
fragmented-opcode-p (function).
opcode (function).
opcode-name (function).
opening-opcode-p (function).
valid-opcode-p (function).
*fragmented-opcodes* (special variable).
*opcode-valid-array* (special variable).
*opcodes-map* (special variable).
*opcodes-name-map* (special variable).
*opening-opcodes* (special variable).
fast-websocket.parsercommon-lisp.
fast-websocket.constants.
fast-websocket.error.
fast-websocket.ws.
make-ll-parser (function).
fast-websocket.composecommon-lisp.
fast-websocket.constants.
compose-frame (function).
*mask-random-state* (special variable).
random-mask-keys (function).
fast-websocket.payloadcommon-lisp.
fast-write-masked-sequence (function).
mask-message (function).
*mask-key-indices* (special variable).
mask-byte (function).
with-masking (macro).
fast-websocket.wscommon-lisp.
make-ws (function).
ws (structure).
ws-fin (reader).
(setf ws-fin) (writer).
ws-length (reader).
(setf ws-length) (writer).
ws-length-size (reader).
(setf ws-length-size) (writer).
ws-mask (reader).
(setf ws-mask) (writer).
ws-masking-key (reader).
(setf ws-masking-key) (writer).
ws-mode (reader).
(setf ws-mode) (writer).
ws-opcode (reader).
(setf ws-opcode) (writer).
ws-stage (reader).
(setf ws-stage) (writer).
fast-websocket.errorcommon-lisp.
acceptable-error-code-p (function).
encoding-error (condition).
error-code (function).
error-code-name (function).
protocol-error (condition).
too-large (condition).
unacceptable (condition).
valid-error-code-p (function).
websocket-error (condition).
websocket-parse-error (condition).
*error-codes* (special variable).
*error-codes-map* (special variable).
*error-codes-name-map* (special variable).
+max-reserved-error+ (constant).
+min-reserved-error+ (constant).
Definitions are sorted by export status, category, package, and then by lexicographic order.
simple-error.
websocket-parse-error.
:require-masking
error.
structure-object.
boolean
fixnum
-1
boolean
(simple-array (unsigned-byte 8) (4))
(make-array 4 :element-type (quote (unsigned-byte 8)))
common-lisp.
integer
0
fixnum
0
symbol
fixnum
0
| Jump to: | (
A C E F M O R V W |
|---|
| Jump to: | (
A C E F M O R V W |
|---|
| Jump to: | *
+
C F L M O R S |
|---|
| Jump to: | *
+
C F L M O R S |
|---|
| Jump to: | C E F M O P S T U W |
|---|
| Jump to: | C E F M O P S T U W |
|---|