The portal Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The portal Reference Manual

This is the portal Reference Manual, version 1, generated automatically by Declt version 3.0 "Montgomery Scott" on Mon Apr 19 17:25:54 2021 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Systems

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


Previous: , Up: Systems   [Contents][Index]

1.1 portal

Author

Charles Jackson <charles.b.jackson@protonmail.com>

License

LLGPL

Description

Portable websockets.

Version

1

Dependencies
Source

portal.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

2 Files

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


Previous: , Up: Files   [Contents][Index]

2.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

2.1.1 portal.asd

Location

portal.asd

Systems

portal (system)

Packages

portal-asd


Next: , Previous: , Up: Lisp files   [Contents][Index]

2.1.2 portal/package.lisp

Parent

portal (system)

Location

package.lisp

Packages

portal


Previous: , Up: Lisp files   [Contents][Index]

2.1.3 portal/portal.lisp

Dependency

package.lisp (file)

Parent

portal (system)

Location

portal.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

3 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

3.1 portal-asd

Source

portal.asd

Use List

Previous: , Up: Packages   [Contents][Index]

3.2 portal

Source

package.lisp (file)

Nickname

pws

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Definitions

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


Next: , Previous: , Up: Definitions   [Contents][Index]

4.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

4.1.1 Special variables

Special Variable: *debug-on-error*
Package

portal

Source

portal.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

4.1.2 Macros

Macro: define-resource PATH &key OPEN MESSAGE CLOSE ERROR
Package

portal

Source

portal.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

4.1.3 Functions

Function: server &optional PORT MULTI-THREAD
Package

portal

Source

portal.lisp (file)

Function: server-close WEBSOCKET-SERVER
Package

portal

Source

portal.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

4.1.4 Generic functions

Generic Function: close WEBSOCKET &rest ABORT
Package

portal

Methods
Method: close (WEBSOCKET websocket) &rest ABORT
Source

portal.lisp (file)

Generic Function: header OBJECT
Package

portal

Methods
Method: header (WEBSOCKET websocket)

HTTP header for websocket upgrade.

Source

portal.lisp (file)

Generic Function: ready-state OBJECT
Package

portal

Methods
Method: ready-state (WEBSOCKET websocket)

automatically generated reader method

Source

portal.lisp (file)

Generic Function: send WEBSOCKET MESSAGE
Package

portal

Methods
Method: send (WEBSOCKET websocket) MESSAGE
Source

portal.lisp (file)

Generic Function: send-ping WEBSOCKET MESSAGE
Package

portal

Methods
Method: send-ping (WEBSOCKET websocket) MESSAGE
Source

portal.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

4.1.5 Classes

Class: websocket ()
Package

portal

Source

portal.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: header

HTTP header for websocket upgrade.

Type

list

Initargs

:header

Readers

header (generic function)

Slot: stream
Type

stream

Initargs

:stream

Readers

socket-stream (generic function)

Writers

(setf socket-stream) (generic function)

Slot: ready-state
Type

number

Initform

0

Readers

ready-state (generic function)

Slot: fragment-opcode

Store the type of frame we are currently on.

Readers

opcode (generic function)

Slot: stash

Store the message content before all fames have arrived.

Type

list

Initform

(list)

Readers

stash (generic function)


Previous: , Up: Definitions   [Contents][Index]

4.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

4.2.1 Constants

Constant: +binary+
Package

portal

Source

portal.lisp (file)

Constant: +close+
Package

portal

Source

portal.lisp (file)

Constant: +closed+
Package

portal

Source

portal.lisp (file)

Constant: +closing+

When the first closing frame has been sent or received.

Package

portal

Source

portal.lisp (file)

Constant: +connecting+
Package

portal

Source

portal.lisp (file)

Constant: +continuation+
Package

portal

Source

portal.lisp (file)

Constant: +crlf+
Package

portal

Source

portal.lisp (file)

Constant: +http-version+
Package

portal

Source

portal.lisp (file)

Constant: +ping+
Package

portal

Source

portal.lisp (file)

Constant: +pong+
Package

portal

Source

portal.lisp (file)

Constant: +ready+
Package

portal

Source

portal.lisp (file)

Constant: +sec-key+
Package

portal

Source

portal.lisp (file)

Constant: +text+
Package

portal

Source

portal.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

4.2.2 Functions

Function: alist->header ALIST

Return the string response header corresponding to ALIST.

Package

portal

Source

portal.lisp (file)

Function: call-resource-function FUNCTION-NAME WEBSOCKET &rest ARGUMENTS
Package

portal

Source

portal.lisp (file)

Function: can-upgrade-p HEADER

True if the alist HEADER has qualified to be upgraded to a websocket. If nil, the second value will be the reason.

Package

portal

Source

portal.lisp (file)

Function: header->alist STRING

Return the alist corresponding to the request header STRING.

Package

portal

Source

portal.lisp (file)

Function: read-until STRING &optional STREAM
Package

portal

Source

portal.lisp (file)

Function: sha1-base64 STRING
Package

portal

Source

portal.lisp (file)

Function: starts-with START LIST
Package

portal

Source

portal.lisp (file)

Function: websocket-handler STREAM
Package

portal

Source

portal.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

4.2.3 Generic functions

Generic Function: append-stash WEBSOCKET SEQUENCE
Package

portal

Methods
Method: append-stash (WEBSOCKET websocket) SEQUENCE
Source

portal.lisp (file)

Generic Function: clear-stash WEBSOCKET
Package

portal

Methods
Method: clear-stash (WEBSOCKET websocket)
Source

portal.lisp (file)

Generic Function: get-stash WEBSOCKET
Package

portal

Methods
Method: get-stash (WEBSOCKET websocket)
Source

portal.lisp (file)

Generic Function: opcode OBJECT
Package

portal

Methods
Method: opcode (WEBSOCKET websocket)

Store the type of frame we are currently on.

Source

portal.lisp (file)

Generic Function: read-frame WEBSOCKET
Package

portal

Methods
Method: read-frame (WEBSOCKET websocket)

Read a from from the stream of WEBSOCKET.
when the frame is the last one in a series, return the complete message. Could also return :eof, :close, :error.

Source

portal.lisp (file)

Generic Function: send-close-frame WEBSOCKET
Package

portal

Methods
Method: send-close-frame (WEBSOCKET websocket)
Source

portal.lisp (file)

Generic Function: send-pong WEBSOCKET MESSAGE
Package

portal

Methods
Method: send-pong (WEBSOCKET websocket) MESSAGE
Source

portal.lisp (file)

Generic Function: socket-stream OBJECT
Generic Function: (setf socket-stream) NEW-VALUE OBJECT
Package

portal

Methods
Method: socket-stream (WEBSOCKET websocket)

automatically generated reader method

Source

portal.lisp (file)

Method: (setf socket-stream) NEW-VALUE (WEBSOCKET websocket)

automatically generated writer method

Source

portal.lisp (file)

Generic Function: stash OBJECT
Package

portal

Methods
Method: stash (WEBSOCKET websocket)

Store the message content before all fames have arrived.

Source

portal.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   P  
Index Entry  Section

F
File, Lisp, portal.asd: The portal․asd file
File, Lisp, portal/package.lisp: The portal/package․lisp file
File, Lisp, portal/portal.lisp: The portal/portal․lisp file

L
Lisp File, portal.asd: The portal․asd file
Lisp File, portal/package.lisp: The portal/package․lisp file
Lisp File, portal/portal.lisp: The portal/portal․lisp file

P
portal.asd: The portal․asd file
portal/package.lisp: The portal/package․lisp file
portal/portal.lisp: The portal/portal․lisp file

Jump to:   F   L   P  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

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

(
(setf socket-stream): Internal generic functions
(setf socket-stream): Internal generic functions

A
alist->header: Internal functions
append-stash: Internal generic functions
append-stash: Internal generic functions

C
call-resource-function: Internal functions
can-upgrade-p: Internal functions
clear-stash: Internal generic functions
clear-stash: Internal generic functions
close: Exported generic functions
close: Exported generic functions

D
define-resource: Exported macros

F
Function, alist->header: Internal functions
Function, call-resource-function: Internal functions
Function, can-upgrade-p: Internal functions
Function, header->alist: Internal functions
Function, read-until: Internal functions
Function, server: Exported functions
Function, server-close: Exported functions
Function, sha1-base64: Internal functions
Function, starts-with: Internal functions
Function, websocket-handler: Internal functions

G
Generic Function, (setf socket-stream): Internal generic functions
Generic Function, append-stash: Internal generic functions
Generic Function, clear-stash: Internal generic functions
Generic Function, close: Exported generic functions
Generic Function, get-stash: Internal generic functions
Generic Function, header: Exported generic functions
Generic Function, opcode: Internal generic functions
Generic Function, read-frame: Internal generic functions
Generic Function, ready-state: Exported generic functions
Generic Function, send: Exported generic functions
Generic Function, send-close-frame: Internal generic functions
Generic Function, send-ping: Exported generic functions
Generic Function, send-pong: Internal generic functions
Generic Function, socket-stream: Internal generic functions
Generic Function, stash: Internal generic functions
get-stash: Internal generic functions
get-stash: Internal generic functions

H
header: Exported generic functions
header: Exported generic functions
header->alist: Internal functions

M
Macro, define-resource: Exported macros
Method, (setf socket-stream): Internal generic functions
Method, append-stash: Internal generic functions
Method, clear-stash: Internal generic functions
Method, close: Exported generic functions
Method, get-stash: Internal generic functions
Method, header: Exported generic functions
Method, opcode: Internal generic functions
Method, read-frame: Internal generic functions
Method, ready-state: Exported generic functions
Method, send: Exported generic functions
Method, send-close-frame: Internal generic functions
Method, send-ping: Exported generic functions
Method, send-pong: Internal generic functions
Method, socket-stream: Internal generic functions
Method, stash: Internal generic functions

O
opcode: Internal generic functions
opcode: Internal generic functions

R
read-frame: Internal generic functions
read-frame: Internal generic functions
read-until: Internal functions
ready-state: Exported generic functions
ready-state: Exported generic functions

S
send: Exported generic functions
send: Exported generic functions
send-close-frame: Internal generic functions
send-close-frame: Internal generic functions
send-ping: Exported generic functions
send-ping: Exported generic functions
send-pong: Internal generic functions
send-pong: Internal generic functions
server: Exported functions
server-close: Exported functions
sha1-base64: Internal functions
socket-stream: Internal generic functions
socket-stream: Internal generic functions
starts-with: Internal functions
stash: Internal generic functions
stash: Internal generic functions

W
websocket-handler: Internal functions

Jump to:   (  
A   C   D   F   G   H   M   O   R   S   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *   +  
C   F   H   R   S  
Index Entry  Section

*
*debug-on-error*: Exported special variables

+
+binary+: Internal constants
+close+: Internal constants
+closed+: Internal constants
+closing+: Internal constants
+connecting+: Internal constants
+continuation+: Internal constants
+crlf+: Internal constants
+http-version+: Internal constants
+ping+: Internal constants
+pong+: Internal constants
+ready+: Internal constants
+sec-key+: Internal constants
+text+: Internal constants

C
Constant, +binary+: Internal constants
Constant, +close+: Internal constants
Constant, +closed+: Internal constants
Constant, +closing+: Internal constants
Constant, +connecting+: Internal constants
Constant, +continuation+: Internal constants
Constant, +crlf+: Internal constants
Constant, +http-version+: Internal constants
Constant, +ping+: Internal constants
Constant, +pong+: Internal constants
Constant, +ready+: Internal constants
Constant, +sec-key+: Internal constants
Constant, +text+: Internal constants

F
fragment-opcode: Exported classes

H
header: Exported classes

R
ready-state: Exported classes

S
Slot, fragment-opcode: Exported classes
Slot, header: Exported classes
Slot, ready-state: Exported classes
Slot, stash: Exported classes
Slot, stream: Exported classes
Special Variable, *debug-on-error*: Exported special variables
stash: Exported classes
stream: Exported classes

Jump to:   *   +  
C   F   H   R   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   P   S   W  
Index Entry  Section

C
Class, websocket: Exported classes

P
Package, portal: The portal package
Package, portal-asd: The portal-asd package
portal: The portal system
portal: The portal package
portal-asd: The portal-asd package

S
System, portal: The portal system

W
websocket: Exported classes

Jump to:   C   P   S   W