vscode-jsonrpc
A json rpc implementation over streams
Last updated 10 years ago by dbaeumer .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install vscode-jsonrpc 
SYNC missed versions from official npm registry.

VSCode JSON RPC

NPM Version NPM Downloads Build Status

This npm module implements the base messaging protocol spoken between a VSCode language server and a VSCode language client.

The npm module can also be used standalone to establish a JSON-RPC channel between a client and a server. Below an example how to setup a JSON-RPC connection. First the client side.

import * as cp from 'child_process';
import * as rpc from 'vscode-jsonrpc/node';

let childProcess = cp.spawn(...);

// Use stdin and stdout for communication:
let connection = rpc.createMessageConnection(
	new rpc.StreamMessageReader(childProcess.stdout),
	new rpc.StreamMessageWriter(childProcess.stdin));

let notification = new rpc.NotificationType<string, void>('testNotification');

connection.listen();

connection.sendNotification(notification, 'Hello World');

The server side looks very symmetrical:

import * as rpc from 'vscode-jsonrpc/node';


let connection = rpc.createMessageConnection(
	new rpc.StreamMessageReader(process.stdin),
	new rpc.StreamMessageWriter(process.stdout));

let notification = new rpc.NotificationType<string, void>('testNotification');
connection.onNotification(notification, (param: string) => {
	console.log(param); // This prints Hello World
});

connection.listen();

History

For the history please see the main repository

License

MIT

Current Tags

  • 10.0.0                                ...           latest (a month ago)
  • 9.0.0-next.12                                ...           next (6 months ago)

141 Versions

  • 10.0.0                                ...           a month ago
  • 9.0.3                                ...           2 months ago
  • 9.0.2                                ...           3 months ago
  • 9.0.1                                ...           5 months ago
  • 9.0.0                                ...           6 months ago
  • 9.0.0-next.12                                ...           6 months ago
  • 9.0.0-next.11                                ...           a year ago
  • 9.0.0-next.10                                ...           a year ago
  • 9.0.0-next.9                                ...           a year ago
  • 9.0.0-next.8                                ...           2 years ago
  • 9.0.0-next.7                                ...           2 years ago
  • 9.0.0-next.6                                ...           2 years ago
  • 9.0.0-next.5                                ...           2 years ago
  • 9.0.0-next.4                                ...           2 years ago
  • 8.2.1                                ...           3 years ago
  • 9.0.0-next.3                                ...           3 years ago
  • 9.0.0-next.2                                ...           3 years ago
  • 9.0.0-next.1                                ...           3 years ago
  • 8.2.1-next.1                                ...           3 years ago
  • 8.2.0                                ...           3 years ago
  • 8.2.0-next.2                                ...           3 years ago
  • 8.2.0-next.1                                ...           3 years ago
  • 8.2.0-next.0                                ...           4 years ago
  • 8.1.0                                ...           4 years ago
  • 8.1.0-next.7                                ...           4 years ago
  • 8.1.0-next.6                                ...           4 years ago
  • 8.1.0-next.5                                ...           4 years ago
  • 8.1.0-next.4                                ...           4 years ago
  • 8.1.0-next.3                                ...           4 years ago
  • 8.1.0-next.2                                ...           4 years ago
  • 8.1.0-next.1                                ...           4 years ago
  • 8.0.2                                ...           4 years ago
  • 8.0.2-next.1                                ...           5 years ago
  • 8.0.1                                ...           5 years ago
  • 8.0.0                                ...           5 years ago
  • 8.0.0-next.8                                ...           5 years ago
  • 8.0.0-next.7                                ...           5 years ago
  • 8.0.0-next.6                                ...           5 years ago
  • 8.0.0-next.5                                ...           5 years ago
  • 8.0.0-next.4                                ...           5 years ago
  • 8.0.0-next.3                                ...           5 years ago
  • 8.0.0-next.2                                ...           5 years ago
  • 8.0.0-next.1                                ...           5 years ago
  • 7.0.0-next.1                                ...           5 years ago
  • 6.1.0-next.2                                ...           6 years ago
  • 6.1.0-next.1                                ...           6 years ago
  • 6.0.0                                ...           6 years ago
  • 6.0.0-next.10                                ...           6 years ago
  • 6.0.0-next.9                                ...           6 years ago
  • 6.0.0-next.8                                ...           6 years ago
  • 6.0.0-next.7                                ...           6 years ago
  • 6.0.0-next.6                                ...           6 years ago
  • 6.0.0-next.5                                ...           6 years ago
  • 6.0.0-next.4                                ...           6 years ago
  • 6.0.0-next.3                                ...           6 years ago
  • 6.0.0-next.2                                ...           7 years ago
  • 6.0.0-next.1                                ...           7 years ago
  • 5.1.0-next.1                                ...           7 years ago
  • 5.0.1                                ...           7 years ago
  • 5.0.0                                ...           7 years ago
  • 5.0.0-next.7                                ...           7 years ago
  • 5.0.0-next.6                                ...           7 years ago
  • 5.0.0-next.5                                ...           7 years ago
  • 5.0.0-next.4                                ...           7 years ago
  • 5.0.0-next.3                                ...           7 years ago
  • 5.0.0-next.2                                ...           7 years ago
  • 5.0.0-next.1                                ...           7 years ago
  • 4.1.0-next.3                                ...           7 years ago
  • 4.1.0-next.2                                ...           8 years ago
  • 4.1.0-next.1                                ...           8 years ago
  • 4.0.0                                ...           8 years ago
  • 4.0.0-next.1                                ...           8 years ago
  • 3.7.0-next.1                                ...           8 years ago
  • 3.6.2                                ...           9 years ago
  • 3.6.1                                ...           9 years ago
  • 3.6.0                                ...           9 years ago
  • 3.6.0-next.1                                ...           9 years ago
  • 3.5.0                                ...           9 years ago
  • 3.5.0-next.2                                ...           9 years ago
  • 3.5.0-next.1                                ...           9 years ago
  • 3.4.1                                ...           9 years ago
  • 3.4.0                                ...           9 years ago
  • 3.4.0-next.2                                ...           9 years ago
  • 3.4.0-next.1                                ...           9 years ago
  • 3.3.1                                ...           9 years ago
  • 3.3.0                                ...           9 years ago
  • 3.3.0-alpha.3                                ...           9 years ago
  • 3.3.0-alpha.2                                ...           10 years ago
  • 3.3.0-alpha.1                                ...           10 years ago
  • 3.2.0                                ...           10 years ago
  • 3.2.0-alpha.1                                ...           10 years ago
  • 3.1.0                                ...           10 years ago
  • 3.1.0-alpha.1                                ...           10 years ago
  • 3.0.4                                ...           10 years ago
  • 3.0.3                                ...           10 years ago
  • 3.0.2-beta.5                                ...           10 years ago
  • 3.0.2-beta.4                                ...           10 years ago
  • 3.0.2-beta.3                                ...           10 years ago
  • 3.0.2-beta.2                                ...           10 years ago
  • 3.0.2-beta.1                                ...           10 years ago
  • 3.0.1-alpha.7                                ...           10 years ago
  • 3.0.1-alpha.6                                ...           10 years ago
  • 3.0.1-alpha.5                                ...           10 years ago
  • 3.0.1-alpha.3                                ...           10 years ago
  • 3.0.1-alpha.2                                ...           10 years ago
  • 3.0.1-alpha.1                                ...           10 years ago
  • 3.0.0-alpha.5                                ...           10 years ago
  • 3.0.0-next.1                                ...           10 years ago
  • 3.0.0-alpha.4                                ...           10 years ago
  • 3.0.0-alpha.3                                ...           10 years ago
  • 3.0.0-alpha.2                                ...           10 years ago
  • 2.4.0                                ...           10 years ago
  • 2.3.2-next.5                                ...           10 years ago
  • 2.3.2-next.4                                ...           10 years ago
  • 2.3.2-next.3                                ...           10 years ago
  • 2.3.2-next.2                                ...           10 years ago
  • 2.3.2-next.1                                ...           10 years ago
  • 3.0.0-alpha.1                                ...           10 years ago
  • 2.3.1                                ...           10 years ago
  • 2.3.0                                ...           10 years ago
  • 2.2.0                                ...           10 years ago
  • 2.1.1                                ...           11 years ago
  • 2.1.0                                ...           11 years ago
  • 2.0.0                                ...           11 years ago
  • 2.0.0-pre.2                                ...           11 years ago
  • 2.0.0-pre.1                                ...           11 years ago
  • 1.2.0                                ...           11 years ago
  • 1.1.0-prerelease.1                                ...           11 years ago
  • 1.0.3-prerelease.1                                ...           11 years ago
  • 1.0.1                                ...           11 years ago
  • 0.10.1                                ...           11 years ago
  • 0.10.0                                ...           11 years ago
  • 0.10.0-pre.13                                ...           11 years ago
  • 0.10.0-pre.12                                ...           11 years ago
  • 0.10.0-pre.11                                ...           11 years ago
  • 0.10.0-pre.10                                ...           11 years ago
  • 0.10.0-pre.8                                ...           11 years ago
  • 0.10.0-pre.6                                ...           11 years ago
  • 0.10.0-pre.5                                ...           11 years ago
  • 0.10.0-pre.4                                ...           11 years ago
  • 0.10.0-pre.3                                ...           11 years ago
Downloads
Total 351
Today 0
This Week 15
This Month 177
Last Day 2
Last Week 138
Last Month 53
Dependencies (0)
None
Dev Dependencies (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE