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.
v2ray-core/common/protocol/encoding.go

28 lines
524 B

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
}