Enable websockets for mist. Closes #218

poc8
obscuren 10 years ago
parent e531c6fc6c
commit f468a9a0e2
  1. 4
      cmd/mist/main.go
  2. 5
      cmd/utils/websockets.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

@ -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()
}

Loading…
Cancel
Save