added support for batch requests

This commit is contained in:
Bas van Kervel
2015-06-25 12:01:28 +02:00
parent 22c7ce0162
commit 6d92fdc0df
3 changed files with 79 additions and 22 deletions

View File

@ -12,7 +12,7 @@ type Codec int
// (de)serialization support for rpc interface
type ApiCoder interface {
// Parse message to request from underlying stream
ReadRequest() (*shared.Request, error)
ReadRequest() ([]*shared.Request, bool, error)
// Parse response message from underlying stream
ReadResponse() (interface{}, error)
// Encode response to encoded form in underlying stream