Gathering detailed insights and metrics for msgpack-rpc-lite
Gathering detailed insights and metrics for msgpack-rpc-lite
Gathering detailed insights and metrics for msgpack-rpc-lite
Gathering detailed insights and metrics for msgpack-rpc-lite
npm install msgpack-rpc-lite
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
5 Stars
78 Commits
1 Forks
2 Watching
7 Branches
2 Contributors
Updated on 03 Jun 2024
TypeScript (100%)
Cumulative downloads
Total Downloads
Last day
-66.7%
1
Compared to previous day
Last week
258.3%
43
Compared to previous week
Last month
163.3%
79
Compared to previous month
Last year
-19.5%
578
Compared to previous year
Implementation of MessagePack-RPC with msgpack-lite
createServer([serverOptions][, codecOptions])
Creates a new MessagePack-RPC server.
serverOptions
<Object> See net.createServer([options][, connectionListener])codecOptions
<Object>
encode
See Custom Codec Optionsdecode
See Custom Codec OptionsServer event: method
Emitted when a new connection is made.
null
as the first argument and response parameters as the second argument.createClient(port[, host][, timeout][, codecOptions])
Initiates a MessagePack-RPC client.
port
<number> Port the socket should connect to.host
<string> Host the socket should connect to. Default: 'localhost'
timeout
<number> Sets the socket to timeout after timeout milliseconds of inactivity on the socket. If timeout is 0, then the existing idle timeout is disabled. Default: 0
codecOptions
<Object>
encode
See Custom Codec Optionsdecode
See Custom Codec Optionsclient.request(method[, ...args])
method
<string>client.notify(method[, ...args])
method
<string>Server
1const rpc = require('msgpack-rpc-lite'); 2const server = rpc.createServer().on('say', (params, callback) => { 3 const [ message ] = params; 4 callback(null, `hello ${ message }`); 5}); 6server.listen(9199);
Client
1const rpc = require('msgpack-rpc-lite'); 2 3const client = rpc.createClient(9199, 'localhost'); 4client.request('say', [ 'world' ]).then(([ response ]) => { 5 console.log(response); // hello world 6})
Set true
to useraw
of encode
/decode
of Codec-options.
1const codecOptions = { encode: { useraw: true }, decode: { useraw: true } }; 2 3const client = rpc.createClient(9199, 'localhost', 0, codecOptions);
See also:
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/26 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
37 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More