@@ -27,7 +27,7 @@ Firing up an efficient JSON-RPC server becomes extremely simple:
2727``` js
2828var rpc = require (' json-rpc2' );
2929
30- var server = rpc .Server .create ({
30+ var server = rpc .Server .$ create ({
3131 ' websocket' : true , // is true by default
3232 ' headers' : { // allow custom headers is empty by default
3333 ' Access-Control-Allow-Origin' : ' *'
@@ -58,7 +58,7 @@ And creating a client to speak to that server is easy too:
5858``` js
5959var rpc = require (' json-rpc2' );
6060
61- var client = rpc .Client .create (8000 , ' localhost' );
61+ var client = rpc .Client .$ create (8000 , ' localhost' );
6262
6363// Call add function on the server
6464
@@ -72,7 +72,7 @@ Create a raw (socket) server using:
7272``` js
7373var rpc = require (' json-rpc2' );
7474
75- var server = rpc .Server .create ();
75+ var server = rpc .Server .$ create ();
7676
7777// non-standard auth for RPC, when using this module using both client and server, works out-of-the-box
7878server .enableAuth (' user' , ' pass' );
@@ -98,8 +98,8 @@ rpc.Endpoint.include({
9898});
9999
100100var
101- server = rpc .Server .create (),
102- client = rpc .Client .create ();
101+ server = rpc .Server .$ create (),
102+ client = rpc .Client .$ create ();
103103
104104server .newFunction (); // already available
105105client .newFunction (); // already available
@@ -144,7 +144,7 @@ var MyCoolServer = require('json-rpc2').Server.define('MyCoolServer', {
144144}); // MyCoolServer will contain all class and instance functions from Server
145145
146146MyCoolServer .myOwnClassMethod (); // class function
147- MyCoolServer .create ().myOwnFunction (); // instance function
147+ MyCoolServer .$ create ().myOwnFunction (); // instance function
148148```
149149
150150## Debugging
0 commit comments