The clws Reference Manual

Table of Contents

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

The clws Reference Manual

This is the clws Reference Manual, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 03:44:31 2018 GMT+0.


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

1 Introduction

CLWS - a WebSocket server in Common Lisp

Currently requires SBCL or CCL, but shouldn't be too hard to port to other implementations/platforms supported by iolib.

Supports WebSocket draft protocols 7,8, and 13, and optionally 0.

Doesn't currently support wss: (TLS/SSL) connections, but proxying behind stud or stunnel should work.

Sample usage: Echo Server

First, set up a package:

(defpackage #:clws-echo
  (:use :cl :clws))

(in-package #:clws-echo)

Then we can start the websockets server, here we use port 12345:

(bordeaux-threads:make-thread (lambda ()
                                (run-server 12345))
                              :name "websockets server")

Next we need to define a 'resource', which we will call /echo (so we will connect with URIs like ws://localhost/echo). To do that, we subclass ws-resource and specialize a few generic functions on that class:

(defclass echo-resource (ws-resource)
  ())

(defmethod resource-client-connected ((res echo-resource) client)
  (format t "got connection on echo server from ~s : ~s~%" (client-host client) (client-port client))
  t)

(defmethod resource-client-disconnected ((resource echo-resource) client)
  (format t "Client disconnected from resource ~A: ~A~%" resource client))

(defmethod resource-received-text ((res echo-resource) client message)
  (format t "got frame ~s from client ~s" message client)
  (write-to-client-text client message))

(defmethod resource-received-binary((res echo-resource) client message)
  (format t "got binary frame ~s from client ~s" (length message) client)
  (write-to-client-binary client message))

Finally, we register the resource with the server, and start a thread to handle messages for that resource:

(register-global-resource "/echo"
                          (make-instance 'echo-resource)
                          (origin-prefix "http://127.0.0.1" "http://localhost"))

(bordeaux-threads:make-thread (lambda ()
                                (run-resource-listener
                                 (find-global-resource "/echo")))
                              :name "resource listener for /echo")

Configuration variables

Resource handler API

Sending data to clients

Getting information about connected clients

(most of these should be treated as read-only, and any visible setf functions may go away at some point)


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

2 Systems

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


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

2.1 clws

Description

CLWS implement the WebSocket Protocol as described by
RFC6455[1] (as well as some older drafts implemented by recent browsers [2][3][4][5]). Only a WebSockets server implementation is provided.

[1]http://tools.ietf.org/html/rfc6455
[2] http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17 [3] http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-08 [4] http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07 [5] http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-00

Dependencies
Source

clws.asd (file)

Components

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

3 Files

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


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

3.1 Lisp


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

3.1.1 clws.asd

Location

clws.asd

Systems

clws (system)

Packages

clws-system


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

3.1.2 clws/package.lisp

Parent

clws (system)

Location

package.lisp

Packages

clws


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

3.1.3 clws/sb-concurrency-patch.lisp

Dependency

package.lisp (file)

Parent

clws (system)

Location

sb-concurrency-patch.lisp


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

3.1.4 clws/concurrency-sbcl.lisp

Dependency

sb-concurrency-patch.lisp (file)

Parent

clws (system)

Location

concurrency-sbcl.lisp

Internal Definitions

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

3.1.5 clws/util.lisp

Dependency

concurrency-sbcl.lisp (file)

Parent

clws (system)

Location

util.lisp

Internal Definitions

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

3.1.6 clws/config.lisp

Dependency

util.lisp (file)

Parent

clws (system)

Location

config.lisp

Exported Definitions
Internal Definitions

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

3.1.7 clws/buffer.lisp

Dependency

config.lisp (file)

Parent

clws (system)

Location

buffer.lisp

Internal Definitions

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

3.1.8 clws/protocol-common.lisp

Dependency

buffer.lisp (file)

Parent

clws (system)

Location

protocol-common.lisp

Internal Definitions

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

3.1.9 clws/protocol-00.lisp

Dependency

protocol-common.lisp (file)

Parent

clws (system)

Location

protocol-00.lisp

Internal Definitions

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

3.1.10 clws/protocol-7.lisp

Dependency

protocol-00.lisp (file)

Parent

clws (system)

Location

protocol-7.lisp

Internal Definitions

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

3.1.11 clws/protocol.lisp

Dependency

protocol-7.lisp (file)

Parent

clws (system)

Location

protocol.lisp

Exported Definitions
Internal Definitions

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

3.1.12 clws/client.lisp

Dependency

protocol.lisp (file)

Parent

clws (system)

Location

client.lisp

Exported Definitions
Internal Definitions

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

3.1.13 clws/resource.lisp

Dependency

client.lisp (file)

Parent

clws (system)

Location

resource.lisp

Exported Definitions
Internal Definitions

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

3.1.14 clws/server.lisp

Dependency

resource.lisp (file)

Parent

clws (system)

Location

server.lisp

Exported Definitions

run-server (function)

Internal Definitions

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

4 Packages

Packages are listed by definition order.


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

4.1 clws-system

Source

clws.asd

Use List

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

4.2 clws

Source

package.lisp (file)

Nickname

ws

Use List
Exported Definitions
Internal Definitions

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

5 Definitions

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


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

5.1 Exported definitions


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

5.1.1 Special variables

Special Variable: *debug-on-resource-errors*

set to T to enter debugger on resource-handler errors, NIL to drop the connections and try to send a disconnect to handler.

Package

clws

Source

config.lisp (file)

Special Variable: *debug-on-server-errors*

set to T to enter debugger on server errors, NIL to just drop the connections.

Package

clws

Source

config.lisp (file)

Special Variable: *log-level*

set to NIL to disable log messages, T to enable

Package

clws

Source

config.lisp (file)

Special Variable: *max-clients*

Max number of simultaneous clients allowed (nil for no limit).
Extra connections will get a HTTP 5xx response (without reading headers).

Package

clws

Source

config.lisp (file)

Special Variable: *max-read-frame-size*

Max size of frames allowed. Connection will be dropped if client sends a larger frame.

Package

clws

Source

config.lisp (file)

Special Variable: *protocol-76/00-support*

set to NIL to disable draft-hixie-76/draft-ietf-00 support, true to enable.

Package

clws

Source

config.lisp (file)


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

5.1.2 Functions

Function: any-origin O
Package

clws

Source

resource.lisp (file)

Function: find-global-resource NAME

Returns the resource registered via REGISTER-GLOBAL-RESOURCE with name NAME.

Package

clws

Source

resource.lisp (file)

Function: kill-resource-listener RESOURCE

Terminates a RUN-RESOURCE-LISTENER from another thread.

Package

clws

Source

resource.lisp (file)

Function: origin-exact &rest ORIGINS

Returns a function that checks whether a given path matches any of the origins passed as arguments exactly.

Package

clws

Source

resource.lisp (file)

Function: origin-prefix &rest PREFIXES

Returns a function that checks whether a given path matches any of the prefixes passed as arguments.

Package

clws

Source

resource.lisp (file)

Function: register-global-resource NAME RESOURCE-HANDLER ORIGIN-VALIDATION-FN

Registers a resource instance where NAME is a path string like ’/swank’, resource-handler is an instance of WS-RESOURCE, and ORIGIN-VALIDATION-FN is a function that takes an origin string as input and returns T if that origin is allowed to access this resource.

Package

clws

Source

resource.lisp (file)

Function: run-resource-listener RESOURCE

Runs a resource listener in its own thread indefinitely, calling RESOURCE-CLIENT-DISCONNECTED and RESOURCE-RECEIVED-FRAME as appropriate.

Package

clws

Source

resource.lisp (file)

Function: run-server PORT &key ADDR

Starts a server on the given PORT and blocks until the server is closed. Intended to run in a dedicated thread (the current one), dubbed the Server Thread.

Establishes a socket listener in the current thread. This thread handles all incoming connections, and because of this fact is able to handle far more concurrent connections than it would be able to if it spawned off a new thread for each connection. As such, most of the processing is done on the Server Thread, though most user functions are thread-safe.

Package

clws

Source

server.lisp (file)

Function: unregister-global-resource NAME

Removes the resource registered via REGISTER-GLOBAL-RESOURCE with name NAME.

Package

clws

Source

resource.lisp (file)

Function: write-to-client-binary CLIENT MESSAGE &key FRAME-SIZE

writes a binary message to client. MESSAGE should either be an octet vector containing data to be sent. If FRAME-SIZE is set, breaks message into frames no larger than FRAME-SIZE octets.

Package

clws

Source

protocol.lisp (file)

Function: write-to-client-close CLIENT &key CODE MESSAGE

Write a close message to client, and starts closing connection. If set, CODE must be a valid close code for current protocol version, and MESSAGE should be a string that encodes to fewer than 123 octets as UTF8 (it will be ignored otherwise)

Package

clws

Source

protocol.lisp (file)

Function: write-to-client-text CLIENT MESSAGE &key FRAME-SIZE

writes a text message to client. MESSAGE should either be a string, or an octet vector containing a UTF-8 encoded string. If FRAME-SIZE is set, breaks message into frames no larger than FRAME-SIZE octets.

Package

clws

Source

protocol.lisp (file)

Function: write-to-clients-binary CLIENTS MESSAGE &key FRAME-SIZE

Like WRITE-TO-CLIENT-BINARY but sends the message to all of the CLIENTS. Should be faster than separate calls due to only needing to encode and build frames once.

Package

clws

Source

client.lisp (file)

Function: write-to-clients-text CLIENTS MESSAGE &key FRAME-SIZE

Like WRITE-TO-CLIENT-TEXT but sends the message to all of the clients. Should be faster than separate calls due to only needing to encode and build frames once.

Package

clws

Source

client.lisp (file)


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

5.1.3 Generic functions

Generic Function: call-on-resource-thread RESOURCE FN

Funcalls FN on the resource thread of RESOURCE.

Package

clws

Source

resource.lisp (file)

Methods
Method: call-on-resource-thread RESOURCE FN
Generic Function: client-connection-headers OBJECT
Generic Function: (setf client-connection-headers) NEW-VALUE OBJECT
Package

clws

Methods
Method: client-connection-headers (CLIENT client)

automatically generated reader method

Source

client.lisp (file)

Method: (setf client-connection-headers) NEW-VALUE (CLIENT client)

automatically generated writer method

Source

client.lisp (file)

Generic Function: client-connection-rejected OBJECT
Generic Function: (setf client-connection-rejected) NEW-VALUE OBJECT
Package

clws

Methods
Method: client-connection-rejected (CLIENT client)

automatically generated reader method

Source

client.lisp (file)

Method: (setf client-connection-rejected) NEW-VALUE (CLIENT client)

automatically generated writer method

Source

client.lisp (file)

Generic Function: client-host OBJECT
Package

clws

Methods
Method: client-host (CLIENT client)

automatically generated reader method

Source

client.lisp (file)

Generic Function: client-port OBJECT
Package

clws

Methods
Method: client-port (CLIENT client)

automatically generated reader method

Source

client.lisp (file)

Generic Function: client-query-string OBJECT
Generic Function: (setf client-query-string) NEW-VALUE OBJECT
Package

clws

Methods
Method: client-query-string (CLIENT client)

automatically generated reader method

Source

client.lisp (file)

Method: (setf client-query-string) NEW-VALUE (CLIENT client)

automatically generated writer method

Source

client.lisp (file)

Generic Function: client-resource-name OBJECT
Generic Function: (setf client-resource-name) NEW-VALUE OBJECT
Package

clws

Methods
Method: client-resource-name (CLIENT client)

automatically generated reader method

Source

client.lisp (file)

Method: (setf client-resource-name) NEW-VALUE (CLIENT client)

automatically generated writer method

Source

client.lisp (file)

Generic Function: client-websocket-version OBJECT
Generic Function: (setf client-websocket-version) NEW-VALUE OBJECT
Package

clws

Methods
Method: client-websocket-version (CLIENT client)

automatically generated reader method

Source

client.lisp (file)

Method: (setf client-websocket-version) NEW-VALUE (CLIENT client)

automatically generated writer method

Source

client.lisp (file)

Generic Function: resource-accept-connection RES RESOURCE-NAME HEADERS CLIENT

Decides whether to accept a connection and returns
values to process the connection further. Defaults to accepting all connections and using the default mailbox and origin, so most resources shouldn’t need to define a method.

Passed values
- RES is the instance of ws-resource
- RESOURCE-NAME is the resource name requested by the client (string) - HEADERS is the hash table of headers from the client
- client is the instance of client

Returns values
1. NIL if the connection should be rejected, or non-nil otherwise 2. Concurrent mailbox in which to place messages received from the client, or NIL for default
3. origin from which to claim this resource is responding, or NIL for default.
4. handshake-resource or NIL for default
5. protocol or NIL for default

Most of the time this function will just return true for the first value to accept the connection, and nil for the other values.

Note that the connection is not fully established yet, so this function should not try to send anything to the client, see resource-client-connected for that.

This function may be called from a different thread than most resource functions, so methods should be careful about accessing shared data, and should avoid blocking for extended periods.

Package

clws

Source

resource.lisp (file)

Methods
Method: resource-accept-connection RES RESOURCE-NAME HEADERS CLIENT
Generic Function: resource-client-connected RESOURCE CLIENT

Called when a client finishes connecting to a
WebSockets resource, and data can be sent to the client.

Methods can return :reject to immediately close the connection and ignore any already received data from this client.

Package

clws

Source

resource.lisp (file)

Methods
Method: resource-client-connected RES CLIENT
Generic Function: resource-client-disconnected RESOURCE CLIENT

Called when a client disconnected from a WebSockets resource.

Package

clws

Source

resource.lisp (file)

Generic Function: resource-received-binary RESOURCE CLIENT MESSAGE

Called when a client sent a binary message to a WebSockets resource.

Package

clws

Source

resource.lisp (file)

Generic Function: resource-received-text RESOURCE CLIENT MESSAGE

Called when a client sent a text message to a WebSockets resource.

Package

clws

Source

resource.lisp (file)

Generic Function: send-custom-message-to-resource RESOURCE MESSAGE

Thread-safe way to pass a message to the resource
listener. Any message passed with this function will result in RESOURCE-RECEIVED-CUSTOM-MESSAGE being called on the resource thread with the second argument of this function.

Package

clws

Source

resource.lisp (file)

Methods
Method: send-custom-message-to-resource RESOURCE MESSAGE

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

5.1.4 Classes

Class: ws-resource ()

A server may have many resources, each associated
with a particular resource path (like /echo or /chat). An single instance of a resource handles all requests on the server for that particular url, with the help of RUN-RESOURCE-LISTENER, RESOURCE-RECEIVED-FRAME, and RESOURCE-CLIENT-DISCONNECTED.

Package

clws

Source

resource.lisp (file)

Direct superclasses

standard-object (class)

Direct methods

resource-read-queue (method)

Direct slots
Slot: read-queue
Initform

(clws::make-mailbox)

Readers

resource-read-queue (generic function)


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

5.2 Internal definitions


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

5.2.1 Special variables

Special Variable: *400-message*
Package

clws

Source

config.lisp (file)

Special Variable: *403-message*
Package

clws

Source

config.lisp (file)

Special Variable: *404-message*
Package

clws

Source

config.lisp (file)

Special Variable: *close-frame*
Package

clws

Source

client.lisp (file)

Special Variable: *draft-76/00-close-frame*
Package

clws

Source

protocol-00.lisp (file)

Special Variable: *max-handler-read-backlog*

Max number of frames that can be queued before the reader will start throttling reads for clients using that queue (for now, just drops the connections...).

Package

clws

Source

config.lisp (file)

Special Variable: *max-header-size*

Default max header size in octets (not used yet?)

Package

clws

Source

config.lisp (file)

Special Variable: *max-read-message-size*

Largest (incomplete) message allowed. Connection will be dropped if client sends a larger message. Malicious clients can cause lower amounts to be buffered indefinitely though, so be careful with large settings.

Package

clws

Source

config.lisp (file)

Special Variable: *max-write-backlog*

Max number of queued write frames before dropping a client.

Package

clws

Source

client.lisp (file)

Special Variable: *policy-file*

cross-domain policy file, used for the Flash WebSocket emulator.

Package

clws

Source

config.lisp (file)

Special Variable: *policy-file-request*
Package

clws

Source

protocol.lisp (file)

Special Variable: *protocol-header-parsers*
Package

clws

Source

protocol-common.lisp (file)

Special Variable: *resources*

hash mapping resource name to (list of handler instance, origin validation function, ?)

Package

clws

Source

resource.lisp (file)

Special Variable: *server-busy-message*
Package

clws

Source

server.lisp (file)

Special Variable: *supported-protocol-versions*
Package

clws

Source

protocol-common.lisp (file)


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

5.2.2 Macros

Macro: make-array-ubyte8 SIZE &key INITIAL-ELEMENT INITIAL-CONTENTS
Package

clws

Source

util.lisp (file)

Macro: with-buffer-as-stream (BUFFER STREAM) &body BODY
Package

clws

Source

buffer.lisp (file)


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

5.2.3 Functions

Function: %client-enqueue-write-or-kill FRAME CLIENT
Package

clws

Source

client.lisp (file)

Function: %write-to-client CLIENT OCTETS-OR-KEYWORD

Writes given data to specified client, where OCTETS-OR-KEYWORD is either an octet-vector, or :CLOSE, or a list (:CLOSE CLOSE-OCTETS), where CLOSE-OCTETS is an octet vector to send for close frame. If no close frame is provided, a default close frame will be sent.

Package

clws

Source

client.lisp (file)

Function: add-reader-to-client CLIENT &key INIT-FUNCTION
Package

clws

Source

buffer.lisp (file)

Function: binary-message-for-protocol PROTOCOL MESSAGE &key FRAME-SIZE
Package

clws

Source

protocol.lisp (file)

Function: build-frames OPCODE OCTETS FRAME-SIZE
Package

clws

Source

protocol.lisp (file)

Function: call-with-buffer-as-stream BUFFER THUNK
Package

clws

Source

buffer.lisp (file)

Function: client-dequeue-read CLIENT

Non-blocking call to dequeue a piece of data from a client’ read-queue.

Package

clws

Source

client.lisp (file)

Function: client-dequeue-write CLIENT

Non-blocking call to dequeue a piece of data in the write-queue to be sent to the client.

Package

clws

Source

client.lisp (file)

Function: client-enqueue-read CLIENT DATA

Adds a piece of data to the client’s read-queue so that it may be read and processed.

Package

clws

Source

client.lisp (file)

Function: client-enqueue-write CLIENT DATA

Adds data to the client’s write-queue and asynchronously send it to the client.

Package

clws

Source

client.lisp (file)

Function: close-frame-for-protocol PROTOCOL &key CODE MESSAGE
Package

clws

Source

protocol.lisp (file)

Function: dequeue QUEUE

Retrieves the oldest value in QUEUE and returns it as the primary value, and T as secondary value. If the queue is empty, returns NIL as both primary and secondary value.

Package

clws

Source

concurrency-sbcl.lisp (file)

Function: disconnect-client CLIENT
Package

clws

Source

resource.lisp (file)

Function: dispatch-control-message CLIENT OPCODE
Package

clws

Source

protocol-7.lisp (file)

Function: dispatch-frame CLIENT LENGTH
Package

clws

Source

protocol-7.lisp (file)

Function: dispatch-message CLIENT
Package

clws

Source

protocol-7.lisp (file)

Function: dispatch-protocols CLIENT
Package

clws

Source

protocol.lisp (file)

Function: enqueue VALUE QUEUE

Adds VALUE to the end of QUEUE. Returns VALUE.

Package

clws

Source

concurrency-sbcl.lisp (file)

Function: extract-key K
Package

clws

Source

protocol-00.lisp (file)

Function: get-utf8-string-or-fail CHUNK-BUFFER &key SKIP-OCTETS-END
Package

clws

Source

protocol-common.lisp (file)

Function: ignore-remaining-input CLIENT
Package

clws

Source

protocol.lisp (file)

Function: invalid-header CLIENT
Package

clws

Source

protocol.lisp (file)

Function: lg &rest ARGS
Package

clws

Source

util.lisp (file)

Function: mailbox-count MAILBOX

The non-blocking variant of RECEIVE-MESSAGE. Returns two values, the message removed from MAILBOX, and a flag specifying whether a message could be received.

Package

clws

Source

concurrency-sbcl.lisp (file)

Function: mailbox-empty-p MAILBOX

Returns true if MAILBOX is currently empty, NIL otherwise.

Package

clws

Source

concurrency-sbcl.lisp (file)

Function: mailbox-list-messages MAILBOX

Returns a fresh list containing all the messages in the mailbox. Does not remove messages from the mailbox.

Package

clws

Source

concurrency-sbcl.lisp (file)

Function: mailbox-receive-message MAILBOX &key

Removes the oldest message from MAILBOX and returns it as the primary value. If MAILBOX is empty waits until a message arrives.

Package

clws

Source

concurrency-sbcl.lisp (file)

Function: mailbox-receive-message-no-hang MAILBOX

The non-blocking variant of RECEIVE-MESSAGE. Returns two values, the message removed from MAILBOX, and a flag specifying whether a message could be received.

Package

clws

Source

concurrency-sbcl.lisp (file)

Function: mailbox-receive-pending-messages MAILBOX &optional N

Removes and returns all (or at most N) currently pending messages from MAILBOX, or returns NIL if no messages are pending.

Note: Concurrent threads may be snarfing messages during the run of this function, so even though X,Y appear right next to each other in the result, does not necessarily mean that Y was the message sent right after X.

Package

clws

Source

concurrency-sbcl.lisp (file)

Function: mailbox-send-message MAILBOX MESSAGE

Adds a MESSAGE to MAILBOX. Message can be any object.

Package

clws

Source

concurrency-sbcl.lisp (file)

Function: mailboxp MAILBOX

Returns true if MAILBOX is currently empty, NIL otherwise.

Package

clws

Source

concurrency-sbcl.lisp (file)

Function: make-challenge-00 K1 K2 K3
Package

clws

Source

protocol-00.lisp (file)

Function: make-challenge-o7 K &aux O7-GUID

Compute the WebSocket opening handshake challenge, according to:

http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07#section-1.3

Test this with the example provided in the above document:

(string= (clws::make-challenge-o7 "dGhlIHNhbXBsZSBub25jZQ==") "s3pPLMBiTxaQ9kYGzzhZRbK+xOo=")

..which must return T.

Package

clws

Source

protocol-7.lisp (file)

Function: make-domain-policy &key FROM TO-PORT

Generates a very basic cross-domain policy file, used for the WebSocket emulation via Flash.

For more information on what that is, see http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html

Package

clws

Source

util.lisp (file)

Function: make-frame-from-string STRING

Given a string, returns bytes that can be transmitted to the client as a WebSockets frame.

Package

clws

Source

client.lisp (file)

Function: make-handshake-76 ORIGIN LOCATION PROTOCOL
Package

clws

Source

protocol-00.lisp (file)

Function: make-listener-handler SERVER SOCKET SERVER-HOOK
Package

clws

Source

server.lisp (file)

Function: make-mailbox &key NAME INITIAL-CONTENTS

Returns a new MAILBOX with messages in INITIAL-CONTENTS enqueued.

Package

clws

Source

concurrency-sbcl.lisp (file)

Function: make-queue &key NAME INITIAL-CONTENTS

Returns a new QUEUE with NAME and contents of the INITIAL-CONTENTS sequence enqueued.

Package

clws

Source

concurrency-sbcl.lisp (file)

Function: match-headers CLIENT
Package

clws

Source

protocol.lisp (file)

Function: match-policy-file BUFFER
Package

clws

Source

protocol.lisp (file)

Function: match-resource-line BUFFER
Package

clws

Source

protocol.lisp (file)

Function: maybe-policy-file BUFFER
Package

clws

Source

protocol.lisp (file)

Function: next-reader-state BUFFER PREDICATE CALLBACK
Package

clws

Source

buffer.lisp (file)

Function: octet-count-matcher N
Package

clws

Source

protocol.lisp (file)

Function: octet-pattern-matcher OCTETS &optional MAX-OCTETS
Package

clws

Source

protocol.lisp (file)

Function: pong-frame-for-protocol PROTOCOL BODY
Package

clws

Source

protocol.lisp (file)

Function: protocol-13-parse-headers CLIENT
Package

clws

Source

protocol-7.lisp (file)

Function: protocol-7+-extended-length CLIENT OCTETS MASKED
Package

clws

Source

protocol-7.lisp (file)

Function: protocol-7+-handshake CLIENT VERSION-STRING ORIGIN-KEY
Package

clws

Source

protocol-7.lisp (file)

Function: protocol-7+-read-frame CLIENT LENGTH MASK
Package

clws

Source

protocol-7.lisp (file)

Function: protocol-7+-read-mask CLIENT LENGTH
Package

clws

Source

protocol-7.lisp (file)

Function: protocol-7+-start-frame CLIENT
Package

clws

Source

protocol-7.lisp (file)

Function: protocol-7-parse-headers CLIENT
Package

clws

Source

protocol-7.lisp (file)

Function: protocol-76/00-frame-start CLIENT
Package

clws

Source

protocol-00.lisp (file)

Function: protocol-76/00-nonce CLIENT
Package

clws

Source

protocol-00.lisp (file)

Function: protocol-76/00-read-binary-frame CLIENT
Package

clws

Source

protocol-00.lisp (file)

Function: protocol-76/00-read-text-frame CLIENT
Package

clws

Source

protocol-00.lisp (file)

Function: protocol-8-parse-headers CLIENT
Package

clws

Source

protocol-7.lisp (file)

Function: send-error-and-close CLIENT MESSAGE
Package

clws

Source

protocol.lisp (file)

Function: special-client-write-value-p VALUE

Certain values, like :close and :enable-read, are special symbols that may be passed to WRITE-TO-CLIENT or otherwise enqueued on the client’s write queue. This predicate returns T if value is one of those special values

Package

clws

Source

client.lisp (file)

Function: string-to-shareable-octets STRING &key ENCODING START END USE-BOM ERRORP
Package

clws

Source

util.lisp (file)

Function: text-message-for-protocol PROTOCOL MESSAGE &key FRAME-SIZE
Package

clws

Source

protocol.lisp (file)

Function: try-write-client CLIENT

Should only be called on the server thread,
attempts to flush some of the data in the write-queue in a non-blocking fashion.

Package

clws

Source

client.lisp (file)

Function: unsupported-protocol-version CLIENT
Package

clws

Source

protocol.lisp (file)

Function: valid-resource-p SERVER RESOURCE

Returns non-nil if there is a handler registered for the resource of the given name (a string).

Package

clws

Source

resource.lisp (file)


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

5.2.4 Generic functions

Generic Function: %client-host OBJECT
Package

clws

Methods
Method: %client-host (CLIENT client)

automatically generated reader method

Source

client.lisp (file)

Generic Function: %client-server-hook OBJECT
Package

clws

Methods
Method: %client-server-hook (CLIENT client)

Function to call to send a command to
the network thread from other threads

Source

client.lisp (file)

Generic Function: %get-chunks CB
Package

clws

Methods
Method: %get-chunks (B buffered-reader)
Source

buffer.lisp (file)

Method: %get-chunks (CB chunk-buffer)
Source

buffer.lisp (file)

Generic Function: add-chunk CB VECTOR START END
Package

clws

Methods
Method: add-chunk (CB chunk-buffer) VECTOR START END
Source

buffer.lisp (file)

Generic Function: add-chunks CB MORE
Package

clws

Methods
Method: add-chunks (CB chunk-buffer) (MORE chunk-buffer)
Source

buffer.lisp (file)

Generic Function: buffer-count BUFFER
Package

clws

Methods
Method: buffer-count (BUFFER buffer-chunk)
Source

buffer.lisp (file)

Generic Function: buffer-end OBJECT
Package

clws

Methods
Method: buffer-end (BUFFER-CHUNK buffer-chunk)

automatically generated reader method

Source

buffer.lisp (file)

Generic Function: buffer-size OBJECT
Generic Function: (setf buffer-size) NEW-VALUE OBJECT
Package

clws

Methods
Method: buffer-size (CHUNK-BUFFER chunk-buffer)

automatically generated reader method

Source

buffer.lisp (file)

Method: (setf buffer-size) NEW-VALUE (CHUNK-BUFFER chunk-buffer)

automatically generated writer method

Source

buffer.lisp (file)

Generic Function: buffer-start OBJECT
Package

clws

Methods
Method: buffer-start (BUFFER-CHUNK buffer-chunk)

automatically generated reader method

Source

buffer.lisp (file)

Generic Function: buffer-vector OBJECT
Package

clws

Methods
Method: buffer-vector (BUFFER-CHUNK buffer-chunk)

automatically generated reader method

Source

buffer.lisp (file)

Generic Function: callback OBJECT
Generic Function: (setf callback) NEW-VALUE OBJECT
Package

clws

Methods
Method: callback (BUFFERED-READER buffered-reader)

automatically generated reader method

Source

buffer.lisp (file)

Method: (setf callback) NEW-VALUE (BUFFERED-READER buffered-reader)

automatically generated writer method

Source

buffer.lisp (file)

Generic Function: chunks OBJECT
Generic Function: (setf chunks) NEW-VALUE OBJECT
Package

clws

Methods
Method: chunks (BUFFERED-READER buffered-reader)

automatically generated reader method

Source

buffer.lisp (file)

Method: (setf chunks) NEW-VALUE (BUFFERED-READER buffered-reader)

automatically generated writer method

Source

buffer.lisp (file)

Method: chunks (CHUNK-BUFFER chunk-buffer)

automatically generated reader method

Source

buffer.lisp (file)

Method: (setf chunks) NEW-VALUE (CHUNK-BUFFER chunk-buffer)

automatically generated writer method

Source

buffer.lisp (file)

Generic Function: client-connection-state OBJECT
Generic Function: (setf client-connection-state) NEW-VALUE OBJECT
Package

clws

Methods
Method: client-connection-state (CLIENT client)
Method: (setf client-connection-state) NEW-VALUE (CLIENT client)

State of connection:
:connecting when initially created
:headers while reading headers,
:connected after server handshake sent
:failed after an error has occurred and further input/output will be ignored :closing when close has been sent but not received from peer (input is still valid, but no more output will be sent)

Source

client.lisp (file)

Generic Function: client-disable-handler CLIENT &key READ WRITE ERROR

Stop listening for READ, WRITE, or ERROR events on the socket for the given client object.

Package

clws

Source

client.lisp (file)

Methods
Method: client-disable-handler (CLIENT client) &key READ WRITE ERROR
Generic Function: client-disconnect CLIENT &key READ WRITE CLOSE ABORT

Shutdown 1 or both sides of a connection, close it if both sides shutdown

Package

clws

Source

client.lisp (file)

Methods
Method: client-disconnect (CLIENT client) &key READ WRITE CLOSE ABORT

shutdown 1 or both sides of a connection, close it if both sides shutdown

Generic Function: client-enable-handler CLIENT &key READ WRITE ERROR

Enables the read, write, or error handler for a a
client. Once a read handler is set up, the client can handle the handshake coming in from the client.

Package

clws

Source

client.lisp (file)

Methods
Method: client-enable-handler (CLIENT client) &key READ WRITE ERROR
Generic Function: client-error-active CLIENT
Package

clws

Methods
Method: client-error-active (CLIENT client)
Source

client.lisp (file)

Generic Function: client-handler-data OBJECT
Generic Function: (setf client-handler-data) NEW-VALUE OBJECT
Package

clws

Methods
Method: client-handler-data (CLIENT client)
Method: (setf client-handler-data) NEW-VALUE (CLIENT client)

Space for handler to store connection specific data.

Source

client.lisp (file)

Generic Function: client-read-closed OBJECT
Generic Function: (setf client-read-closed) NEW-VALUE OBJECT
Package

clws

Methods
Method: client-read-closed (CLIENT client)
Method: (setf client-read-closed) NEW-VALUE (CLIENT client)

Flag indicates read side of the connection is closed

Source

client.lisp (file)

Generic Function: client-read-queue OBJECT
Generic Function: (setf client-read-queue) NEW-VALUE OBJECT
Package

clws

Methods
Method: client-read-queue (CLIENT client)
Method: (setf client-read-queue) NEW-VALUE (CLIENT client)

queue of decoded lines/frames

Source

client.lisp (file)

Generic Function: client-reader OBJECT
Generic Function: (setf client-reader) NEW-VALUE OBJECT
Package

clws

Methods
Method: client-reader (CLIENT client)
Method: (setf client-reader) NEW-VALUE (CLIENT client)

Read handler for this queue/socket

Source

client.lisp (file)

Generic Function: client-reader-active CLIENT
Package

clws

Methods
Method: client-reader-active (CLIENT client)
Source

client.lisp (file)

Generic Function: client-resource OBJECT
Generic Function: (setf client-resource) NEW-VALUE OBJECT
Package

clws

Methods
Method: client-resource (CLIENT client)
Method: (setf client-resource) NEW-VALUE (CLIENT client)

The resource object the client has
requested– Not the string, but the object.

Source

client.lisp (file)

Generic Function: client-server OBJECT
Package

clws

Methods
Method: client-server (CLIENT client)

The instance of WS:SERVER that owns this client.

Source

client.lisp (file)

Generic Function: client-socket OBJECT
Package

clws

Methods
Method: client-socket (CLIENT client)

Bidirectional socket stream used for communicating with the client.

Source

client.lisp (file)

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

clws

Methods
Method: client-socket-closed (CLIENT client)
Method: (setf client-socket-closed) NEW-VALUE (CLIENT client)

Flag indicates connection is closed

Source

client.lisp (file)

Generic Function: client-write-buffer OBJECT
Generic Function: (setf client-write-buffer) NEW-VALUE OBJECT
Package

clws

Methods
Method: client-write-buffer (CLIENT client)
Method: (setf client-write-buffer) NEW-VALUE (CLIENT client)

Buffer being written currently, if
last write couldn’t send whole thing

Source

client.lisp (file)

Generic Function: client-write-closed OBJECT
Generic Function: (setf client-write-closed) NEW-VALUE OBJECT
Package

clws

Methods
Method: client-write-closed (CLIENT client)
Method: (setf client-write-closed) NEW-VALUE (CLIENT client)

Flag indicates write side of the connection is closed

Source

client.lisp (file)

Generic Function: client-write-offset OBJECT
Generic Function: (setf client-write-offset) NEW-VALUE OBJECT
Package

clws

Methods
Method: client-write-offset (CLIENT client)
Method: (setf client-write-offset) NEW-VALUE (CLIENT client)

Offset into write-buffer if write-buffer is set

Source

client.lisp (file)

Generic Function: client-write-queue OBJECT
Package

clws

Methods
Method: client-write-queue (CLIENT client)

Queue of buffers (octet vectors) to
write, or :close to kill connection :enable-read to reenable reader after being disabled for flow control (mailbox instead of queue since it tracks length).

Source

client.lisp (file)

Generic Function: client-writer-active CLIENT
Package

clws

Methods
Method: client-writer-active (CLIENT client)
Source

client.lisp (file)

Generic Function: end-of-chunks OBJECT
Generic Function: (setf end-of-chunks) NEW-VALUE OBJECT
Package

clws

Methods
Method: end-of-chunks (CHUNK-BUFFER chunk-buffer)

automatically generated reader method

Source

buffer.lisp (file)

Method: (setf end-of-chunks) NEW-VALUE (CHUNK-BUFFER chunk-buffer)

automatically generated writer method

Source

buffer.lisp (file)

Generic Function: error-callback OBJECT
Generic Function: (setf error-callback) NEW-VALUE OBJECT
Package

clws

Methods
Method: error-callback (BUFFERED-READER buffered-reader)

automatically generated reader method

Source

buffer.lisp (file)

Method: (setf error-callback) NEW-VALUE (BUFFERED-READER buffered-reader)

automatically generated writer method

Source

buffer.lisp (file)

Generic Function: frame-fin OBJECT
Generic Function: (setf frame-fin) NEW-VALUE OBJECT
Package

clws

Methods
Method: frame-fin (CLIENT client)

automatically generated reader method

Source

client.lisp (file)

Method: (setf frame-fin) NEW-VALUE (CLIENT client)

automatically generated writer method

Source

client.lisp (file)

Generic Function: frame-length OBJECT
Generic Function: (setf frame-length) NEW-VALUE OBJECT
Package

clws

Methods
Method: frame-length (CLIENT client)

automatically generated reader method

Source

client.lisp (file)

Method: (setf frame-length) NEW-VALUE (CLIENT client)

automatically generated writer method

Source

client.lisp (file)

Generic Function: frame-opcode OBJECT
Generic Function: (setf frame-opcode) NEW-VALUE OBJECT
Package

clws

Methods
Method: frame-opcode (CLIENT client)

automatically generated reader method

Source

client.lisp (file)

Method: (setf frame-opcode) NEW-VALUE (CLIENT client)

automatically generated writer method

Source

client.lisp (file)

Generic Function: frame-opcode-octet OBJECT
Generic Function: (setf frame-opcode-octet) NEW-VALUE OBJECT
Package

clws

Methods
Method: frame-opcode-octet (CLIENT client)

automatically generated reader method

Source

client.lisp (file)

Method: (setf frame-opcode-octet) NEW-VALUE (CLIENT client)

automatically generated writer method

Source

client.lisp (file)

Generic Function: get-octet-vector CB
Package

clws

Methods
Method: get-octet-vector (CB chunk-buffer)
Source

buffer.lisp (file)

Generic Function: get-utf8-string CB &key ERRORP OCTET-END
Package

clws

Methods
Method: get-utf8-string (CB chunk-buffer) &key ERRORP OCTET-END
Source

buffer.lisp (file)

Generic Function: mask-octets CB MASK
Package

clws

Methods
Method: mask-octets (CB chunk-buffer) MASK
Source

buffer.lisp (file)

Generic Function: message-function OBJECT
Package

clws

Methods
Method: message-function (FUNCALL-CUSTOM-MESSAGE funcall-custom-message)

automatically generated reader method

Source

resource.lisp (file)

Generic Function: message-opcode OBJECT
Generic Function: (setf message-opcode) NEW-VALUE OBJECT
Package

clws

Methods
Method: message-opcode (CLIENT client)

automatically generated reader method

Source

client.lisp (file)

Method: (setf message-opcode) NEW-VALUE (CLIENT client)

automatically generated writer method

Source

client.lisp (file)

Generic Function: partial-message OBJECT
Generic Function: (setf partial-message) NEW-VALUE OBJECT
Package

clws

Methods
Method: partial-message (CLIENT client)

automatically generated reader method

Source

client.lisp (file)

Method: (setf partial-message) NEW-VALUE (CLIENT client)

automatically generated writer method

Source

client.lisp (file)

Generic Function: partial-vector OBJECT
Generic Function: (setf partial-vector) NEW-VALUE OBJECT
Package

clws

Methods
Method: partial-vector (BUFFERED-READER buffered-reader)

automatically generated reader method

Source

buffer.lisp (file)

Method: (setf partial-vector) NEW-VALUE (BUFFERED-READER buffered-reader)

automatically generated writer method

Source

buffer.lisp (file)

Generic Function: partial-vector-pos OBJECT
Generic Function: (setf partial-vector-pos) NEW-VALUE OBJECT
Package

clws

Methods
Method: partial-vector-pos (BUFFERED-READER buffered-reader)

automatically generated reader method

Source

buffer.lisp (file)

Method: (setf partial-vector-pos) NEW-VALUE (BUFFERED-READER buffered-reader)

automatically generated writer method

Source

buffer.lisp (file)

Generic Function: peek-octet CB
Package

clws

Methods
Method: peek-octet (CB chunk-buffer)
Source

buffer.lisp (file)

Generic Function: predicate OBJECT
Generic Function: (setf predicate) NEW-VALUE OBJECT
Package

clws

Methods
Method: predicate (BUFFERED-READER buffered-reader)

automatically generated reader method

Source

buffer.lisp (file)

Method: (setf predicate) NEW-VALUE (BUFFERED-READER buffered-reader)

automatically generated writer method

Source

buffer.lisp (file)

Generic Function: read-octet CB
Package

clws

Methods
Method: read-octet (CB chunk-buffer)
Source

buffer.lisp (file)

Generic Function: resource-read-queue RESOURCE

The concurrent mailbox used to pass messages between the server thread and resource thread.

Package

clws

Source

resource.lisp (file)

Methods
Method: resource-read-queue (WS-RESOURCE ws-resource)

automatically generated reader method

Generic Function: resource-received-custom-message RESOURCE MESSAGE

Called on the resource listener thread when a client is passed an arbitrary message via SEND-CUSTOM-MESSAGE-TO-RESOURCE.

Package

clws

Source

resource.lisp (file)

Methods
Method: resource-received-custom-message RESOURCE (MESSAGE funcall-custom-message)
Generic Function: server-client-count SERVER

Returns number the server’s clients.

Package

clws

Source

server.lisp (file)

Methods
Method: server-client-count (SERVER server)
Generic Function: server-clients OBJECT
Package

clws

Methods
Method: server-clients (SERVER server)

Hash of client objects to them
selves (just used as a set for now).

Source

server.lisp (file)

Generic Function: server-event-base OBJECT
Generic Function: (setf server-event-base) NEW-VALUE OBJECT
Package

clws

Methods
Method: server-event-base (SERVER server)

automatically generated reader method

Source

server.lisp (file)

Method: (setf server-event-base) NEW-VALUE (SERVER server)

automatically generated writer method

Source

server.lisp (file)

Generic Function: server-list-clients SERVER

Returns a list of the server’s clients.

Package

clws

Source

server.lisp (file)

Methods
Method: server-list-clients (SERVER server)
Generic Function: status-code CONDITION
Package

clws

Methods
Method: status-code (CONDITION close-from-peer)
Source

buffer.lisp (file)

Method: status-code (CONDITION fail-the-websockets-connection)
Source

buffer.lisp (file)

Generic Function: status-message CONDITION
Package

clws

Methods
Method: status-message (CONDITION close-from-peer)
Source

buffer.lisp (file)

Method: status-message (CONDITION fail-the-websockets-connection)
Source

buffer.lisp (file)


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

5.2.5 Conditions

Condition: close-from-peer ()
Package

clws

Source

buffer.lisp (file)

Direct superclasses

error (condition)

Direct methods
Direct slots
Slot: code
Initargs

:status-code

Initform

(quote 1000)

Readers

status-code (generic function)

Slot: message
Initargs

:message

Initform

(quote nil)

Readers

status-message (generic function)

Condition: fail-the-websockets-connection ()
Package

clws

Source

buffer.lisp (file)

Direct superclasses

error (condition)

Direct methods
Direct slots
Slot: code
Initargs

:status-code

Initform

(quote nil)

Readers

status-code (generic function)

Slot: message
Initargs

:message

Initform

(quote nil)

Readers

status-message (generic function)


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

5.2.6 Classes

Class: buffer-chunk ()
Package

clws

Source

buffer.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: vector
Initargs

:vector

Readers

buffer-vector (generic function)

Slot: start
Initargs

:start

Readers

buffer-start (generic function)

Slot: end
Initargs

:end

Readers

buffer-end (generic function)

Class: buffered-reader ()
Package

clws

Source

buffer.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses

client (class)

Direct methods
Direct slots
Slot: partial-vector
Readers

partial-vector (generic function)

Writers

(setf partial-vector) (generic function)

Slot: partial-vector-pos
Initform

0

Readers

partial-vector-pos (generic function)

Writers

(setf partial-vector-pos) (generic function)

Slot: chunks
Initform

(make-instance (quote clws::chunk-buffer))

Readers

chunks (generic function)

Writers

(setf chunks) (generic function)

Slot: predicate
Initargs

:predicate

Readers

predicate (generic function)

Writers

(setf predicate) (generic function)

Slot: callback
Initargs

:callback

Readers

callback (generic function)

Writers

(setf callback) (generic function)

Slot: error-callback
Initargs

:error-callback

Readers

error-callback (generic function)

Writers

(setf error-callback) (generic function)

Class: chunk-buffer ()
Package

clws

Source

buffer.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: buffer-size
Initform

0

Readers

buffer-size (generic function)

Writers

(setf buffer-size) (generic function)

Slot: chunks
Readers

chunks (generic function)

Writers

(setf chunks) (generic function)

Slot: end-of-chunks
Readers

end-of-chunks (generic function)

Writers

(setf end-of-chunks) (generic function)

Class: client ()

Per-client data used by a WebSockets server.

Package

clws

Source

client.lisp (file)

Direct superclasses

buffered-reader (class)

Direct methods
Direct slots
Slot: server

The instance of WS:SERVER that owns this client.

Initargs

:server

Readers

client-server (generic function)

Slot: resource

The resource object the client has
requested– Not the string, but the object.

Initargs

:resource

Readers

client-resource (generic function)

Writers

(setf client-resource) (generic function)

Slot: port
Initargs

:port

Readers

client-port (generic function)

Slot: host
Initargs

:host

Readers

client-host (generic function)

Slot: %host
Initargs

:%host

Readers

%client-host (generic function)

Slot: server-hook

Function to call to send a command to
the network thread from other threads

Initargs

:server-hook

Readers

%client-server-hook (generic function)

Slot: socket

Bidirectional socket stream used for communicating with the client.

Initargs

:socket

Readers

client-socket (generic function)

Slot: read-closed

Flag indicates read side of the connection is closed

Readers

client-read-closed (generic function)

Writers

(setf client-read-closed) (generic function)

Slot: write-closed

Flag indicates write side of the connection is closed

Readers

client-write-closed (generic function)

Writers

(setf client-write-closed) (generic function)

Slot: closed

Flag indicates connection is closed

Readers

client-socket-closed (generic function)

Writers

(setf client-socket-closed) (generic function)

Slot: write-buffer

Buffer being written currently, if
last write couldn’t send whole thing

Readers

client-write-buffer (generic function)

Writers

(setf client-write-buffer) (generic function)

Slot: write-offset

Offset into write-buffer if write-buffer is set

Initform

0

Readers

client-write-offset (generic function)

Writers

(setf client-write-offset) (generic function)

Slot: write-queue

Queue of buffers (octet vectors) to
write, or :close to kill connection :enable-read to reenable reader after being disabled for flow control (mailbox instead of queue since it tracks length).

Initform

(clws::make-mailbox)

Readers

client-write-queue (generic function)

Slot: read-queue

queue of decoded lines/frames

Initform

(clws::make-mailbox)

Readers

client-read-queue (generic function)

Writers

(setf client-read-queue) (generic function)

Slot: connection-state

State of connection:
:connecting when initially created
:headers while reading headers,
:connected after server handshake sent
:failed after an error has occurred and further input/output will be ignored :closing when close has been sent but not received from peer (input is still valid, but no more output will be sent)

Initform

:connecting

Readers

client-connection-state (generic function)

Writers

(setf client-connection-state) (generic function)

Slot: reader

Read handler for this queue/socket

Readers

client-reader (generic function)

Writers

(setf client-reader) (generic function)

Slot: handler-data

Space for handler to store connection specific data.

Readers

client-handler-data (generic function)

Writers

(setf client-handler-data) (generic function)

Slot: connection-headers
Readers

client-connection-headers (generic function)

Writers

(setf client-connection-headers) (generic function)

Slot: resource-name
Readers

client-resource-name (generic function)

Writers

(setf client-resource-name) (generic function)

Slot: query-string
Readers

client-query-string (generic function)

Writers

(setf client-query-string) (generic function)

Slot: websocket-version
Readers

client-websocket-version (generic function)

Writers

(setf client-websocket-version) (generic function)

Slot: partial-message
Readers

partial-message (generic function)

Writers

(setf partial-message) (generic function)

Slot: message-opcode
Readers

message-opcode (generic function)

Writers

(setf message-opcode) (generic function)

Slot: frame-opcode-octet
Readers

frame-opcode-octet (generic function)

Writers

(setf frame-opcode-octet) (generic function)

Slot: frame-opcode
Readers

frame-opcode (generic function)

Writers

(setf frame-opcode) (generic function)

Slot: frame-fin
Readers

frame-fin (generic function)

Writers

(setf frame-fin) (generic function)

Slot: frame-length
Readers

frame-length (generic function)

Writers

(setf frame-length) (generic function)

Slot: connection-rejected
Readers

client-connection-rejected (generic function)

Writers

(setf client-connection-rejected) (generic function)

Class: funcall-custom-message ()

A type of so-called ’custom message’ used to call a function on the main resource thread.

Package

clws

Source

resource.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: function
Initargs

:function

Readers

message-function (generic function)

Class: server ()

A WebSockets server listens on a socket for
connections and has a bunch of client instances that it controls.

Package

clws

Source

server.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: event-base
Initargs

:event-base

Readers

server-event-base (generic function)

Writers

(setf server-event-base) (generic function)

Slot: clients

Hash of client objects to them
selves (just used as a set for now).

Initform

(make-hash-table)

Readers

server-clients (generic function)


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

5.2.7 Types

Type: client-write-control-keyword ()
Package

clws

Source

client.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   C   F   L  
Index Entry  Section

C
clws.asd: The clws<dot>asd file
clws/buffer.lisp: The clws/buffer<dot>lisp file
clws/client.lisp: The clws/client<dot>lisp file
clws/concurrency-sbcl.lisp: The clws/concurrency-sbcl<dot>lisp file
clws/config.lisp: The clws/config<dot>lisp file
clws/package.lisp: The clws/package<dot>lisp file
clws/protocol-00.lisp: The clws/protocol-00<dot>lisp file
clws/protocol-7.lisp: The clws/protocol-7<dot>lisp file
clws/protocol-common.lisp: The clws/protocol-common<dot>lisp file
clws/protocol.lisp: The clws/protocol<dot>lisp file
clws/resource.lisp: The clws/resource<dot>lisp file
clws/sb-concurrency-patch.lisp: The clws/sb-concurrency-patch<dot>lisp file
clws/server.lisp: The clws/server<dot>lisp file
clws/util.lisp: The clws/util<dot>lisp file

F
File, Lisp, clws.asd: The clws<dot>asd file
File, Lisp, clws/buffer.lisp: The clws/buffer<dot>lisp file
File, Lisp, clws/client.lisp: The clws/client<dot>lisp file
File, Lisp, clws/concurrency-sbcl.lisp: The clws/concurrency-sbcl<dot>lisp file
File, Lisp, clws/config.lisp: The clws/config<dot>lisp file
File, Lisp, clws/package.lisp: The clws/package<dot>lisp file
File, Lisp, clws/protocol-00.lisp: The clws/protocol-00<dot>lisp file
File, Lisp, clws/protocol-7.lisp: The clws/protocol-7<dot>lisp file
File, Lisp, clws/protocol-common.lisp: The clws/protocol-common<dot>lisp file
File, Lisp, clws/protocol.lisp: The clws/protocol<dot>lisp file
File, Lisp, clws/resource.lisp: The clws/resource<dot>lisp file
File, Lisp, clws/sb-concurrency-patch.lisp: The clws/sb-concurrency-patch<dot>lisp file
File, Lisp, clws/server.lisp: The clws/server<dot>lisp file
File, Lisp, clws/util.lisp: The clws/util<dot>lisp file

L
Lisp File, clws.asd: The clws<dot>asd file
Lisp File, clws/buffer.lisp: The clws/buffer<dot>lisp file
Lisp File, clws/client.lisp: The clws/client<dot>lisp file
Lisp File, clws/concurrency-sbcl.lisp: The clws/concurrency-sbcl<dot>lisp file
Lisp File, clws/config.lisp: The clws/config<dot>lisp file
Lisp File, clws/package.lisp: The clws/package<dot>lisp file
Lisp File, clws/protocol-00.lisp: The clws/protocol-00<dot>lisp file
Lisp File, clws/protocol-7.lisp: The clws/protocol-7<dot>lisp file
Lisp File, clws/protocol-common.lisp: The clws/protocol-common<dot>lisp file
Lisp File, clws/protocol.lisp: The clws/protocol<dot>lisp file
Lisp File, clws/resource.lisp: The clws/resource<dot>lisp file
Lisp File, clws/sb-concurrency-patch.lisp: The clws/sb-concurrency-patch<dot>lisp file
Lisp File, clws/server.lisp: The clws/server<dot>lisp file
Lisp File, clws/util.lisp: The clws/util<dot>lisp file

Jump to:   C   F   L  

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

A.2 Functions

Jump to:   %   (  
A   B   C   D   E   F   G   I   K   L   M   N   O   P   R   S   T   U   V   W  
Index Entry  Section

%
%client-enqueue-write-or-kill: Internal functions
%client-host: Internal generic functions
%client-host: Internal generic functions
%client-server-hook: Internal generic functions
%client-server-hook: Internal generic functions
%get-chunks: Internal generic functions
%get-chunks: Internal generic functions
%get-chunks: Internal generic functions
%write-to-client: Internal functions

(
(setf buffer-size): Internal generic functions
(setf buffer-size): Internal generic functions
(setf callback): Internal generic functions
(setf callback): Internal generic functions
(setf chunks): Internal generic functions
(setf chunks): Internal generic functions
(setf chunks): Internal generic functions
(setf client-connection-headers): Exported generic functions
(setf client-connection-headers): Exported generic functions
(setf client-connection-rejected): Exported generic functions
(setf client-connection-rejected): Exported generic functions
(setf client-connection-state): Internal generic functions
(setf client-connection-state): Internal generic functions
(setf client-handler-data): Internal generic functions
(setf client-handler-data): Internal generic functions
(setf client-query-string): Exported generic functions
(setf client-query-string): Exported generic functions
(setf client-read-closed): Internal generic functions
(setf client-read-closed): Internal generic functions
(setf client-read-queue): Internal generic functions
(setf client-read-queue): Internal generic functions
(setf client-reader): Internal generic functions
(setf client-reader): Internal generic functions
(setf client-resource): Internal generic functions
(setf client-resource): Internal generic functions
(setf client-resource-name): Exported generic functions
(setf client-resource-name): Exported generic functions
(setf client-socket-closed): Internal generic functions
(setf client-socket-closed): Internal generic functions
(setf client-websocket-version): Exported generic functions
(setf client-websocket-version): Exported generic functions
(setf client-write-buffer): Internal generic functions
(setf client-write-buffer): Internal generic functions
(setf client-write-closed): Internal generic functions
(setf client-write-closed): Internal generic functions
(setf client-write-offset): Internal generic functions
(setf client-write-offset): Internal generic functions
(setf end-of-chunks): Internal generic functions
(setf end-of-chunks): Internal generic functions
(setf error-callback): Internal generic functions
(setf error-callback): Internal generic functions
(setf frame-fin): Internal generic functions
(setf frame-fin): Internal generic functions
(setf frame-length): Internal generic functions
(setf frame-length): Internal generic functions
(setf frame-opcode): Internal generic functions
(setf frame-opcode): Internal generic functions
(setf frame-opcode-octet): Internal generic functions
(setf frame-opcode-octet): Internal generic functions
(setf message-opcode): Internal generic functions
(setf message-opcode): Internal generic functions
(setf partial-message): Internal generic functions
(setf partial-message): Internal generic functions
(setf partial-vector): Internal generic functions
(setf partial-vector): Internal generic functions
(setf partial-vector-pos): Internal generic functions
(setf partial-vector-pos): Internal generic functions
(setf predicate): Internal generic functions
(setf predicate): Internal generic functions
(setf server-event-base): Internal generic functions
(setf server-event-base): Internal generic functions

A
add-chunk: Internal generic functions
add-chunk: Internal generic functions
add-chunks: Internal generic functions
add-chunks: Internal generic functions
add-reader-to-client: Internal functions
any-origin: Exported functions

B
binary-message-for-protocol: Internal functions
buffer-count: Internal generic functions
buffer-count: Internal generic functions
buffer-end: Internal generic functions
buffer-end: Internal generic functions
buffer-size: Internal generic functions
buffer-size: Internal generic functions
buffer-start: Internal generic functions
buffer-start: Internal generic functions
buffer-vector: Internal generic functions
buffer-vector: Internal generic functions
build-frames: Internal functions

C
call-on-resource-thread: Exported generic functions
call-on-resource-thread: Exported generic functions
call-with-buffer-as-stream: Internal functions
callback: Internal generic functions
callback: Internal generic functions
chunks: Internal generic functions
chunks: Internal generic functions
chunks: Internal generic functions
client-connection-headers: Exported generic functions
client-connection-headers: Exported generic functions
client-connection-rejected: Exported generic functions
client-connection-rejected: Exported generic functions
client-connection-state: Internal generic functions
client-connection-state: Internal generic functions
client-dequeue-read: Internal functions
client-dequeue-write: Internal functions
client-disable-handler: Internal generic functions
client-disable-handler: Internal generic functions
client-disconnect: Internal generic functions
client-disconnect: Internal generic functions
client-enable-handler: Internal generic functions
client-enable-handler: Internal generic functions
client-enqueue-read: Internal functions
client-enqueue-write: Internal functions
client-error-active: Internal generic functions
client-error-active: Internal generic functions
client-handler-data: Internal generic functions
client-handler-data: Internal generic functions
client-host: Exported generic functions
client-host: Exported generic functions
client-port: Exported generic functions
client-port: Exported generic functions
client-query-string: Exported generic functions
client-query-string: Exported generic functions
client-read-closed: Internal generic functions
client-read-closed: Internal generic functions
client-read-queue: Internal generic functions
client-read-queue: Internal generic functions
client-reader: Internal generic functions
client-reader: Internal generic functions
client-reader-active: Internal generic functions
client-reader-active: Internal generic functions
client-resource: Internal generic functions
client-resource: Internal generic functions
client-resource-name: Exported generic functions
client-resource-name: Exported generic functions
client-server: Internal generic functions
client-server: Internal generic functions
client-socket: Internal generic functions
client-socket: Internal generic functions
client-socket-closed: Internal generic functions
client-socket-closed: Internal generic functions
client-websocket-version: Exported generic functions
client-websocket-version: Exported generic functions
client-write-buffer: Internal generic functions
client-write-buffer: Internal generic functions
client-write-closed: Internal generic functions
client-write-closed: Internal generic functions
client-write-offset: Internal generic functions
client-write-offset: Internal generic functions
client-write-queue: Internal generic functions
client-write-queue: Internal generic functions
client-writer-active: Internal generic functions
client-writer-active: Internal generic functions
close-frame-for-protocol: Internal functions

D
dequeue: Internal functions
disconnect-client: Internal functions
dispatch-control-message: Internal functions
dispatch-frame: Internal functions
dispatch-message: Internal functions
dispatch-protocols: Internal functions

E
end-of-chunks: Internal generic functions
end-of-chunks: Internal generic functions
enqueue: Internal functions
error-callback: Internal generic functions
error-callback: Internal generic functions
extract-key: Internal functions

F
find-global-resource: Exported functions
frame-fin: Internal generic functions
frame-fin: Internal generic functions
frame-length: Internal generic functions
frame-length: Internal generic functions
frame-opcode: Internal generic functions
frame-opcode: Internal generic functions
frame-opcode-octet: Internal generic functions
frame-opcode-octet: Internal generic functions
Function, %client-enqueue-write-or-kill: Internal functions
Function, %write-to-client: Internal functions
Function, add-reader-to-client: Internal functions
Function, any-origin: Exported functions
Function, binary-message-for-protocol: Internal functions
Function, build-frames: Internal functions
Function, call-with-buffer-as-stream: Internal functions
Function, client-dequeue-read: Internal functions
Function, client-dequeue-write: Internal functions
Function, client-enqueue-read: Internal functions
Function, client-enqueue-write: Internal functions
Function, close-frame-for-protocol: Internal functions
Function, dequeue: Internal functions
Function, disconnect-client: Internal functions
Function, dispatch-control-message: Internal functions
Function, dispatch-frame: Internal functions
Function, dispatch-message: Internal functions
Function, dispatch-protocols: Internal functions
Function, enqueue: Internal functions
Function, extract-key: Internal functions
Function, find-global-resource: Exported functions
Function, get-utf8-string-or-fail: Internal functions
Function, ignore-remaining-input: Internal functions
Function, invalid-header: Internal functions
Function, kill-resource-listener: Exported functions
Function, lg: Internal functions
Function, mailbox-count: Internal functions
Function, mailbox-empty-p: Internal functions
Function, mailbox-list-messages: Internal functions
Function, mailbox-receive-message: Internal functions
Function, mailbox-receive-message-no-hang: Internal functions
Function, mailbox-receive-pending-messages: Internal functions
Function, mailbox-send-message: Internal functions
Function, mailboxp: Internal functions
Function, make-challenge-00: Internal functions
Function, make-challenge-o7: Internal functions
Function, make-domain-policy: Internal functions
Function, make-frame-from-string: Internal functions
Function, make-handshake-76: Internal functions
Function, make-listener-handler: Internal functions
Function, make-mailbox: Internal functions
Function, make-queue: Internal functions
Function, match-headers: Internal functions
Function, match-policy-file: Internal functions
Function, match-resource-line: Internal functions
Function, maybe-policy-file: Internal functions
Function, next-reader-state: Internal functions
Function, octet-count-matcher: Internal functions
Function, octet-pattern-matcher: Internal functions
Function, origin-exact: Exported functions
Function, origin-prefix: Exported functions
Function, pong-frame-for-protocol: Internal functions
Function, protocol-13-parse-headers: Internal functions
Function, protocol-7+-extended-length: Internal functions
Function, protocol-7+-handshake: Internal functions
Function, protocol-7+-read-frame: Internal functions
Function, protocol-7+-read-mask: Internal functions
Function, protocol-7+-start-frame: Internal functions
Function, protocol-7-parse-headers: Internal functions
Function, protocol-76/00-frame-start: Internal functions
Function, protocol-76/00-nonce: Internal functions
Function, protocol-76/00-read-binary-frame: Internal functions
Function, protocol-76/00-read-text-frame: Internal functions
Function, protocol-8-parse-headers: Internal functions
Function, register-global-resource: Exported functions
Function, run-resource-listener: Exported functions
Function, run-server: Exported functions
Function, send-error-and-close: Internal functions
Function, special-client-write-value-p: Internal functions
Function, string-to-shareable-octets: Internal functions
Function, text-message-for-protocol: Internal functions
Function, try-write-client: Internal functions
Function, unregister-global-resource: Exported functions
Function, unsupported-protocol-version: Internal functions
Function, valid-resource-p: Internal functions
Function, write-to-client-binary: Exported functions
Function, write-to-client-close: Exported functions
Function, write-to-client-text: Exported functions
Function, write-to-clients-binary: Exported functions
Function, write-to-clients-text: Exported functions

G
Generic Function, %client-host: Internal generic functions
Generic Function, %client-server-hook: Internal generic functions
Generic Function, %get-chunks: Internal generic functions
Generic Function, (setf buffer-size): Internal generic functions
Generic Function, (setf callback): Internal generic functions
Generic Function, (setf chunks): Internal generic functions
Generic Function, (setf client-connection-headers): Exported generic functions
Generic Function, (setf client-connection-rejected): Exported generic functions
Generic Function, (setf client-connection-state): Internal generic functions
Generic Function, (setf client-handler-data): Internal generic functions
Generic Function, (setf client-query-string): Exported generic functions
Generic Function, (setf client-read-closed): Internal generic functions
Generic Function, (setf client-read-queue): Internal generic functions
Generic Function, (setf client-reader): Internal generic functions
Generic Function, (setf client-resource): Internal generic functions
Generic Function, (setf client-resource-name): Exported generic functions
Generic Function, (setf client-socket-closed): Internal generic functions
Generic Function, (setf client-websocket-version): Exported generic functions
Generic Function, (setf client-write-buffer): Internal generic functions
Generic Function, (setf client-write-closed): Internal generic functions
Generic Function, (setf client-write-offset): Internal generic functions
Generic Function, (setf end-of-chunks): Internal generic functions
Generic Function, (setf error-callback): Internal generic functions
Generic Function, (setf frame-fin): Internal generic functions
Generic Function, (setf frame-length): Internal generic functions
Generic Function, (setf frame-opcode): Internal generic functions
Generic Function, (setf frame-opcode-octet): Internal generic functions
Generic Function, (setf message-opcode): Internal generic functions
Generic Function, (setf partial-message): Internal generic functions
Generic Function, (setf partial-vector): Internal generic functions
Generic Function, (setf partial-vector-pos): Internal generic functions
Generic Function, (setf predicate): Internal generic functions
Generic Function, (setf server-event-base): Internal generic functions
Generic Function, add-chunk: Internal generic functions
Generic Function, add-chunks: Internal generic functions
Generic Function, buffer-count: Internal generic functions
Generic Function, buffer-end: Internal generic functions
Generic Function, buffer-size: Internal generic functions
Generic Function, buffer-start: Internal generic functions
Generic Function, buffer-vector: Internal generic functions
Generic Function, call-on-resource-thread: Exported generic functions
Generic Function, callback: Internal generic functions
Generic Function, chunks: Internal generic functions
Generic Function, client-connection-headers: Exported generic functions
Generic Function, client-connection-rejected: Exported generic functions
Generic Function, client-connection-state: Internal generic functions
Generic Function, client-disable-handler: Internal generic functions
Generic Function, client-disconnect: Internal generic functions
Generic Function, client-enable-handler: Internal generic functions
Generic Function, client-error-active: Internal generic functions
Generic Function, client-handler-data: Internal generic functions
Generic Function, client-host: Exported generic functions
Generic Function, client-port: Exported generic functions
Generic Function, client-query-string: Exported generic functions
Generic Function, client-read-closed: Internal generic functions
Generic Function, client-read-queue: Internal generic functions
Generic Function, client-reader: Internal generic functions
Generic Function, client-reader-active: Internal generic functions
Generic Function, client-resource: Internal generic functions
Generic Function, client-resource-name: Exported generic functions
Generic Function, client-server: Internal generic functions
Generic Function, client-socket: Internal generic functions
Generic Function, client-socket-closed: Internal generic functions
Generic Function, client-websocket-version: Exported generic functions
Generic Function, client-write-buffer: Internal generic functions
Generic Function, client-write-closed: Internal generic functions
Generic Function, client-write-offset: Internal generic functions
Generic Function, client-write-queue: Internal generic functions
Generic Function, client-writer-active: Internal generic functions
Generic Function, end-of-chunks: Internal generic functions
Generic Function, error-callback: Internal generic functions
Generic Function, frame-fin: Internal generic functions
Generic Function, frame-length: Internal generic functions
Generic Function, frame-opcode: Internal generic functions
Generic Function, frame-opcode-octet: Internal generic functions
Generic Function, get-octet-vector: Internal generic functions
Generic Function, get-utf8-string: Internal generic functions
Generic Function, mask-octets: Internal generic functions
Generic Function, message-function: Internal generic functions
Generic Function, message-opcode: Internal generic functions
Generic Function, partial-message: Internal generic functions
Generic Function, partial-vector: Internal generic functions
Generic Function, partial-vector-pos: Internal generic functions
Generic Function, peek-octet: Internal generic functions
Generic Function, predicate: Internal generic functions
Generic Function, read-octet: Internal generic functions
Generic Function, resource-accept-connection: Exported generic functions
Generic Function, resource-client-connected: Exported generic functions
Generic Function, resource-client-disconnected: Exported generic functions
Generic Function, resource-read-queue: Internal generic functions
Generic Function, resource-received-binary: Exported generic functions
Generic Function, resource-received-custom-message: Internal generic functions
Generic Function, resource-received-text: Exported generic functions
Generic Function, send-custom-message-to-resource: Exported generic functions
Generic Function, server-client-count: Internal generic functions
Generic Function, server-clients: Internal generic functions
Generic Function, server-event-base: Internal generic functions
Generic Function, server-list-clients: Internal generic functions
Generic Function, status-code: Internal generic functions
Generic Function, status-message: Internal generic functions
get-octet-vector: Internal generic functions
get-octet-vector: Internal generic functions
get-utf8-string: Internal generic functions
get-utf8-string: Internal generic functions
get-utf8-string-or-fail: Internal functions

I
ignore-remaining-input: Internal functions
invalid-header: Internal functions

K
kill-resource-listener: Exported functions

L
lg: Internal functions

M
Macro, make-array-ubyte8: Internal macros
Macro, with-buffer-as-stream: Internal macros
mailbox-count: Internal functions
mailbox-empty-p: Internal functions
mailbox-list-messages: Internal functions
mailbox-receive-message: Internal functions
mailbox-receive-message-no-hang: Internal functions
mailbox-receive-pending-messages: Internal functions
mailbox-send-message: Internal functions
mailboxp: Internal functions
make-array-ubyte8: Internal macros
make-challenge-00: Internal functions
make-challenge-o7: Internal functions
make-domain-policy: Internal functions
make-frame-from-string: Internal functions
make-handshake-76: Internal functions
make-listener-handler: Internal functions
make-mailbox: Internal functions
make-queue: Internal functions
mask-octets: Internal generic functions
mask-octets: Internal generic functions
match-headers: Internal functions
match-policy-file: Internal functions
match-resource-line: Internal functions
maybe-policy-file: Internal functions
message-function: Internal generic functions
message-function: Internal generic functions
message-opcode: Internal generic functions
message-opcode: Internal generic functions
Method, %client-host: Internal generic functions
Method, %client-server-hook: Internal generic functions
Method, %get-chunks: Internal generic functions
Method, %get-chunks: Internal generic functions
Method, (setf buffer-size): Internal generic functions
Method, (setf callback): Internal generic functions
Method, (setf chunks): Internal generic functions
Method, (setf chunks): Internal generic functions
Method, (setf client-connection-headers): Exported generic functions
Method, (setf client-connection-rejected): Exported generic functions
Method, (setf client-connection-state): Internal generic functions
Method, (setf client-handler-data): Internal generic functions
Method, (setf client-query-string): Exported generic functions
Method, (setf client-read-closed): Internal generic functions
Method, (setf client-read-queue): Internal generic functions
Method, (setf client-reader): Internal generic functions
Method, (setf client-resource): Internal generic functions
Method, (setf client-resource-name): Exported generic functions
Method, (setf client-socket-closed): Internal generic functions
Method, (setf client-websocket-version): Exported generic functions
Method, (setf client-write-buffer): Internal generic functions
Method, (setf client-write-closed): Internal generic functions
Method, (setf client-write-offset): Internal generic functions
Method, (setf end-of-chunks): Internal generic functions
Method, (setf error-callback): Internal generic functions
Method, (setf frame-fin): Internal generic functions
Method, (setf frame-length): Internal generic functions
Method, (setf frame-opcode): Internal generic functions
Method, (setf frame-opcode-octet): Internal generic functions
Method, (setf message-opcode): Internal generic functions
Method, (setf partial-message): Internal generic functions
Method, (setf partial-vector): Internal generic functions
Method, (setf partial-vector-pos): Internal generic functions
Method, (setf predicate): Internal generic functions
Method, (setf server-event-base): Internal generic functions
Method, add-chunk: Internal generic functions
Method, add-chunks: Internal generic functions
Method, buffer-count: Internal generic functions
Method, buffer-end: Internal generic functions
Method, buffer-size: Internal generic functions
Method, buffer-start: Internal generic functions
Method, buffer-vector: Internal generic functions
Method, call-on-resource-thread: Exported generic functions
Method, callback: Internal generic functions
Method, chunks: Internal generic functions
Method, chunks: Internal generic functions
Method, client-connection-headers: Exported generic functions
Method, client-connection-rejected: Exported generic functions
Method, client-connection-state: Internal generic functions
Method, client-disable-handler: Internal generic functions
Method, client-disconnect: Internal generic functions
Method, client-enable-handler: Internal generic functions
Method, client-error-active: Internal generic functions
Method, client-handler-data: Internal generic functions
Method, client-host: Exported generic functions
Method, client-port: Exported generic functions
Method, client-query-string: Exported generic functions
Method, client-read-closed: Internal generic functions
Method, client-read-queue: Internal generic functions
Method, client-reader: Internal generic functions
Method, client-reader-active: Internal generic functions
Method, client-resource: Internal generic functions
Method, client-resource-name: Exported generic functions
Method, client-server: Internal generic functions
Method, client-socket: Internal generic functions
Method, client-socket-closed: Internal generic functions
Method, client-websocket-version: Exported generic functions
Method, client-write-buffer: Internal generic functions
Method, client-write-closed: Internal generic functions
Method, client-write-offset: Internal generic functions
Method, client-write-queue: Internal generic functions
Method, client-writer-active: Internal generic functions
Method, end-of-chunks: Internal generic functions
Method, error-callback: Internal generic functions
Method, frame-fin: Internal generic functions
Method, frame-length: Internal generic functions
Method, frame-opcode: Internal generic functions
Method, frame-opcode-octet: Internal generic functions
Method, get-octet-vector: Internal generic functions
Method, get-utf8-string: Internal generic functions
Method, mask-octets: Internal generic functions
Method, message-function: Internal generic functions
Method, message-opcode: Internal generic functions
Method, partial-message: Internal generic functions
Method, partial-vector: Internal generic functions
Method, partial-vector-pos: Internal generic functions
Method, peek-octet: Internal generic functions
Method, predicate: Internal generic functions
Method, read-octet: Internal generic functions
Method, resource-accept-connection: Exported generic functions
Method, resource-client-connected: Exported generic functions
Method, resource-read-queue: Internal generic functions
Method, resource-received-custom-message: Internal generic functions
Method, send-custom-message-to-resource: Exported generic functions
Method, server-client-count: Internal generic functions
Method, server-clients: Internal generic functions
Method, server-event-base: Internal generic functions
Method, server-list-clients: Internal generic functions
Method, status-code: Internal generic functions
Method, status-code: Internal generic functions
Method, status-message: Internal generic functions
Method, status-message: Internal generic functions

N
next-reader-state: Internal functions

O
octet-count-matcher: Internal functions
octet-pattern-matcher: Internal functions
origin-exact: Exported functions
origin-prefix: Exported functions

P
partial-message: Internal generic functions
partial-message: Internal generic functions
partial-vector: Internal generic functions
partial-vector: Internal generic functions
partial-vector-pos: Internal generic functions
partial-vector-pos: Internal generic functions
peek-octet: Internal generic functions
peek-octet: Internal generic functions
pong-frame-for-protocol: Internal functions
predicate: Internal generic functions
predicate: Internal generic functions
protocol-13-parse-headers: Internal functions
protocol-7+-extended-length: Internal functions
protocol-7+-handshake: Internal functions
protocol-7+-read-frame: Internal functions
protocol-7+-read-mask: Internal functions
protocol-7+-start-frame: Internal functions
protocol-7-parse-headers: Internal functions
protocol-76/00-frame-start: Internal functions
protocol-76/00-nonce: Internal functions
protocol-76/00-read-binary-frame: Internal functions
protocol-76/00-read-text-frame: Internal functions
protocol-8-parse-headers: Internal functions

R
read-octet: Internal generic functions
read-octet: Internal generic functions
register-global-resource: Exported functions
resource-accept-connection: Exported generic functions
resource-accept-connection: Exported generic functions
resource-client-connected: Exported generic functions
resource-client-connected: Exported generic functions
resource-client-disconnected: Exported generic functions
resource-read-queue: Internal generic functions
resource-read-queue: Internal generic functions
resource-received-binary: Exported generic functions
resource-received-custom-message: Internal generic functions
resource-received-custom-message: Internal generic functions
resource-received-text: Exported generic functions
run-resource-listener: Exported functions
run-server: Exported functions

S
send-custom-message-to-resource: Exported generic functions
send-custom-message-to-resource: Exported generic functions
send-error-and-close: Internal functions
server-client-count: Internal generic functions
server-client-count: Internal generic functions
server-clients: Internal generic functions
server-clients: Internal generic functions
server-event-base: Internal generic functions
server-event-base: Internal generic functions
server-list-clients: Internal generic functions
server-list-clients: Internal generic functions
special-client-write-value-p: Internal functions
status-code: Internal generic functions
status-code: Internal generic functions
status-code: Internal generic functions
status-message: Internal generic functions
status-message: Internal generic functions
status-message: Internal generic functions
string-to-shareable-octets: Internal functions

T
text-message-for-protocol: Internal functions
try-write-client: Internal functions

U
unregister-global-resource: Exported functions
unsupported-protocol-version: Internal functions

V
valid-resource-p: Internal functions

W
with-buffer-as-stream: Internal macros
write-to-client-binary: Exported functions
write-to-client-close: Exported functions
write-to-client-text: Exported functions
write-to-clients-binary: Exported functions
write-to-clients-text: Exported functions

Jump to:   %   (  
A   B   C   D   E   F   G   I   K   L   M   N   O   P   R   S   T   U   V   W  

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

A.3 Variables

Jump to:   %   *  
B   C   E   F   H   M   P   Q   R   S   V   W  
Index Entry  Section

%
%host: Internal classes

*
*400-message*: Internal special variables
*403-message*: Internal special variables
*404-message*: Internal special variables
*close-frame*: Internal special variables
*debug-on-resource-errors*: Exported special variables
*debug-on-server-errors*: Exported special variables
*draft-76/00-close-frame*: Internal special variables
*log-level*: Exported special variables
*max-clients*: Exported special variables
*max-handler-read-backlog*: Internal special variables
*max-header-size*: Internal special variables
*max-read-frame-size*: Exported special variables
*max-read-message-size*: Internal special variables
*max-write-backlog*: Internal special variables
*policy-file*: Internal special variables
*policy-file-request*: Internal special variables
*protocol-76/00-support*: Exported special variables
*protocol-header-parsers*: Internal special variables
*resources*: Internal special variables
*server-busy-message*: Internal special variables
*supported-protocol-versions*: Internal special variables

B
buffer-size: Internal classes

C
callback: Internal classes
chunks: Internal classes
chunks: Internal classes
clients: Internal classes
closed: Internal classes
code: Internal conditions
code: Internal conditions
connection-headers: Internal classes
connection-rejected: Internal classes
connection-state: Internal classes

E
end: Internal classes
end-of-chunks: Internal classes
error-callback: Internal classes
event-base: Internal classes

F
frame-fin: Internal classes
frame-length: Internal classes
frame-opcode: Internal classes
frame-opcode-octet: Internal classes
function: Internal classes

H
handler-data: Internal classes
host: Internal classes

M
message: Internal conditions
message: Internal conditions
message-opcode: Internal classes

P
partial-message: Internal classes
partial-vector: Internal classes
partial-vector-pos: Internal classes
port: Internal classes
predicate: Internal classes

Q
query-string: Internal classes

R
read-closed: Internal classes
read-queue: Exported classes
read-queue: Internal classes
reader: Internal classes
resource: Internal classes
resource-name: Internal classes

S
server: Internal classes
server-hook: Internal classes
Slot, %host: Internal classes
Slot, buffer-size: Internal classes
Slot, callback: Internal classes
Slot, chunks: Internal classes
Slot, chunks: Internal classes
Slot, clients: Internal classes
Slot, closed: Internal classes
Slot, code: Internal conditions
Slot, code: Internal conditions
Slot, connection-headers: Internal classes
Slot, connection-rejected: Internal classes
Slot, connection-state: Internal classes
Slot, end: Internal classes
Slot, end-of-chunks: Internal classes
Slot, error-callback: Internal classes
Slot, event-base: Internal classes
Slot, frame-fin: Internal classes
Slot, frame-length: Internal classes
Slot, frame-opcode: Internal classes
Slot, frame-opcode-octet: Internal classes
Slot, function: Internal classes
Slot, handler-data: Internal classes
Slot, host: Internal classes
Slot, message: Internal conditions
Slot, message: Internal conditions
Slot, message-opcode: Internal classes
Slot, partial-message: Internal classes
Slot, partial-vector: Internal classes
Slot, partial-vector-pos: Internal classes
Slot, port: Internal classes
Slot, predicate: Internal classes
Slot, query-string: Internal classes
Slot, read-closed: Internal classes
Slot, read-queue: Exported classes
Slot, read-queue: Internal classes
Slot, reader: Internal classes
Slot, resource: Internal classes
Slot, resource-name: Internal classes
Slot, server: Internal classes
Slot, server-hook: Internal classes
Slot, socket: Internal classes
Slot, start: Internal classes
Slot, vector: Internal classes
Slot, websocket-version: Internal classes
Slot, write-buffer: Internal classes
Slot, write-closed: Internal classes
Slot, write-offset: Internal classes
Slot, write-queue: Internal classes
socket: Internal classes
Special Variable, *400-message*: Internal special variables
Special Variable, *403-message*: Internal special variables
Special Variable, *404-message*: Internal special variables
Special Variable, *close-frame*: Internal special variables
Special Variable, *debug-on-resource-errors*: Exported special variables
Special Variable, *debug-on-server-errors*: Exported special variables
Special Variable, *draft-76/00-close-frame*: Internal special variables
Special Variable, *log-level*: Exported special variables
Special Variable, *max-clients*: Exported special variables
Special Variable, *max-handler-read-backlog*: Internal special variables
Special Variable, *max-header-size*: Internal special variables
Special Variable, *max-read-frame-size*: Exported special variables
Special Variable, *max-read-message-size*: Internal special variables
Special Variable, *max-write-backlog*: Internal special variables
Special Variable, *policy-file*: Internal special variables
Special Variable, *policy-file-request*: Internal special variables
Special Variable, *protocol-76/00-support*: Exported special variables
Special Variable, *protocol-header-parsers*: Internal special variables
Special Variable, *resources*: Internal special variables
Special Variable, *server-busy-message*: Internal special variables
Special Variable, *supported-protocol-versions*: Internal special variables
start: Internal classes

V
vector: Internal classes

W
websocket-version: Internal classes
write-buffer: Internal classes
write-closed: Internal classes
write-offset: Internal classes
write-queue: Internal classes

Jump to:   %   *  
B   C   E   F   H   M   P   Q   R   S   V   W  

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

A.4 Data types

Jump to:   B   C   F   P   S   T   W  
Index Entry  Section

B
buffer-chunk: Internal classes
buffered-reader: Internal classes

C
chunk-buffer: Internal classes
Class, buffer-chunk: Internal classes
Class, buffered-reader: Internal classes
Class, chunk-buffer: Internal classes
Class, client: Internal classes
Class, funcall-custom-message: Internal classes
Class, server: Internal classes
Class, ws-resource: Exported classes
client: Internal classes
client-write-control-keyword: Internal types
close-from-peer: Internal conditions
clws: The clws system
clws: The clws package
clws-system: The clws-system package
Condition, close-from-peer: Internal conditions
Condition, fail-the-websockets-connection: Internal conditions

F
fail-the-websockets-connection: Internal conditions
funcall-custom-message: Internal classes

P
Package, clws: The clws package
Package, clws-system: The clws-system package

S
server: Internal classes
System, clws: The clws system

T
Type, client-write-control-keyword: Internal types

W
ws-resource: Exported classes

Jump to:   B   C   F   P   S   T   W