8.18
top
← prev up next →

SS-RPC serverπŸ”— i

Sergey Petrov <sekk1e@yandex.ru>

SS-RPC is a Synchronous S-expression-based Remote Procedure Call, facility to call procedure within remote process and receive return value. SS-RPC allows you to use Racket as GNU Emacs extension language. It includes a server described by this page and a client for Emacs.

1Features and limitationsπŸ”— i

SS-RPC uses S-expressions as message language and TCP/IP as transport. Main advantages of SS-RPC over other RPCs for Emacs are lower remote call overhead and a feature of mutual remote call between server and client.

SS-RPC is limited with synchronous calls and transmitted data structures which are defined by the intersection of Emacs Lisp and Racket readers.

2Server APIπŸ”— i

procedure

( register-method! xkey)void?

key:symbol?
Puts a procedure x to a method table that can be accessed from client by a key.

syntax

( define-method (idargs)body...+)

Syntactic wrapper for define with a registering as a method with its symbol.

> (define-method (echox)x)

is a shorthand for
> (define (echox)x)
> (register-method! echo'echo)

procedure

( serve! [ #:log-levellog-level
#:log-outlog-out])void?
log-level : (or/c 'none'fatal'error'warning'info'debug)
= 'info
Enters a serving loop with handling incoming commands.

procedure

( call methodarg...)any/c

method:symbol?
arg:any/c
Applies a elisp procedure method to args as its arguments and returns the result of application. On elisp side ss-rpc does not registers remote procedures and method can be any elisp procedure symbol.

procedure

( call! methodarg...)void?

method:symbol?
arg:any/c
Applies a elisp procedure method to args as its arguments with ignoring the return result of application. On elisp side ss-rpc does not registers remote procedures and method can be any elisp procedure symbol.

parameter

( on-terminate )(-> any/c )

(on-terminate proc)void?
proc:(-> any/c )
= void
Deinitialization procedure which will be applied on receiving terminate command.

Readtable to read incoming message. Currently reads nil symbol as empty list, elisp vectors and hashtables

top
← prev up next →

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /