Further crufting

This commit is contained in:
Asim Aslam
2019-01-09 19:28:13 +00:00
parent 873fc6d663
commit 6e0e4a684c
6 changed files with 32 additions and 14 deletions

View File

@@ -54,13 +54,15 @@ type Request interface {
// Read the undecoded request body
Read() ([]byte, error)
// The encoded message stream
Codec() codec.Codec
Codec() codec.Reader
// Indicates whether its a stream
Stream() bool
}
// Response is the response writer for unencoded messages
type Response interface {
// Encoded writer
Codec() codec.Writer
// Write the header
WriteHeader(map[string]string)
// write a response directly to the client