mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
cleanup: remove deprecated DialWebsocketWithDialer function
Removed deprecated DialWebsocketWithDialer function.
This commit is contained in:
parent
6608a2aafd
commit
6a9d509bce
1 changed files with 0 additions and 19 deletions
|
|
@ -185,25 +185,6 @@ func parseOriginURL(origin string) (string, string, string, error) {
|
|||
return scheme, hostname, port, nil
|
||||
}
|
||||
|
||||
// DialWebsocketWithDialer creates a new RPC client using WebSocket.
|
||||
//
|
||||
// The context is used for the initial connection establishment. It does not
|
||||
// affect subsequent interactions with the client.
|
||||
//
|
||||
// Deprecated: use DialOptions and the WithWebsocketDialer option.
|
||||
func DialWebsocketWithDialer(ctx context.Context, endpoint, origin string, dialer websocket.Dialer) (*Client, error) {
|
||||
cfg := new(clientConfig)
|
||||
cfg.wsDialer = &dialer
|
||||
if origin != "" {
|
||||
cfg.setHeader("origin", origin)
|
||||
}
|
||||
connect, err := newClientTransportWS(endpoint, cfg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return newClient(ctx, cfg, connect)
|
||||
}
|
||||
|
||||
// DialWebsocket creates a new RPC client that communicates with a JSON-RPC server
|
||||
// that is listening on the given endpoint.
|
||||
//
|
||||
|
|
|
|||
Loading…
Reference in a new issue