Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the fast-websocket Reference Manual, version 0.1, generated automatically by Declt version 3.0 "Montgomery Scott" on Tue Dec 22 13:26:38 2020 GMT+0.
• Introduction | What fast-websocket is all about | |
• Systems | The systems documentation | |
• Modules | The modules documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
Optimized low-level WebSocket protocol parser/composer.
This software is still BETA quality. The APIs will be likely to change.
(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)
cd ~/common-lisp
git clone https://github.com/fukamachi/fast-websocket
(ql:quickload :fast-websocket)
Copyright (c) 2015 Eitaro Fukamachi (e.arrows@gmail.com)
Licensed under the BSD 2-Clause License.
Next: Modules, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The fast-websocket system |
Eitaro Fukamachi
BSD 2-Clause
Optimized WebSocket protocol parser
# 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-websocket.asd (file)
src (module)
Modules are listed depth-first from the system components tree.
• The fast-websocket/src module |
fast-websocket (system)
src/
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
Next: The fast-websocket/src/fast-websocket․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
fast-websocket.asd
fast-websocket (system)
Next: The fast-websocket/src/ws․lisp file, Previous: The fast-websocket․asd file, Up: Lisp files [Contents][Index]
src (module)
src/fast-websocket.lisp
make-parser (function)
make-payload-callback (function)
Next: The fast-websocket/src/parser․lisp file, Previous: The fast-websocket/src/fast-websocket․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/ws.lisp
Next: The fast-websocket/src/compose․lisp file, Previous: The fast-websocket/src/ws․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/parser.lisp
make-ll-parser (function)
Next: The fast-websocket/src/payload․lisp file, Previous: The fast-websocket/src/parser․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/compose.lisp
compose-frame (function)
Next: The fast-websocket/src/constants․lisp file, Previous: The fast-websocket/src/compose․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/payload.lisp
Next: The fast-websocket/src/error․lisp file, Previous: The fast-websocket/src/payload․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/constants.lisp
Previous: The fast-websocket/src/constants․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/error.lisp
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
Next: The fast-websocket package, Previous: Packages, Up: Packages [Contents][Index]
fast-websocket.asd
Next: The fast-websocket․ws package, Previous: The fast-websocket-asd package, Up: Packages [Contents][Index]
fast-websocket.lisp (file)
make-parser (function)
make-payload-callback (function)
Next: The fast-websocket․parser package, Previous: The fast-websocket package, Up: Packages [Contents][Index]
ws.lisp (file)
common-lisp
Next: The fast-websocket․compose package, Previous: The fast-websocket․ws package, Up: Packages [Contents][Index]
parser.lisp (file)
make-ll-parser (function)
Next: The fast-websocket․payload package, Previous: The fast-websocket․parser package, Up: Packages [Contents][Index]
compose.lisp (file)
compose-frame (function)
Next: The fast-websocket․constants package, Previous: The fast-websocket․compose package, Up: Packages [Contents][Index]
payload.lisp (file)
common-lisp
Next: The fast-websocket․error package, Previous: The fast-websocket․payload package, Up: Packages [Contents][Index]
constants.lisp (file)
common-lisp
Previous: The fast-websocket․constants package, Up: Packages [Contents][Index]
error.lisp (file)
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 constants | ||
• Exported functions | ||
• Exported conditions | ||
• Exported structures |
Next: Exported functions, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
constants.lisp (file)
constants.lisp (file)
constants.lisp (file)
constants.lisp (file)
constants.lisp (file)
constants.lisp (file)
constants.lisp (file)
constants.lisp (file)
Next: Exported conditions, Previous: Exported constants, Up: Exported definitions [Contents][Index]
error.lisp (file)
compose.lisp (file)
error.lisp (file)
error.lisp (file)
payload.lisp (file)
constants.lisp (file)
parser.lisp (file)
fast-websocket.lisp (file)
ws.lisp (file)
payload.lisp (file)
constants.lisp (file)
constants.lisp (file)
constants.lisp (file)
error.lisp (file)
constants.lisp (file)
ws.lisp (file)
ws.lisp (file)
ws.lisp (file)
ws.lisp (file)
ws.lisp (file)
ws.lisp (file)
ws.lisp (file)
ws.lisp (file)
Next: Exported structures, Previous: Exported functions, Up: Exported definitions [Contents][Index]
error.lisp (file)
protocol-error (condition)
error.lisp (file)
error.lisp (file)
protocol-error (condition)
:length
:max-length
error.lisp (file)
protocol-error (condition)
:require-masking
error.lisp (file)
error (condition)
websocket-parse-error (condition)
error.lisp (file)
websocket-error (condition)
protocol-error (condition)
Previous: Exported conditions, Up: Exported definitions [Contents][Index]
ws.lisp (file)
structure-object (structure)
boolean
ws-fin (function)
(setf ws-fin) (function)
fixnum
-1
ws-opcode (function)
(setf ws-opcode) (function)
boolean
ws-mask (function)
(setf ws-mask) (function)
(simple-array (unsigned-byte 8) (4))
(make-array 4 :element-type (quote (unsigned-byte 8)))
ws-masking-key (function)
(setf ws-masking-key) (function)
integer
0
ws-length (function)
(setf ws-length) (function)
fixnum
0
ws-length-size (function)
(setf ws-length-size) (function)
symbol
ws-mode (function)
(setf ws-mode) (function)
fixnum
0
ws-stage (function)
(setf ws-stage) (function)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal constants | ||
• Internal special variables | ||
• Internal macros | ||
• Internal functions | ||
• Internal types |
Next: Internal special variables, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
error.lisp (file)
error.lisp (file)
Next: Internal macros, Previous: Internal constants, Up: Internal definitions [Contents][Index]
error.lisp (file)
error.lisp (file)
error.lisp (file)
constants.lisp (file)
payload.lisp (file)
compose.lisp (file)
constants.lisp (file)
constants.lisp (file)
constants.lisp (file)
constants.lisp (file)
Next: Internal functions, Previous: Internal special variables, Up: Internal definitions [Contents][Index]
payload.lisp (file)
Next: Internal types, Previous: Internal macros, Up: Internal definitions [Contents][Index]
ws.lisp (file)
fast-websocket.lisp (file)
payload.lisp (file)
compose.lisp (file)
ws.lisp (file)
Previous: Internal functions, Up: Internal definitions [Contents][Index]
parser.lisp (file)
parser.lisp (file)
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: | F L M |
---|
Jump to: | F L M |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | (
A C E F M O R V W |
---|
Jump to: | (
A C E F M O R V W |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | *
+
C F L M O R S |
---|
Jump to: | *
+
C F L M O R S |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | C E F O P S T U W |
---|
Jump to: | C E F O P S T U W |
---|