Motivation
Well, FS ESL protocol format is looked like below
command args \n\n
sendmsg [uuid]\n
call-command: execute \n
execute-app-name: answer \n
execute-app-arg: ,,, \n
If sending is ordered so the replies is ordered
so we could use the batch mode like LevelDB BatchWrite to batch multi commands and execute in on send and wait multi replies
Design
type BatchCommand struct {
}
and usage is
batch := &BatchCommand{}
batch
.Connect()
.Answer()
.Api("originate", "user/1000@default &echo()", "")
.Api("Other api execute")
.execute() // sync wait replies
connectResponse, err := batch.Reply.Next()
answerResponse , err:= batch.Reply.Next()
originateRspons, err:= batch.Reply.Next()
// and so on
This design is very usefule when you call getvar or setvar :)
Motivation
Well, FS ESL protocol format is looked like below
If sending is ordered so the replies is ordered
so we could use the batch mode like LevelDB BatchWrite to batch multi commands and execute in on send and wait multi replies
Design
and usage is
This design is very usefule when you call
getvarorsetvar:)