Merge pull request #31 from filecoin-project/feat/wsrpc

JsonRPC over WebSockets
This commit is contained in:
Whyrusleeping
2019-07-16 09:36:32 -07:00
committed by GitHub
11 changed files with 516 additions and 221 deletions
+3 -3
View File
@@ -6,8 +6,8 @@ import (
)
// NewRPC creates a new http jsonrpc client.
func NewRPC(addr string) api.API {
func NewRPC(addr string) (api.API, error) {
var res api.Struct
jsonrpc.NewClient(addr, "Filecoin", &res.Internal)
return &res
_, err := jsonrpc.NewClient(addr, "Filecoin", &res.Internal)
return &res, err
}