Browse Source

Handle RequestInfo in handleRequest

pull/1780/head
Jae Kwon 9 years ago
parent
commit
e8505a714b
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      server/server.go

+ 4
- 1
server/server.go View File

@ -58,7 +58,7 @@ func handleRequests(app types.Application, connClosed chan struct{}, conn net.Co
var req types.Request
wire.ReadBinaryPtr(&req, bufReader, &n, &err)
if err != nil {
fmt.Println(err.Error())
fmt.Println("Error in handleRequests:", err.Error())
connClosed <- struct{}{}
return
}
@ -74,6 +74,9 @@ func handleRequest(app types.Application, req types.Request, responses chan<- ty
responses <- types.ResponseEcho{msg}
case types.RequestFlush:
responses <- types.ResponseFlush{}
case types.RequestInfo:
data := app.Info()
responses <- types.ResponseInfo{data}
case types.RequestAppendTx:
retCode := app.AppendTx(req.TxBytes)
responses <- types.ResponseAppendTx{retCode}


Loading…
Cancel
Save