Update README; Remove GetEvents() from Application

This commit is contained in:
Jae Kwon
2015-11-16 15:50:26 -08:00
parent d319c5be0d
commit 201bf2374b
5 changed files with 19 additions and 25 deletions

View File

@ -78,9 +78,8 @@ func handleRequest(app types.Application, req types.Request, responses chan<- ty
data := app.Info()
responses <- types.ResponseInfo{data}
case types.RequestAppendTx:
retCode := app.AppendTx(req.TxBytes)
events, retCode := app.AppendTx(req.TxBytes)
responses <- types.ResponseAppendTx{retCode}
events := app.GetEvents()
for _, event := range events {
responses <- types.ResponseEvent{event}
}
@ -96,12 +95,6 @@ func handleRequest(app types.Application, req types.Request, responses chan<- ty
case types.RequestSetEventsMode:
retCode := app.SetEventsMode(req.EventsMode)
responses <- types.ResponseSetEventsMode{retCode}
if req.EventsMode == types.EventsModeOn {
events := app.GetEvents()
for _, event := range events {
responses <- types.ResponseEvent{event}
}
}
case types.RequestAddListener:
retCode := app.AddListener(req.EventKey)
responses <- types.ResponseAddListener{retCode}