chickadee » transmission » export-3.1/4.6

(make-rpc-call (method (required required-handler) ...) (key default key-handler) ...)syntax
(make-rpc-call method (key default key-handler) ...)syntax
(define-rpc-call (method required ...) key ...)syntax
(define-rpc-call method key ...)syntax
(export-rpc-call (method required ...) key ...)syntax
(export-rpc-call method key ...)syntax
(export-3.1/4.6 method)syntax

make-rpc-call creates a procedure to represent an RPC method.

define-rpc-call is like make-rpc-call but defines the created procedure.

export-rpc-call is like define-rpc-call but exports the defined procedure.

export-3.1/4.6 exports RPC procedures of sections 3.1 and 4.6 of the spec, which have a single optional ids argument.

method is a method name, which will be used as the method name in messages and, in the case of define-rpc-call, export-rpc-call, and export-3.1/4.6, the name of the defined procedure.

required is the name of a required argument. It will not be used in messages.

key is the name of an optional (key) argument. It will be used as the key name in the created procedure, but not in messages.

required-handler and key-handler are functions that will process a given value, to assure it has the right type/format, and return an entry ready to be inserted into the arguments object of a message, i.e., they must return a (key . value) pair that will later be converted to JSON.

default is the default value of an optional (key) argument.