aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/comms/comms.go
diff options
context:
space:
mode:
authorBas van Kervel <bas@ethdev.com>2015-06-17 22:22:35 +0800
committerBas van Kervel <bas@ethdev.com>2015-06-22 15:17:09 +0800
commita4a4e9fcf824189d8d06940492a01effe6e6cf92 (patch)
tree5e7b9cea12d319e4ab1d6ca746102e080259297f /rpc/comms/comms.go
parent3e1d635f8d40815ef2262e017a969ed6f5eb2a5d (diff)
downloadgo-tangerine-a4a4e9fcf824189d8d06940492a01effe6e6cf92.tar
go-tangerine-a4a4e9fcf824189d8d06940492a01effe6e6cf92.tar.gz
go-tangerine-a4a4e9fcf824189d8d06940492a01effe6e6cf92.tar.bz2
go-tangerine-a4a4e9fcf824189d8d06940492a01effe6e6cf92.tar.lz
go-tangerine-a4a4e9fcf824189d8d06940492a01effe6e6cf92.tar.xz
go-tangerine-a4a4e9fcf824189d8d06940492a01effe6e6cf92.tar.zst
go-tangerine-a4a4e9fcf824189d8d06940492a01effe6e6cf92.zip
removed old rpc structure and added new inproc api client
Diffstat (limited to 'rpc/comms/comms.go')
-rw-r--r--rpc/comms/comms.go18
1 files changed, 17 insertions, 1 deletions
diff --git a/rpc/comms/comms.go b/rpc/comms/comms.go
index 2af63e55d..050e7b4e2 100644
--- a/rpc/comms/comms.go
+++ b/rpc/comms/comms.go
@@ -9,16 +9,32 @@ import (
"github.com/ethereum/go-ethereum/rpc/api"
"github.com/ethereum/go-ethereum/rpc/codec"
"github.com/ethereum/go-ethereum/rpc/shared"
+ "strings"
)
const (
- jsonrpcver = "2.0"
maxHttpSizeReqLength = 1024 * 1024 // 1MB
)
+var (
+ // List with all API's which are offered over the in proc interface by default
+ DefaultInProcApis = api.AllApis
+
+ // List with all API's which are offered over the IPC interface by default
+ DefaultIpcApis = api.AllApis
+
+ // List with API's which are offered over thr HTTP/RPC interface by default
+ DefaultHttpRpcApis = strings.Join([]string{
+ api.DbApiName, api.EthApiName, api.NetApiName, api.Web3ApiName,
+ }, ",")
+)
+
type EthereumClient interface {
+ // Close underlaying connection
Close()
+ // Send request
Send(interface{}) error
+ // Receive response
Recv() (interface{}, error)
}