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

26 lines
551 B

package protocol
import (
"io"
)
type RequestEncoder interface {
EncodeRequestHeader(*RequestHeader, io.Writer)
EncodeRequestBody(io.Writer) io.Writer
}
type RequestDecoder interface {
DecodeRequestHeader(io.Reader) (*RequestHeader, error)
DecodeRequestBody(io.Reader) io.Reader
}
type ResponseEncoder interface {
EncodeResponseHeader(*ResponseHeader, io.Writer)
EncodeResponseBody(io.Writer) io.Writer
}
type ResponseDecoder interface {
DecodeResponseHeader(io.Reader) (*ResponseHeader, error)
DecodeResponseBody(io.Reader) io.Reader
}