aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/ipc_unix.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-07-12 23:47:15 +0800
committerFelix Lange <fjl@twurst.com>2016-07-23 05:21:27 +0800
commit91b769042857f542b2792b23ec407e1c9bd4fe8d (patch)
treef6730b3e85a7ac5ca98f9a716505349958fcacd3 /rpc/ipc_unix.go
parentbb01bea4e276dad359815c682a2dee730737f4dc (diff)
downloadgo-tangerine-91b769042857f542b2792b23ec407e1c9bd4fe8d.tar.gz
go-tangerine-91b769042857f542b2792b23ec407e1c9bd4fe8d.tar.zst
go-tangerine-91b769042857f542b2792b23ec407e1c9bd4fe8d.zip
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.
Diffstat (limited to 'rpc/ipc_unix.go')
-rw-r--r--rpc/ipc_unix.go6
1 files changed, 4 insertions, 2 deletions
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)
}