msgpack-rpc-deno

Deno module to support msgpack-rpc.

Example

Server

import { Server } from "https://deno.land/x/msgpack-rpc@v1.0/server.ts";

const server = new Server({
  async sum(x: number, y: number): Promise<number> {
    return x + y;
  },
});
await server.listen(Deno.listen({ hostname: "localhost", port: 18800 }));

Client

import { Client } from "https://deno.land/x/msgpack-rpc@v1.0/client.ts";

const client = new Client(
  await Deno.connect({ hostname: "localhost", port: 18800 })
);
const result = await client.call("sum", [1, 1]);
console.log(result);

License

The code follows MIT license written in LICENSE. Contributors need to agree that any modifications sent in this repository follow the license.