mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 23:47:07 -05:00
28 lines
524 B
Go
28 lines
524 B
Go
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
|
|
}
|