diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-06-25 23:06:19 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-06-25 23:06:19 +0800 |
commit | e64625aa8215985c85f97f914a98db081e07714f (patch) | |
tree | d452551dccb6728ab96d849cd485b7220268c388 /rpc/comms/ipc.go | |
parent | 6b2a03faa2473d38093adbeee62935af2fe2da59 (diff) | |
parent | 662285074e55a3915f7236a04fec355c3f416eb8 (diff) | |
download | go-tangerine-e64625aa8215985c85f97f914a98db081e07714f.tar go-tangerine-e64625aa8215985c85f97f914a98db081e07714f.tar.gz go-tangerine-e64625aa8215985c85f97f914a98db081e07714f.tar.bz2 go-tangerine-e64625aa8215985c85f97f914a98db081e07714f.tar.lz go-tangerine-e64625aa8215985c85f97f914a98db081e07714f.tar.xz go-tangerine-e64625aa8215985c85f97f914a98db081e07714f.tar.zst go-tangerine-e64625aa8215985c85f97f914a98db081e07714f.zip |
Merge pull request #1332 from bas-vk/ipcbatch
IPC interface improvements
Diffstat (limited to 'rpc/comms/ipc.go')
-rw-r--r-- | rpc/comms/ipc.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rpc/comms/ipc.go b/rpc/comms/ipc.go index 068a1288f..f3dda5581 100644 --- a/rpc/comms/ipc.go +++ b/rpc/comms/ipc.go @@ -2,6 +2,7 @@ package comms import ( "fmt" + "math/rand" "net" "encoding/json" @@ -16,6 +17,7 @@ type IpcConfig struct { type ipcClient struct { endpoint string + c net.Conn codec codec.Codec coder codec.ApiCoder } @@ -94,3 +96,7 @@ func NewIpcClient(cfg IpcConfig, codec codec.Codec) (*ipcClient, error) { func StartIpc(cfg IpcConfig, codec codec.Codec, offeredApi shared.EthereumApi) error { return startIpc(cfg, codec, offeredApi) } + +func newIpcConnId() int { + return rand.Int() % 1000000 +} |