Constructs a BaseJsonRpcServer server and returns it. Listens on localhost:8080 by default, on both IPv4 and IPv6 To listen only on IPv4, override onBeforeListening and call dns.setDefaultResultOrder('ipv4first'); To listen only on IPv6, if both IPv4 and IPv6 is enabled, just pass "localhost" to the host parameter
Optional
host: string = "::"The IP address/hostname to listen on
Optional
port: number = CDefaultPortThe port number to listen on
BaseJsonRpcServer
Protected
mProtected
mProtected
mProtected
mProtected
mProtected
mOnly valid when processing a request
Protected
mOnly valid when processing a request
Protected
mReturns the path on which to listen to requests for. Override to listen on another path.
path on which to listen to requests for
Protected
addRPCMethodsProtected
afterProtected
createCreates an Invalid Params JSON RPC Error exception, with the message as Invalid Params. The caller must throw the return of this call.
Optional
data: anyInvalid Params JSON RPC Error exception
Protected
createCreates an Invalid Params JSON RPC Error exception, with the given message. The caller must throw the return of this call.
Optional
data: anyInvalid Params JSON RPC Error exception
Protected
createCreates an Invalid Request JSON RPC Error exception, with the message as Invalid Params. The caller must throw the return of this call.
Optional
data: anyInvalid Request JSON RPC Error exception
Protected
createProtected
createCreates a Method not found JSON RPC Error response, with the message as Invalid Params. The caller must throw the return of this call.
Invalid Request JSON RPC Error exception
Protected
doProtected
handleProtected
implementedRPCMethodsReturns RPC methods implemented by the server Override to return an array of RPC methods implemented.
array of RPC methods implemented
Protected
initProtected
initInitializes the JSON RPC server and returns it
Protected
initProtected
JsonProtected
logProtected
logDisplays the JSON RPC methods being listened to
Protected
onCalled before every valid JSON body is dispatched, this doesn't mean that the request is a valid JSON RPC call though. If the request is valid, the method should call next(request, serverParams) and return its result. If the request is invalid, it should throw an appropriate error.
Protected
onProtected
onCalled when there's a parsing error. The overridden method should create a JSON RPC Error response and send it using response.send(err_response) If the error is not handled, this class will return an error
Protected
sendProtected
sendProtected
stopProtected
waitProtected
wait
This is a JSON RPC server that conforms to the JSON RPC 2.0 spec as documented at https://www.jsonrpc.org/specification
BaseJsonRpcServer