Variable: jsonrpc-event-hook
jsonrpc-event-hook is a variable defined in jsonrpc.el.gz.
Value
(jsonrpc--log-event)
Documentation
Hook run when JSON-RPC events are emitted.
This hooks runs in the events buffer of every jsonrpc-connection(var)/jsonrpc-connection(fun)
when an event is originated by either endpoint. Each hook function
is passed the arguments described by the lambda list:
(CONNECTION ORIGIN &key JSON KIND MESSAGE FOREIGN-MESSAGE LOG-TEXT
&allow-other-keys)
CONNECTION the jsonrpc-connection(var)/jsonrpc-connection(fun) instance.
ORIGIN one of the symbols client ,server.
JSON the raw JSON string content.
KIND one of the symbols request ,notification,
reply.
MESSAGE a plist representing the exchanged message in
jsonrpc.el's internal format
FOREIGN-MESSAGE a plist representing the exchanged message in
the remote endpoint's format.
LOG-TEXT text used for events of internal origin.
ID id of a message that this event refers to.
TYPE error, debug or the default info.
Except for CONNECTION and ORIGIN all other keys are optional. Unlisted keys may appear in the plist.
Do not use this hook to write JSON-RPC protocols, use other parts of the API instead.
Source Code
;; Defined in /usr/src/emacs/lisp/jsonrpc.el.gz
(defvar jsonrpc-event-hook (list #'jsonrpc--log-event)
"Hook run when JSON-RPC events are emitted.
This hooks runs in the events buffer of every `jsonrpc-connection'
when an event is originated by either endpoint. Each hook function
is passed the arguments described by the lambda list:
(CONNECTION ORIGIN &key JSON KIND MESSAGE FOREIGN-MESSAGE LOG-TEXT
&allow-other-keys)
CONNECTION the `jsonrpc-connection' instance.
ORIGIN one of the symbols `client' ,`server'.
JSON the raw JSON string content.
KIND one of the symbols `request' ,`notification',
`reply'.
MESSAGE a plist representing the exchanged message in
jsonrpc.el's internal format
FOREIGN-MESSAGE a plist representing the exchanged message in
the remote endpoint's format.
LOG-TEXT text used for events of `internal' origin.
ID id of a message that this event refers to.
TYPE `error', `debug' or the default `info'.
Except for CONNECTION and ORIGIN all other keys are optional.
Unlisted keys may appear in the plist.
Do not use this hook to write JSON-RPC protocols, use other parts
of the API instead.")