|(require msgpack-rpc)||package: msgpack-rpc|
This package implements a RPC client in accordance with the MessagePack-RPC spec. It supports calls (asynchronous and synchronous) and notifications, and can use TCP and UNIX domain sockets as transports.
The source is at: https://github.com/wbthomason/msgpack-rpc-racket
PRs and issues are welcome!
This package implements a client for the MessagePack-RPC protocol in Racket.
The basic usage flow for the library is: Create a client connected to some MessagePack-RPC server. Perform a sequence of calls using the client. Shut down the client. Below are examples of these operations.
(rpc-notify client "sayhi" "Racket")
addr : string? port-num : exact-positive-integer? = null conn-type : string? = "unix"
This package has been tested manually and verified to work. I have not yet written unit tests, or any sort of formal tests, so caveat emptor. There are also quite likely code smells and non-idiomatic Racket usages; this is the first significant Racket I’ve written.
All that said, this works as expected in my uses of it, and I didn’t find an alternative when I searched.
This module uses the (excellent) msgpack library by HiPhish. After I wrote this module, I discovered HiPhish’s RPC implementation in his Racket Neovim client; however, this module is less specialized to use with Neovim, uses a different client model and API design, and is designed for general-purpose standalone msgpack-rpc use.