mirror of https://github.com/v2ray/v2ray-core
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
524 B
28 lines
524 B
9 years ago
|
package protocol
|
||
|
|
||
|
import (
|
||
|
"io"
|
||
|
|
||
|
"github.com/v2ray/v2ray-core/common/alloc"
|
||
|
)
|
||
|
|
||
|
type RequestEncoder interface {
|
||
|
EncodeHeader(*RequestHeader) *alloc.Buffer
|
||
|
EncodeBody(io.Writer) io.Writer
|
||
|
}
|
||
|
|
||
|
type RequestDecoder interface {
|
||
|
DecodeHeader(io.Reader) *RequestHeader
|
||
|
DecodeBody(io.Reader) io.Reader
|
||
|
}
|
||
|
|
||
|
type ResponseEncoder interface {
|
||
|
EncodeHeader(*ResponseHeader) *alloc.Buffer
|
||
|
EncodeBody(io.Writer) io.Writer
|
||
|
}
|
||
|
|
||
|
type ResponseDecoder interface {
|
||
|
DecodeHeader(io.Reader) *ResponseHeader
|
||
|
DecodeBody(io.Reader) io.Reader
|
||
|
}
|