JSON-RPC 2.0 server/client for Common Lisp.
Common Lisp
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tests Allow to respond with "result": null. Apr 6, 2017
transport
.travis.yml Use the latest websocket-driver. Sep 6, 2017
README.markdown Allow to specify :timeout option to jsonrpc:call. Sep 26, 2017
class.lisp Change the default timeout from 10 secs -> 60 secs. Feb 1, 2018
connection.lisp Fix typo. Sep 25, 2017
errors.lisp Add :report function to jsonrpc-callback-error. Nov 17, 2017
jsonrpc.asd Fix tests. Apr 3, 2017
main.lisp Add *default-timeout* (10). Nov 17, 2017
mapper.lisp Move the error handling into dispatch method. Mar 8, 2017
request-response.lisp Allow to respond with "result": null. Apr 6, 2017
utils.lisp Fix for CCL. Mar 6, 2017

README.markdown

jsonrpc

Quicklisp dist Build Status Coverage Status

JSON-RPC 2.0 server/client for Common Lisp.

Usage

;; server
(defvar *server* (jsonrpc:make-server))
(jsonrpc:expose *server* "sum" (lambda (args) (reduce #'+ args)))

(jsonrpc:server-listen *server* :port 50879 :mode :tcp)
;; client
(defvar *client* (jsonrpc:make-client))
(jsonrpc:client-connect *client* :url "http://127.0.0.1:50879" :mode :tcp)
(jsonrpc:call *client* "sum" '(10 20))
;=> 30

;; Calling with :timeout option
(jsonrpc:call *client* "sum" '(10 20) :timeout 1.0)
;=> 30

Author

Copyright

Copyright (c) 2016 Eitaro Fukamachi (e.arrows@gmail.com)

License

Licensed under the BSD 2-Clause License.