ServeFile

This commit is contained in:
Jae Kwon
2015-04-10 02:12:17 -07:00
parent 06b167c669
commit 0bb6c111bb
4 changed files with 68 additions and 34 deletions

View File

@@ -10,16 +10,10 @@ import (
"github.com/tendermint/tendermint/binary"
. "github.com/tendermint/tendermint/common"
"github.com/tendermint/tendermint/events"
)
func StartHTTPServer(listenAddr string, funcMap map[string]*RPCFunc, evsw *events.EventSwitch) {
func StartHTTPServer(listenAddr string, mux *http.ServeMux) {
log.Info(Fmt("Starting RPC HTTP server on %s", listenAddr))
mux := http.NewServeMux()
RegisterRPCFuncs(mux, funcMap)
if evsw != nil {
RegisterEventsHandler(mux, evsw)
}
go func() {
res := http.ListenAndServe(
listenAddr,