From 91b769042857f542b2792b23ec407e1c9bd4fe8d Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 12 Jul 2016 17:47:15 +0200 Subject: rpc: add new client, use it everywhere The new client implementation supports concurrent requests, subscriptions and replaces the various ad hoc RPC clients throughout go-ethereum. --- rpc/ipc_unix.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'rpc/ipc_unix.go') diff --git a/rpc/ipc_unix.go b/rpc/ipc_unix.go index 9ece01240..a25b21627 100644 --- a/rpc/ipc_unix.go +++ b/rpc/ipc_unix.go @@ -22,6 +22,8 @@ import ( "net" "os" "path/filepath" + + "golang.org/x/net/context" ) // ipcListen will create a Unix socket on the given endpoint. @@ -40,6 +42,6 @@ func ipcListen(endpoint string) (net.Listener, error) { } // newIPCConnection will connect to a Unix socket on the given endpoint. -func newIPCConnection(endpoint string) (net.Conn, error) { - return net.DialUnix("unix", nil, &net.UnixAddr{Name: endpoint, Net: "unix"}) +func newIPCConnection(ctx context.Context, endpoint string) (net.Conn, error) { + return dialContext(ctx, "unix", endpoint) } -- cgit v1.2.3