diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-02-28 08:00:42 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-02-28 08:00:42 +0800 |
commit | f6e821fd335911c26d515094ac0af4fa69526279 (patch) | |
tree | 99f80c562d2a1735d80baf887835a13c7696e919 /rpc/http | |
parent | ad3a21f260a0b13048046f6c76fe5f47bdcc46de (diff) | |
download | dexon-f6e821fd335911c26d515094ac0af4fa69526279.tar dexon-f6e821fd335911c26d515094ac0af4fa69526279.tar.gz dexon-f6e821fd335911c26d515094ac0af4fa69526279.tar.bz2 dexon-f6e821fd335911c26d515094ac0af4fa69526279.tar.lz dexon-f6e821fd335911c26d515094ac0af4fa69526279.tar.xz dexon-f6e821fd335911c26d515094ac0af4fa69526279.tar.zst dexon-f6e821fd335911c26d515094ac0af4fa69526279.zip |
Add flag to set RPC port
Diffstat (limited to 'rpc/http')
-rw-r--r-- | rpc/http/server.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rpc/http/server.go b/rpc/http/server.go index fa66eed48..063c333d0 100644 --- a/rpc/http/server.go +++ b/rpc/http/server.go @@ -29,8 +29,8 @@ import ( var rpchttplogger = logger.NewLogger("RPC-HTTP") var JSON rpc.JsonWrapper -func NewRpcHttpServer(pipe *xeth.XEth, port int) (*RpcHttpServer, error) { - sport := fmt.Sprintf("127.0.0.1:%d", port) +func NewRpcHttpServer(pipe *xeth.XEth, address string, port int) (*RpcHttpServer, error) { + sport := fmt.Sprintf("%s:%d", address, port) l, err := net.Listen("tcp", sport) if err != nil { return nil, err |