The cl-messagepack-rpc Reference Manual

Table of Contents

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

The cl-messagepack-rpc Reference Manual

This is the cl-messagepack-rpc Reference Manual, generated automatically by Declt version 2.3 "Robert April" on Tue Jan 09 13:49:39 2018 GMT+0.


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

1 Introduction

cl-messagepack-rpc

Build Status Coverage Status Quicklisp dist MIT licensed

A Common Lisp library implementing the MessagePack-RPC specification, which uses MessagePack serialization format to achieve efficient remote procedure calls (RPCs).

Library uses cl-messagepack and cl-async under the hood. Currently only the client side functionality is fully supported, but some server-side features (such as registering callbacks for sessions) are also implemented. Library supports connecting to the server via TCP sockets, named pipes or via user-specified streams (e.g. standard input and output streams).

Installing

Package is available through Quicklisp, so simply evaluating

* (ql:quickload :cl-messagepack-rpc)

from your REPL should properly load all the dependencies and cl-messagepack-rpc itself.

In order to get cl-async working, you will however also need libuv1-dev package, which you can install using your distribution's package manager, or by manually compiling libuv.

Usage

This library tries to follow the official specification as closely as possible. For a quick taste:

(ql:quickload :cl-messagepack-rpc)

(defparameter *client* (make-instance 'mrpc:client :file "/path/to/named/pipe"))
(mrpc:call *client* "echo" "Hello server!")
;=> "Hello server!"

(defparameter *future* (mrpc:call-async *client* "execute_some_long_task"))
;=> *future*

(mrpc:request *client* "add" 3 2) ; mrpc:request is an alias for mrpc:call
;=> 5

(mrpc:join *future*) ; calling join on future also returns its result (or throws an error)
;=> "Done with the execution of some long task!"

(mrpc:notify *client* "client_finished")
;=> T

Exported symbols

client (session)

Main class used to connect to an already running server. You can specify which means of transport the server uses via make-instance call:

(defparameter *client*  (make-instance 'client :host "127.0.0.1" :port 1985)) ; to connect via TCP
(defparameter *client2* (make-instance 'client :file "/path/to/named/pipe")) ; to connect via named pipe
(defparameter *client3* (make-instance 'client)) ; to connect via standard input/output
(defparameter *client4* (make-instance 'client :input-stream *standard-input*
                                               :output-stream *output-stream*))
  ; *client4* is same as *client3*, but note that you can specify any (binary) input and output streams

If remote server uses extended types, you can specify that by passing a specification list via :extended-types argument to #'make-instance. For example, to translate the use case from cl-messagepack's readme, you would use:

(defparameter *client* (make-instance 'client :host "127.0.0.1" :port 1985)
                                              :extended-types '(:numeric 0 Buffer Window Tabpage))

Objects of extended type can be tested for equality using #'eq.

register-callback (session method callback)

Register a CALLBACK with name METHOD for some SESSION. Callback should be something callable:

(register-callback *client* "add" #'(lambda (a b) (+ a b)))

remove-callback (session method)

Remove a previously registered callback with name METHOD from SESSION.

(remove-callback *client* "add")

call-async (session method &rest params) => future

Use SESSION to call METHOD with PARAMS and immediately return control to the caller, returning a future object.

(call-async *client* "server_side_add" 1 2 3)
;=> #<FUTURE {100962B8F3}>

call (session method &rest params)

Invoke CALL-ASYNC on the passed arguments, and call JOIN on the returned future.

(call *client* "server_side_add" 1 2 3)
;=> 6

request (session method &rest params)

Alias for CALL.

notify (session method &rest params)

Use SESSION to call METHOD with PARAMS, immediately returning control to the caller. This call completely ignores server responses.

(notify *client* "do_something")
;=> T

future

Class used to hold responses from the server. You should not need to create future objects by hand.

join (future)

Block execution until FUTURE has a result from the server. Then either return a result, or throw an error, depending on how the server responded.

(let ((future (call-async *client* "add" 3 2)))
  ; do something...
  (join future))
;=> 5

(let ((future (call-async *client* "add" 3 "some string")))
  ; do something...
  (join future))
;=> ERROR: unexpected types of arguments.

Running unit tests

Because server-side support is not yet implemented, tests use a python based server. So in order to test the library, first start the python server:

$ python t/server.py

and then evaluate

* (asdf:test-system :cl-messagepack-rpc)

in the REPL to run the actual tests.

Support

The library is developed and tested with sbcl under Debian GNU/Linux, but should work everywhere cl-async does.

License

Copyright (c) 2016 Andrej Dolenc

Licensed under the MIT License.


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 cl-messagepack-rpc

Author

Andrej Dolenc <andrej.dolenc@student.uni-lj.si>

License

MIT

Description

A Common Lisp implementation of the MessagePack-RPC specification, which uses MessagePack serialization format to achieve efficient remote procedure calls (RPCs).

Dependencies
Source

cl-messagepack-rpc.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 cl-messagepack-rpc.asd

Location

cl-messagepack-rpc.asd

Systems

cl-messagepack-rpc (system)


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

3.1.2 cl-messagepack-rpc/src/package.lisp

Parent

cl-messagepack-rpc (system)

Location

src/package.lisp

Packages

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

3.1.3 cl-messagepack-rpc/src/utils.lisp

Dependency

src/package.lisp (file)

Parent

cl-messagepack-rpc (system)

Location

src/utils.lisp

Exported Definitions

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

3.1.4 cl-messagepack-rpc/src/conditions.lisp

Dependency

src/utils.lisp (file)

Parent

cl-messagepack-rpc (system)

Location

src/conditions.lisp

Exported Definitions
Internal Definitions

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

3.1.5 cl-messagepack-rpc/src/future.lisp

Dependency

src/conditions.lisp (file)

Parent

cl-messagepack-rpc (system)

Location

src/future.lisp

Exported Definitions
Internal Definitions

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

3.1.6 cl-messagepack-rpc/src/connection.lisp

Dependency

src/future.lisp (file)

Parent

cl-messagepack-rpc (system)

Location

src/connection.lisp

Exported Definitions
Internal Definitions

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

3.1.7 cl-messagepack-rpc/src/event-loop.lisp

Dependency

src/connection.lisp (file)

Parent

cl-messagepack-rpc (system)

Location

src/event-loop.lisp

Exported Definitions

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

3.1.8 cl-messagepack-rpc/src/messages.lisp

Dependency

src/event-loop.lisp (file)

Parent

cl-messagepack-rpc (system)

Location

src/messages.lisp

Internal Definitions

define-rpc-type (macro)


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

3.1.9 cl-messagepack-rpc/src/session.lisp

Dependency

src/messages.lisp (file)

Parent

cl-messagepack-rpc (system)

Location

src/session.lisp

Exported Definitions
Internal Definitions

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

3.1.10 cl-messagepack-rpc/src/client.lisp

Dependency

src/session.lisp (file)

Parent

cl-messagepack-rpc (system)

Location

src/client.lisp

Exported Definitions

client (class)


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

4 Packages

Packages are listed by definition order.


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

4.1 messagepack-rpc

Source

src/package.lisp (file)

Nickname

mrpc

Use List
Exported Definitions
Internal Definitions

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

4.2 messagepack-rpc.event-loop

Source

src/package.lisp (file)

Nickname

el

Use List
Used By List

messagepack-rpc

Exported Definitions
Internal Definitions

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

4.3 messagepack-rpc.conditions

Source

src/package.lisp (file)

Use List

common-lisp

Used By List
Exported Definitions
Internal Definitions

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

4.4 messagepack-rpc.utils

Source

src/package.lisp (file)

Use List

common-lisp

Used By List
Exported 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 Macros

Macro: while TEST &rest BODY

Imitate the standard while loop.

Package

messagepack-rpc.utils

Source

src/utils.lisp (file)


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

5.1.2 Functions

Function: clean EVENT-BASE &optional WITH-ERROR

Clean up and properly close the event-loop, and throw an error with-error if it is supplied.

Package

messagepack-rpc.event-loop

Source

src/event-loop.lisp (file)

Function: connect-pipe EVENT-BASE CALLBACK &key FILE

Establish a connection on top of event-base via named pipe, calling CALLBACK with new data when it is available.

Package

messagepack-rpc.event-loop

Source

src/connection.lisp (file)

Function: connect-stream EVENT-BASE CALLBACK &key INPUT-STREAM OUTPUT-STREAM POOLING-RATE

Establish a connection on top of event-base via input and output streams, calling CALLBACK with new data when it is available.

Package

messagepack-rpc.event-loop

Source

src/connection.lisp (file)

Function: connect-tcp EVENT-BASE CALLBACK &key HOST PORT

Establish a connection on top of event-base via TCP, calling CALLBACK with new data when it is available.

Package

messagepack-rpc.event-loop

Source

src/connection.lisp (file)

Function: init ()

Initialize a new event-loop and return it.

Package

messagepack-rpc.event-loop

Source

src/event-loop.lisp (file)

Function: run-forever EVENT-BASE

Run event loop forever, blocking the execution and processing all received messages.

Package

messagepack-rpc.event-loop

Source

src/event-loop.lisp (file)

Function: run-once EVENT-BASE

Run event loop once, blocking the execution of the thread until a new message is received.

Package

messagepack-rpc.event-loop

Source

src/event-loop.lisp (file)

Function: symbol-concat &rest SYMBOLS

Concatenate symbol names.

Package

messagepack-rpc.utils

Source

src/utils.lisp (file)

Function: zip &rest LISTS

Zip lists together.

Package

messagepack-rpc.utils

Source

src/utils.lisp (file)


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

5.1.3 Generic functions

Generic Function: call SESSION METHOD &rest PARAMS
Package

messagepack-rpc

Methods
Method: call (SESSION session) METHOD &rest PARAMS

Invoke CALL-ASYNC with the specified arguments, and call JOIN on the returned future. This call thus blocks the thread until response from the server is received.

Source

src/session.lisp (file)

Generic Function: call-async SESSION METHOD &rest PARAMS
Package

messagepack-rpc

Methods
Method: call-async (SESSION session) METHOD &rest PARAMS

Use session to call server’s METHOD with specified PARAMS and immediately pass control back to the caller, returning a future object. If you want to later check the results, use JOIN on the future.

Source

src/session.lisp (file)

Generic Function: finish FUTURE &key RESULT ERROR
Package

messagepack-rpc.event-loop

Methods
Method: finish (FUTURE future) &key RESULT ERROR

Set FUTURE’s status to finished, and set its RESULT and/or ERROR.

Source

src/future.lisp (file)

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

messagepack-rpc.event-loop

Methods
Method: finishedp (FUTURE future)

automatically generated reader method

Source

src/future.lisp (file)

Method: (setf finishedp) NEW-VALUE (FUTURE future)

automatically generated writer method

Source

src/future.lisp (file)

Generic Function: join FUTURE
Package

messagepack-rpc.event-loop

Methods
Method: join (FUTURE future)

Block the execution of current thread until FUTURE has a result from the server. Then either return a result, or throw an error, depending on how the server responded.

Source

src/future.lisp (file)

Generic Function: notify SESSION METHOD &rest PARAMS
Package

messagepack-rpc

Methods
Method: notify (SESSION session) METHOD &rest PARAMS

Use SESSION to call server’s METHOD with specified PARAMS, immediately returning control to the caller. This call completely ignores server responses.

Source

src/session.lisp (file)

Generic Function: register-callback SESSION METHOD CALLBACK
Package

messagepack-rpc

Methods
Method: register-callback (SESSION session) METHOD CALLBACK

Register a CALLBACK which will get called when server/client sends request or notification for METHOD.

Source

src/session.lisp (file)

Generic Function: remove-callback SESSION METHOD
Package

messagepack-rpc

Methods
Method: remove-callback (SESSION session) METHOD

Remove a registered callback with name METHOD.

Source

src/session.lisp (file)

Generic Function: request SESSION METHOD &rest PARAMS
Package

messagepack-rpc

Methods
Method: request (SESSION session) METHOD &rest PARAMS

Alias for CALL.

Source

src/session.lisp (file)

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

messagepack-rpc.event-loop

Methods
Method: result (FUTURE future)

automatically generated reader method

Source

src/future.lisp (file)

Method: (setf result) NEW-VALUE (FUTURE future)

automatically generated writer method

Source

src/future.lisp (file)

Generic Function: send EVENT-BASE SOCKET BYTES

Send BYTES via SOCKET using EVENT-BASE event-loop

Package

messagepack-rpc.event-loop

Source

src/connection.lisp (file)

Methods
Method: send (EVENT-BASE event-base) SOCKET MSG
Method: send (EVENT-BASE event-base) (SOCKET socket) MSG

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

5.1.4 Conditions

Condition: call-error ()
Package

messagepack-rpc.conditions

Source

src/conditions.lisp (file)

Direct superclasses

rpc-error (condition)

Direct subclasses

no-method-error (condition)

Condition: no-method-error ()
Package

messagepack-rpc.conditions

Source

src/conditions.lisp (file)

Direct superclasses

call-error (condition)

Condition: rpc-error ()
Package

messagepack-rpc.conditions

Source

src/conditions.lisp (file)

Direct superclasses

error (condition)

Direct subclasses
Direct methods
  • message (method)
  • message (method)
Direct slots
Slot: message
Initargs

:message

Initform

(quote "")

Readers

message (generic function)

Writers

(setf message) (generic function)

Condition: transport-error ()
Package

messagepack-rpc.conditions

Source

src/conditions.lisp (file)

Direct superclasses

rpc-error (condition)


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

5.1.5 Classes

Class: client ()
Package

messagepack-rpc

Source

src/client.lisp (file)

Direct superclasses

session (class)

Direct methods

initialize-instance (method)

Class: future ()
Package

messagepack-rpc.event-loop

Source

src/future.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: finished
Initargs

:finished

Readers

finishedp (generic function)

Writers

(setf finishedp) (generic function)

Slot: result
Initargs

:result

Readers

result (generic function)

Writers

(setf result) (generic function)

Slot: err
Initargs

:error

Readers

err (generic function)

Writers

(setf err) (generic function)

Slot: event-loop
Initargs

:event-loop

Initform

(error "must specify the event-loop which the object should follow")

Readers

event-loop (generic function)

Writers

(setf event-loop) (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: *default-pooling-rate*

Elapsed time in seconds between two consecutive reads for connect-stream

Package

messagepack-rpc.event-loop

Source

src/connection.lisp (file)

Special Variable: *max-request-id*

Maximal request id used

Package

messagepack-rpc

Source

src/session.lisp (file)


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

5.2.2 Macros

Macro: define-rpc-type TYPE-NAME TYPE-ID &rest COMPONENTS

Define helper functions for constructing, sending, destructing and verifying messagepack-rpc types.

Package

messagepack-rpc

Source

src/messages.lisp (file)

Macro: with-event-loop-bindings (EVENT-BASE) &body BODY

Make cl-async think the event loop was running all along, because it otherwise sometimes refuses to work.

Package

messagepack-rpc.event-loop

Source

src/connection.lisp (file)


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

5.2.3 Functions

Function: get-unique-request-id ()

Return a unique, not yet used request id.

Package

messagepack-rpc

Source

src/session.lisp (file)

Function: make-notification METHOD PARAMS

Encode parameters into a packet ready to be sent as a NOTIFICATION.

Package

messagepack-rpc

Source

src/session.lisp (file)

Function: make-request ID METHOD PARAMS

Encode parameters into a packet ready to be sent as a REQUEST.

Package

messagepack-rpc

Source

src/session.lisp (file)

Function: make-response ID ERROR RESULT

Encode parameters into a packet ready to be sent as a RESPONSE.

Package

messagepack-rpc

Source

src/session.lisp (file)

Function: notificationp MSG

Predicate to check if msg is NOTIFICATION.

Package

messagepack-rpc

Source

src/session.lisp (file)

Function: on-connection-close EV
Package

messagepack-rpc.event-loop

Source

src/connection.lisp (file)

Function: parse-notification MSG

Parse msg into a property list, where keys are :METHOD, :PARAMS and values are corresponding values from msg.

Package

messagepack-rpc

Source

src/session.lisp (file)

Function: parse-request MSG

Parse msg into a property list, where keys are :ID, :METHOD, :PARAMS and values are corresponding values from msg.

Package

messagepack-rpc

Source

src/session.lisp (file)

Function: parse-response MSG

Parse msg into a property list, where keys are :ID, :ERROR, :RESULT and values are corresponding values from msg.

Package

messagepack-rpc

Source

src/session.lisp (file)

Function: requestp MSG

Predicate to check if msg is REQUEST.

Package

messagepack-rpc

Source

src/session.lisp (file)

Function: responsep MSG

Predicate to check if msg is RESPONSE.

Package

messagepack-rpc

Source

src/session.lisp (file)


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

5.2.4 Generic functions

Generic Function: active-requests OBJECT
Generic Function: (setf active-requests) NEW-VALUE OBJECT
Package

messagepack-rpc

Methods
Method: active-requests (SESSION session)

automatically generated reader method

Source

src/session.lisp (file)

Method: (setf active-requests) NEW-VALUE (SESSION session)

automatically generated writer method

Source

src/session.lisp (file)

Generic Function: apply-callback SESSION METHOD PARAMS
Package

messagepack-rpc

Methods
Method: apply-callback (SESSION session) METHOD PARAMS

Find appropriate callback for session and call it with params, or trigger no-method-error if no method with correct name is registered.

Source

src/session.lisp (file)

Generic Function: callback-handler SESSION BYTES
Package

messagepack-rpc

Methods
Method: callback-handler (SESSION session) BYTES

Decode messages from BYTES and call ON-MESSAGE with the decoded data. This method gets registered with SESSION’s event-loop as the default callback handler.

Source

src/session.lisp (file)

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

messagepack-rpc

Methods
Method: callbacks (SESSION session)

automatically generated reader method

Source

src/session.lisp (file)

Method: (setf callbacks) NEW-VALUE (SESSION session)

automatically generated writer method

Source

src/session.lisp (file)

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

messagepack-rpc.event-loop

Methods
Method: err (FUTURE future)

automatically generated reader method

Source

src/future.lisp (file)

Method: (setf err) NEW-VALUE (FUTURE future)

automatically generated writer method

Source

src/future.lisp (file)

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

messagepack-rpc

Methods
Method: event-loop (SESSION session)

automatically generated reader method

Source

src/session.lisp (file)

Method: (setf event-loop) NEW-VALUE (SESSION session)

automatically generated writer method

Source

src/session.lisp (file)

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

messagepack-rpc.event-loop

Methods
Method: event-loop (FUTURE future)

automatically generated reader method

Source

src/future.lisp (file)

Method: (setf event-loop) NEW-VALUE (FUTURE future)

automatically generated writer method

Source

src/future.lisp (file)

Generic Function: extended-types OBJECT
Generic Function: (setf extended-types) NEW-VALUE OBJECT
Package

messagepack-rpc

Methods
Method: extended-types (SESSION session)

automatically generated reader method

Source

src/session.lisp (file)

Method: (setf extended-types) NEW-VALUE (SESSION session)

automatically generated writer method

Source

src/session.lisp (file)

Generic Function: lookup-table OBJECT
Generic Function: (setf lookup-table) NEW-VALUE OBJECT
Package

messagepack-rpc

Methods
Method: lookup-table (SESSION session)

automatically generated reader method

Source

src/session.lisp (file)

Method: (setf lookup-table) NEW-VALUE (SESSION session)

automatically generated writer method

Source

src/session.lisp (file)

Generic Function: message CONDITION
Generic Function: (setf message) NEW-VALUE CONDITION
Package

messagepack-rpc.conditions

Methods
Method: message (CONDITION rpc-error)
Method: (setf message) NEW-VALUE (CONDITION rpc-error)
Source

src/conditions.lisp (file)

Generic Function: on-message SESSION MESSAGE
Package

messagepack-rpc

Methods
Method: on-message (SESSION session) MESSAGE

Properly handle a newly received message by dispatching it to the correct handler based on its type.

Source

src/session.lisp (file)

Generic Function: on-notification SESSION &key METHOD PARAMS
Package

messagepack-rpc

Methods
Method: on-notification (SESSION session) &key METHOD PARAMS

Handle a new notification from the server by calling the appropriate callback.

Source

src/session.lisp (file)

Generic Function: on-request SESSION &key ID METHOD PARAMS
Package

messagepack-rpc

Methods
Method: on-request (SESSION session) &key ID METHOD PARAMS

Handle a new request from the server, calling the appropriate callback and responding with its return value if the call is successful, or catch the error and respond with it.

Source

src/session.lisp (file)

Generic Function: on-response SESSION &key ID ERROR RESULT
Package

messagepack-rpc

Methods
Method: on-response (SESSION session) &key ID ERROR RESULT

Handle a response from the server by finishing the appropriate future from active-requests of the session with the received result or error.

Source

src/session.lisp (file)

Generic Function: send-notification SESSION METHOD PARAMS
Package

messagepack-rpc

Methods
Method: send-notification (SESSION session) METHOD PARAMS

Encode parameters into a NOTIFICATION packet and send it using session object.

Source

src/session.lisp (file)

Generic Function: send-request SESSION ID METHOD PARAMS
Package

messagepack-rpc

Methods
Method: send-request (SESSION session) ID METHOD PARAMS

Encode parameters into a REQUEST packet and send it using session object.

Source

src/session.lisp (file)

Generic Function: send-response SESSION ID ERROR RESULT
Package

messagepack-rpc

Methods
Method: send-response (SESSION session) ID ERROR RESULT

Encode parameters into a RESPONSE packet and send it using session object.

Source

src/session.lisp (file)

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

messagepack-rpc

Methods
Method: socket (SESSION session)

automatically generated reader method

Source

src/session.lisp (file)

Method: (setf socket) NEW-VALUE (SESSION session)

automatically generated writer method

Source

src/session.lisp (file)


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

5.2.5 Classes

Class: session ()
Package

messagepack-rpc

Source

src/session.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses

client (class)

Direct methods
Direct slots
Slot: event-loop
Initargs

:event-loop

Initform

(messagepack-rpc.event-loop:init)

Readers

event-loop (generic function)

Writers

(setf event-loop) (generic function)

Slot: socket
Readers

socket (generic function)

Writers

(setf socket) (generic function)

Slot: callbacks
Initform

(make-hash-table :test (quote equal))

Readers

callbacks (generic function)

Writers

(setf callbacks) (generic function)

Slot: extended-types
Initform

(quote nil)

Readers

extended-types (generic function)

Writers

(setf extended-types) (generic function)

Slot: lookup-table
Initform

(messagepack:make-lookup-table)

Readers

lookup-table (generic function)

Writers

(setf lookup-table) (generic function)

Slot: active-requests
Initform

(make-hash-table)

Readers

active-requests (generic function)

Writers

(setf active-requests) (generic function)


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
cl-messagepack-rpc.asd: The cl-messagepack-rpc<dot>asd file
cl-messagepack-rpc/src/client.lisp: The cl-messagepack-rpc/src/client<dot>lisp file
cl-messagepack-rpc/src/conditions.lisp: The cl-messagepack-rpc/src/conditions<dot>lisp file
cl-messagepack-rpc/src/connection.lisp: The cl-messagepack-rpc/src/connection<dot>lisp file
cl-messagepack-rpc/src/event-loop.lisp: The cl-messagepack-rpc/src/event-loop<dot>lisp file
cl-messagepack-rpc/src/future.lisp: The cl-messagepack-rpc/src/future<dot>lisp file
cl-messagepack-rpc/src/messages.lisp: The cl-messagepack-rpc/src/messages<dot>lisp file
cl-messagepack-rpc/src/package.lisp: The cl-messagepack-rpc/src/package<dot>lisp file
cl-messagepack-rpc/src/session.lisp: The cl-messagepack-rpc/src/session<dot>lisp file
cl-messagepack-rpc/src/utils.lisp: The cl-messagepack-rpc/src/utils<dot>lisp file

F
File, Lisp, cl-messagepack-rpc.asd: The cl-messagepack-rpc<dot>asd file
File, Lisp, cl-messagepack-rpc/src/client.lisp: The cl-messagepack-rpc/src/client<dot>lisp file
File, Lisp, cl-messagepack-rpc/src/conditions.lisp: The cl-messagepack-rpc/src/conditions<dot>lisp file
File, Lisp, cl-messagepack-rpc/src/connection.lisp: The cl-messagepack-rpc/src/connection<dot>lisp file
File, Lisp, cl-messagepack-rpc/src/event-loop.lisp: The cl-messagepack-rpc/src/event-loop<dot>lisp file
File, Lisp, cl-messagepack-rpc/src/future.lisp: The cl-messagepack-rpc/src/future<dot>lisp file
File, Lisp, cl-messagepack-rpc/src/messages.lisp: The cl-messagepack-rpc/src/messages<dot>lisp file
File, Lisp, cl-messagepack-rpc/src/package.lisp: The cl-messagepack-rpc/src/package<dot>lisp file
File, Lisp, cl-messagepack-rpc/src/session.lisp: The cl-messagepack-rpc/src/session<dot>lisp file
File, Lisp, cl-messagepack-rpc/src/utils.lisp: The cl-messagepack-rpc/src/utils<dot>lisp file

L
Lisp File, cl-messagepack-rpc.asd: The cl-messagepack-rpc<dot>asd file
Lisp File, cl-messagepack-rpc/src/client.lisp: The cl-messagepack-rpc/src/client<dot>lisp file
Lisp File, cl-messagepack-rpc/src/conditions.lisp: The cl-messagepack-rpc/src/conditions<dot>lisp file
Lisp File, cl-messagepack-rpc/src/connection.lisp: The cl-messagepack-rpc/src/connection<dot>lisp file
Lisp File, cl-messagepack-rpc/src/event-loop.lisp: The cl-messagepack-rpc/src/event-loop<dot>lisp file
Lisp File, cl-messagepack-rpc/src/future.lisp: The cl-messagepack-rpc/src/future<dot>lisp file
Lisp File, cl-messagepack-rpc/src/messages.lisp: The cl-messagepack-rpc/src/messages<dot>lisp file
Lisp File, cl-messagepack-rpc/src/package.lisp: The cl-messagepack-rpc/src/package<dot>lisp file
Lisp File, cl-messagepack-rpc/src/session.lisp: The cl-messagepack-rpc/src/session<dot>lisp file
Lisp File, cl-messagepack-rpc/src/utils.lisp: The cl-messagepack-rpc/src/utils<dot>lisp file

Jump to:   C   F   L  

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

A.2 Functions

Jump to:   (  
A   C   D   E   F   G   I   J   L   M   N   O   P   R   S   W   Z  
Index Entry  Section

(
(setf active-requests): Internal generic functions
(setf active-requests): Internal generic functions
(setf callbacks): Internal generic functions
(setf callbacks): Internal generic functions
(setf err): Internal generic functions
(setf err): Internal generic functions
(setf event-loop): Internal generic functions
(setf event-loop): Internal generic functions
(setf event-loop): Internal generic functions
(setf event-loop): Internal generic functions
(setf extended-types): Internal generic functions
(setf extended-types): Internal generic functions
(setf finishedp): Exported generic functions
(setf finishedp): Exported generic functions
(setf lookup-table): Internal generic functions
(setf lookup-table): Internal generic functions
(setf message): Internal generic functions
(setf message): Internal generic functions
(setf result): Exported generic functions
(setf result): Exported generic functions
(setf socket): Internal generic functions
(setf socket): Internal generic functions

A
active-requests: Internal generic functions
active-requests: Internal generic functions
apply-callback: Internal generic functions
apply-callback: Internal generic functions

C
call: Exported generic functions
call: Exported generic functions
call-async: Exported generic functions
call-async: Exported generic functions
callback-handler: Internal generic functions
callback-handler: Internal generic functions
callbacks: Internal generic functions
callbacks: Internal generic functions
clean: Exported functions
connect-pipe: Exported functions
connect-stream: Exported functions
connect-tcp: Exported functions

D
define-rpc-type: Internal macros

E
err: Internal generic functions
err: Internal generic functions
event-loop: Internal generic functions
event-loop: Internal generic functions
event-loop: Internal generic functions
event-loop: Internal generic functions
extended-types: Internal generic functions
extended-types: Internal generic functions

F
finish: Exported generic functions
finish: Exported generic functions
finishedp: Exported generic functions
finishedp: Exported generic functions
Function, clean: Exported functions
Function, connect-pipe: Exported functions
Function, connect-stream: Exported functions
Function, connect-tcp: Exported functions
Function, get-unique-request-id: Internal functions
Function, init: Exported functions
Function, make-notification: Internal functions
Function, make-request: Internal functions
Function, make-response: Internal functions
Function, notificationp: Internal functions
Function, on-connection-close: Internal functions
Function, parse-notification: Internal functions
Function, parse-request: Internal functions
Function, parse-response: Internal functions
Function, requestp: Internal functions
Function, responsep: Internal functions
Function, run-forever: Exported functions
Function, run-once: Exported functions
Function, symbol-concat: Exported functions
Function, zip: Exported functions

G
Generic Function, (setf active-requests): Internal generic functions
Generic Function, (setf callbacks): Internal generic functions
Generic Function, (setf err): Internal generic functions
Generic Function, (setf event-loop): Internal generic functions
Generic Function, (setf event-loop): Internal generic functions
Generic Function, (setf extended-types): Internal generic functions
Generic Function, (setf finishedp): Exported generic functions
Generic Function, (setf lookup-table): Internal generic functions
Generic Function, (setf message): Internal generic functions
Generic Function, (setf result): Exported generic functions
Generic Function, (setf socket): Internal generic functions
Generic Function, active-requests: Internal generic functions
Generic Function, apply-callback: Internal generic functions
Generic Function, call: Exported generic functions
Generic Function, call-async: Exported generic functions
Generic Function, callback-handler: Internal generic functions
Generic Function, callbacks: Internal generic functions
Generic Function, err: Internal generic functions
Generic Function, event-loop: Internal generic functions
Generic Function, event-loop: Internal generic functions
Generic Function, extended-types: Internal generic functions
Generic Function, finish: Exported generic functions
Generic Function, finishedp: Exported generic functions
Generic Function, join: Exported generic functions
Generic Function, lookup-table: Internal generic functions
Generic Function, message: Internal generic functions
Generic Function, notify: Exported generic functions
Generic Function, on-message: Internal generic functions
Generic Function, on-notification: Internal generic functions
Generic Function, on-request: Internal generic functions
Generic Function, on-response: Internal generic functions
Generic Function, register-callback: Exported generic functions
Generic Function, remove-callback: Exported generic functions
Generic Function, request: Exported generic functions
Generic Function, result: Exported generic functions
Generic Function, send: Exported generic functions
Generic Function, send-notification: Internal generic functions
Generic Function, send-request: Internal generic functions
Generic Function, send-response: Internal generic functions
Generic Function, socket: Internal generic functions
get-unique-request-id: Internal functions

I
init: Exported functions

J
join: Exported generic functions
join: Exported generic functions

L
lookup-table: Internal generic functions
lookup-table: Internal generic functions

M
Macro, define-rpc-type: Internal macros
Macro, while: Exported macros
Macro, with-event-loop-bindings: Internal macros
make-notification: Internal functions
make-request: Internal functions
make-response: Internal functions
message: Internal generic functions
message: Internal generic functions
Method, (setf active-requests): Internal generic functions
Method, (setf callbacks): Internal generic functions
Method, (setf err): Internal generic functions
Method, (setf event-loop): Internal generic functions
Method, (setf event-loop): Internal generic functions
Method, (setf extended-types): Internal generic functions
Method, (setf finishedp): Exported generic functions
Method, (setf lookup-table): Internal generic functions
Method, (setf message): Internal generic functions
Method, (setf result): Exported generic functions
Method, (setf socket): Internal generic functions
Method, active-requests: Internal generic functions
Method, apply-callback: Internal generic functions
Method, call: Exported generic functions
Method, call-async: Exported generic functions
Method, callback-handler: Internal generic functions
Method, callbacks: Internal generic functions
Method, err: Internal generic functions
Method, event-loop: Internal generic functions
Method, event-loop: Internal generic functions
Method, extended-types: Internal generic functions
Method, finish: Exported generic functions
Method, finishedp: Exported generic functions
Method, join: Exported generic functions
Method, lookup-table: Internal generic functions
Method, message: Internal generic functions
Method, notify: Exported generic functions
Method, on-message: Internal generic functions
Method, on-notification: Internal generic functions
Method, on-request: Internal generic functions
Method, on-response: Internal generic functions
Method, register-callback: Exported generic functions
Method, remove-callback: Exported generic functions
Method, request: Exported generic functions
Method, result: Exported generic functions
Method, send: Exported generic functions
Method, send: Exported generic functions
Method, send-notification: Internal generic functions
Method, send-request: Internal generic functions
Method, send-response: Internal generic functions
Method, socket: Internal generic functions

N
notificationp: Internal functions
notify: Exported generic functions
notify: Exported generic functions

O
on-connection-close: Internal functions
on-message: Internal generic functions
on-message: Internal generic functions
on-notification: Internal generic functions
on-notification: Internal generic functions
on-request: Internal generic functions
on-request: Internal generic functions
on-response: Internal generic functions
on-response: Internal generic functions

P
parse-notification: Internal functions
parse-request: Internal functions
parse-response: Internal functions

R
register-callback: Exported generic functions
register-callback: Exported generic functions
remove-callback: Exported generic functions
remove-callback: Exported generic functions
request: Exported generic functions
request: Exported generic functions
requestp: Internal functions
responsep: Internal functions
result: Exported generic functions
result: Exported generic functions
run-forever: Exported functions
run-once: Exported functions

S
send: Exported generic functions
send: Exported generic functions
send: Exported generic functions
send-notification: Internal generic functions
send-notification: Internal generic functions
send-request: Internal generic functions
send-request: Internal generic functions
send-response: Internal generic functions
send-response: Internal generic functions
socket: Internal generic functions
socket: Internal generic functions
symbol-concat: Exported functions

W
while: Exported macros
with-event-loop-bindings: Internal macros

Z
zip: Exported functions

Jump to:   (  
A   C   D   E   F   G   I   J   L   M   N   O   P   R   S   W   Z  

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

A.3 Variables

Jump to:   *  
A   C   E   F   L   M   R   S  
Index Entry  Section

*
*default-pooling-rate*: Internal special variables
*max-request-id*: Internal special variables

A
active-requests: Internal classes

C
callbacks: Internal classes

E
err: Exported classes
event-loop: Exported classes
event-loop: Internal classes
extended-types: Internal classes

F
finished: Exported classes

L
lookup-table: Internal classes

M
message: Exported conditions

R
result: Exported classes

S
Slot, active-requests: Internal classes
Slot, callbacks: Internal classes
Slot, err: Exported classes
Slot, event-loop: Exported classes
Slot, event-loop: Internal classes
Slot, extended-types: Internal classes
Slot, finished: Exported classes
Slot, lookup-table: Internal classes
Slot, message: Exported conditions
Slot, result: Exported classes
Slot, socket: Internal classes
socket: Internal classes
Special Variable, *default-pooling-rate*: Internal special variables
Special Variable, *max-request-id*: Internal special variables

Jump to:   *  
A   C   E   F   L   M   R   S  

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

A.4 Data types

Jump to:   C   F   M   N   P   R   S   T  
Index Entry  Section

C
call-error: Exported conditions
cl-messagepack-rpc: The cl-messagepack-rpc system
Class, client: Exported classes
Class, future: Exported classes
Class, session: Internal classes
client: Exported classes
Condition, call-error: Exported conditions
Condition, no-method-error: Exported conditions
Condition, rpc-error: Exported conditions
Condition, transport-error: Exported conditions

F
future: Exported classes

M
messagepack-rpc: The messagepack-rpc package
messagepack-rpc.conditions: The messagepack-rpc<dot>conditions package
messagepack-rpc.event-loop: The messagepack-rpc<dot>event-loop package
messagepack-rpc.utils: The messagepack-rpc<dot>utils package

N
no-method-error: Exported conditions

P
Package, messagepack-rpc: The messagepack-rpc package
Package, messagepack-rpc.conditions: The messagepack-rpc<dot>conditions package
Package, messagepack-rpc.event-loop: The messagepack-rpc<dot>event-loop package
Package, messagepack-rpc.utils: The messagepack-rpc<dot>utils package

R
rpc-error: Exported conditions

S
session: Internal classes
System, cl-messagepack-rpc: The cl-messagepack-rpc system

T
transport-error: Exported conditions

Jump to:   C   F   M   N   P   R   S   T