Class RpcClient
The RPC client to send and receive data to the Casper network.
Assembly: Casper.Network.SDK.dll
Syntax
public class RpcClient : IDisposable
Constructors
|
Edit this page
View Source
RpcClient(string, RpcLoggingHandler)
Creates an instance of the RPC Client that connects to the node address received
as argument. Optionally, use an RpcLoggingHandler object to log requests and responses.
Declaration
public RpcClient(string nodeAddress, RpcLoggingHandler loggingHandler = null)
Parameters
|
Edit this page
View Source
RpcClient(string, HttpClient)
Declaration
public RpcClient(string nodeAddress, HttpClient client)
Parameters
Methods
|
Edit this page
View Source
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
|
Edit this page
View Source
Dispose(bool)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type |
Name |
Description |
| bool |
disposing |
|
|
Edit this page
View Source
SendAsync<TRpcResult>(RpcMethod)
Declaration
protected Task<RpcResponse<TRpcResult>> SendAsync<TRpcResult>(RpcMethod method)
Parameters
Returns
Type Parameters
| Name |
Description |
| TRpcResult |
|
|
Edit this page
View Source
SendJsonAsync<TRpcResult>(string)
Declaration
public Task<RpcResponse<TRpcResult>> SendJsonAsync<TRpcResult>(string json)
Parameters
| Type |
Name |
Description |
| string |
json |
|
Returns
Type Parameters
| Name |
Description |
| TRpcResult |
|
|
Edit this page
View Source
SendRpcRequestAsync<TRpcResult>(RpcMethod)
Sends the RPC method received as argument to the network and returns an RPC response object.
Declaration
public Task<RpcResponse<TRpcResult>> SendRpcRequestAsync<TRpcResult>(RpcMethod method)
Parameters
Returns
Type Parameters
| Name |
Description |
| TRpcResult |
|
Implements