From f6e821fd335911c26d515094ac0af4fa69526279 Mon Sep 17 00:00:00 2001
From: Taylor Gerring <taylor.gerring@gmail.com>
Date: Sat, 28 Feb 2015 01:00:42 +0100
Subject: Add flag to set RPC port

---
 rpc/http/server.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'rpc/http/server.go')

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
-- 
cgit v1.2.3


From ea0517b5396efc7bd47f820ec0263f68f76f29a4 Mon Sep 17 00:00:00 2001
From: Taylor Gerring <taylor.gerring@gmail.com>
Date: Sat, 28 Feb 2015 01:04:54 +0100
Subject: Report RPC listening address in logs

---
 rpc/http/server.go | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'rpc/http/server.go')

diff --git a/rpc/http/server.go b/rpc/http/server.go
index 063c333d0..452b7c9af 100644
--- a/rpc/http/server.go
+++ b/rpc/http/server.go
@@ -41,6 +41,7 @@ func NewRpcHttpServer(pipe *xeth.XEth, address string, port int) (*RpcHttpServer
 		quit:     make(chan bool),
 		pipe:     pipe,
 		port:     port,
+		addr:     address,
 	}, nil
 }
 
@@ -49,6 +50,7 @@ type RpcHttpServer struct {
 	listener net.Listener
 	pipe     *xeth.XEth
 	port     int
+	addr     string
 }
 
 func (s *RpcHttpServer) exitHandler() {
@@ -69,7 +71,7 @@ func (s *RpcHttpServer) Stop() {
 }
 
 func (s *RpcHttpServer) Start() {
-	rpchttplogger.Infof("Starting RPC-HTTP server on port %d", s.port)
+	rpchttplogger.Infof("Starting RPC-HTTP server on %s:%d", s.addr, s.port)
 	go s.exitHandler()
 
 	api := rpc.NewEthereumApi(s.pipe)
-- 
cgit v1.2.3