aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-23 22:46:46 +0800
committerobscuren <geffobscura@gmail.com>2014-12-23 22:47:08 +0800
commitf468a9a0e236f8467012ffe35c1d8ff58e30a81a (patch)
treef2dca421cf78b99550c0ddf8c2bbce97a31ea50e /cmd
parente531c6fc6cb9c54969a85eca6642561dff958a27 (diff)
downloaddexon-f468a9a0e236f8467012ffe35c1d8ff58e30a81a.tar
dexon-f468a9a0e236f8467012ffe35c1d8ff58e30a81a.tar.gz
dexon-f468a9a0e236f8467012ffe35c1d8ff58e30a81a.tar.bz2
dexon-f468a9a0e236f8467012ffe35c1d8ff58e30a81a.tar.lz
dexon-f468a9a0e236f8467012ffe35c1d8ff58e30a81a.tar.xz
dexon-f468a9a0e236f8467012ffe35c1d8ff58e30a81a.tar.zst
dexon-f468a9a0e236f8467012ffe35c1d8ff58e30a81a.zip
Enable websockets for mist. Closes #218
Diffstat (limited to 'cmd')
-rw-r--r--cmd/mist/main.go4
-rw-r--r--cmd/utils/websockets.go5
2 files changed, 9 insertions, 0 deletions
diff --git a/cmd/mist/main.go b/cmd/mist/main.go
index eaf0af0c7..5f809f1c5 100644
--- a/cmd/mist/main.go
+++ b/cmd/mist/main.go
@@ -69,6 +69,10 @@ func run() error {
utils.StartRpc(ethereum, RpcPort)
}
+ if StartWebSockets {
+ utils.StartWebSockets(ethereum)
+ }
+
gui := NewWindow(ethereum, config, clientIdentity, KeyRing, LogLevel)
gui.stdLog = stdLog
diff --git a/cmd/utils/websockets.go b/cmd/utils/websockets.go
index d3ba50e78..cf9ebba92 100644
--- a/cmd/utils/websockets.go
+++ b/cmd/utils/websockets.go
@@ -3,10 +3,13 @@ package utils
import (
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/ethutil"
+ "github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/websocket"
"github.com/ethereum/go-ethereum/xeth"
)
+var wslogger = logger.NewLogger("WS")
+
func args(v ...interface{}) []interface{} {
return v
}
@@ -106,6 +109,8 @@ func (self *WebSocketServer) Serv() {
}
func StartWebSockets(eth *eth.Ethereum) {
+ wslogger.Infoln("Starting WebSockets")
+
sock := NewWebSocketServer(eth)
go sock.Serv()
}