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.
26 lines
551 B
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
|
|
}
|