rpc/client/http: drop endpoint arg from New and add WSOptions (#6176)

also

- replace `MaxReconnectAttempts`, `ReadWait`, `WriteWait` and `PingPeriod` options with `WSOptions` in `WSClient` (rpc/jsonrpc/client/ws_client.go).
- set default write wait to 10s for `WSClient`(rpc/jsonrpc/client/ws_client.go)
- unexpose `WSEvents`(rpc/client/http.go)

Closes #6162
This commit is contained in:
Anton Kaliaev
2021-02-25 06:57:31 +00:00
committed by GitHub
parent bd14bb66e9
commit e9e5026dac
15 changed files with 344 additions and 314 deletions
+1 -1
View File
@@ -473,7 +473,7 @@ func (n Node) AddressRPC() string {
// Client returns an RPC client for a node.
func (n Node) Client() (*rpchttp.HTTP, error) {
return rpchttp.New(fmt.Sprintf("http://127.0.0.1:%v", n.ProxyPort), "/websocket")
return rpchttp.New(fmt.Sprintf("http://127.0.0.1:%v", n.ProxyPort))
}
// keyGenerator generates pseudorandom Ed25519 keys based on a seed.